mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 04:52:13 -07:00
Removed the wait at first launch for most graphics cards. Increased speed of training by 10-20%, but you have to retrain all models from scratch. SAEHD: added option 'use float16' Experimental option. Reduces the model size by half. Increases the speed of training. Decreases the accuracy of the model. The model may collapse or not train. Model may not learn the mask in large resolutions. true_face_training option is replaced by "True face power". 0.0000 .. 1.0 Experimental option. Discriminates the result face to be more like the src face. Higher value - stronger discrimination. Comparison - https://i.imgur.com/czScS9q.png
40 lines
1.3 KiB
Python
40 lines
1.3 KiB
Python
from enum import IntEnum
|
|
|
|
class FaceType(IntEnum):
|
|
#enumerating in order "next contains prev"
|
|
HALF = 0
|
|
MID_FULL = 1
|
|
FULL = 2
|
|
FULL_NO_ALIGN = 3
|
|
HEAD = 4
|
|
HEAD_NO_ALIGN = 5
|
|
|
|
MARK_ONLY = 10, #no align at all, just embedded faceinfo
|
|
|
|
@staticmethod
|
|
def fromString (s):
|
|
r = from_string_dict.get (s.lower())
|
|
if r is None:
|
|
raise Exception ('FaceType.fromString value error')
|
|
return r
|
|
|
|
@staticmethod
|
|
def toString (face_type):
|
|
return to_string_dict[face_type]
|
|
|
|
from_string_dict = {'half_face': FaceType.HALF,
|
|
'midfull_face': FaceType.MID_FULL,
|
|
'full_face': FaceType.FULL,
|
|
'head' : FaceType.HEAD,
|
|
'mark_only' : FaceType.MARK_ONLY,
|
|
'full_face_no_align' : FaceType.FULL_NO_ALIGN,
|
|
'head_no_align' : FaceType.HEAD_NO_ALIGN,
|
|
}
|
|
to_string_dict = { FaceType.HALF : 'half_face',
|
|
FaceType.MID_FULL : 'midfull_face',
|
|
FaceType.FULL : 'full_face',
|
|
FaceType.HEAD : 'head',
|
|
FaceType.MARK_ONLY :'mark_only',
|
|
FaceType.FULL_NO_ALIGN : 'full_face_no_align',
|
|
FaceType.HEAD_NO_ALIGN : 'head_no_align'
|
|
}
|