mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-19 21:13:20 -07:00
fix ability for auto re-extract dst faces, after this update DFL torrent extractor scripts will not work.
This commit is contained in:
parent
b03d62a29b
commit
1d56585f33
6 changed files with 48 additions and 49 deletions
|
@ -152,7 +152,8 @@ class DFLJPG(object):
|
|||
landmarks=None,
|
||||
source_filename=None,
|
||||
source_rect=None,
|
||||
source_landmarks=None
|
||||
source_landmarks=None,
|
||||
image_to_face_mat=None
|
||||
):
|
||||
|
||||
inst = DFLJPG.load_raw (filename)
|
||||
|
@ -161,7 +162,8 @@ class DFLJPG(object):
|
|||
'landmarks': landmarks,
|
||||
'source_filename': source_filename,
|
||||
'source_rect': source_rect,
|
||||
'source_landmarks': source_landmarks
|
||||
'source_landmarks': source_landmarks,
|
||||
'image_to_face_mat': image_to_face_mat
|
||||
})
|
||||
|
||||
try:
|
||||
|
@ -223,3 +225,6 @@ class DFLJPG(object):
|
|||
def get_source_filename(self): return self.dfl_dict['source_filename']
|
||||
def get_source_rect(self): return self.dfl_dict['source_rect']
|
||||
def get_source_landmarks(self): return np.array ( self.dfl_dict['source_landmarks'] )
|
||||
def get_image_to_face_mat(self):
|
||||
mat = self.dfl_dict.get('image_to_face_mat', None)
|
||||
return np.array(mat) if mat is not None else None
|
|
@ -324,20 +324,14 @@ class DFLPNG(object):
|
|||
chunk = DFLChunk(dict_data)
|
||||
self.chunks.insert(-1, chunk)
|
||||
|
||||
def get_face_type(self):
|
||||
return self.fcwp_dict['face_type']
|
||||
|
||||
def get_landmarks(self):
|
||||
return np.array ( self.fcwp_dict['landmarks'] )
|
||||
|
||||
def get_source_filename(self):
|
||||
return self.fcwp_dict['source_filename']
|
||||
|
||||
def get_source_rect(self):
|
||||
return self.fcwp_dict['source_rect']
|
||||
|
||||
def get_source_landmarks(self):
|
||||
return np.array ( self.fcwp_dict['source_landmarks'] )
|
||||
|
||||
def get_face_type(self): return self.fcwp_dict['face_type']
|
||||
def get_landmarks(self): return np.array ( self.fcwp_dict['landmarks'] )
|
||||
def get_source_filename(self): return self.fcwp_dict['source_filename']
|
||||
def get_source_rect(self): return self.fcwp_dict['source_rect']
|
||||
def get_source_landmarks(self): return np.array ( self.fcwp_dict['source_landmarks'] )
|
||||
def get_image_to_face_mat(self):
|
||||
mat = self.fcwp_dict.get('image_to_face_mat', None)
|
||||
return np.array(mat) if mat is not None else None
|
||||
|
||||
def __str__(self):
|
||||
return "<PNG length={length} chunks={}>".format(len(self.chunks), **self.__dict__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue