fixed GPU detection and indexes, got rid of using nvml, now using direct cuda lib to determine gpu info that match tensorflow indexes,

removed TrueFace model.

added SAEv2 model. Differences from SAE:
+ default e_ch_dims is now 21
+ new encoder produces more stable face and less scale jitter
  before: https://i.imgur.com/4jUcol8.gifv
  after:  https://i.imgur.com/lyiax49.gifv - scale of the face is less changed within frame size
+ decoder now has only 1 residual block instead of 2, result is same quality with less decoder size
+ added mid-full face, which covers 30% more area than half face.
+ added option " Enable 'true face' training "
  Enable it only after 50k iters, when the face is sharp enough.
  the result face will be more like src.
  The most src-like face with 'true-face-training' you can achieve with DF architecture.
This commit is contained in:
Colombo 2019-10-05 16:26:23 +04:00
parent 353bcdf80f
commit d781af3d1f
12 changed files with 824 additions and 2077 deletions

View file

@ -2,11 +2,12 @@ from enum import IntEnum
class FaceType(IntEnum):
#enumerating in order "next contains prev"
HALF = 0,
FULL = 1,
FULL_NO_ALIGN = 3,
HEAD = 4,
HEAD_NO_ALIGN = 5,
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
@ -22,6 +23,7 @@ class FaceType(IntEnum):
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,
@ -29,6 +31,7 @@ from_string_dict = {'half_face': FaceType.HALF,
'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',