mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 04:52:13 -07:00
refactorings
This commit is contained in:
parent
e0e8970ab9
commit
754d6c385c
13 changed files with 243 additions and 104 deletions
|
@ -7,6 +7,7 @@ import numpy as np
|
|||
from utils.cv2_utils import *
|
||||
from DFLIMG import *
|
||||
from facelib import LandmarksProcessor
|
||||
from imagelib import IEPolys
|
||||
|
||||
class SampleType(IntEnum):
|
||||
IMAGE = 0 #raw image
|
||||
|
@ -50,11 +51,13 @@ class Sample(object):
|
|||
self.face_type = face_type
|
||||
self.shape = shape
|
||||
self.landmarks = np.array(landmarks) if landmarks is not None else None
|
||||
self.ie_polys = ie_polys
|
||||
self.ie_polys = IEPolys.load(ie_polys)
|
||||
self.eyebrows_expand_mod = eyebrows_expand_mod
|
||||
self.source_filename = source_filename
|
||||
self.person_name = person_name
|
||||
self.pitch_yaw_roll = pitch_yaw_roll
|
||||
|
||||
self._filename_offset_size = None
|
||||
|
||||
def get_pitch_yaw_roll(self):
|
||||
if self.pitch_yaw_roll is None:
|
||||
|
@ -84,7 +87,7 @@ class Sample(object):
|
|||
'face_type': self.face_type,
|
||||
'shape': self.shape,
|
||||
'landmarks': self.landmarks.tolist(),
|
||||
'ie_polys': self.ie_polys,
|
||||
'ie_polys': self.ie_polys.dump(),
|
||||
'eyebrows_expand_mod': self.eyebrows_expand_mod,
|
||||
'source_filename': self.source_filename,
|
||||
'person_name': self.person_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue