mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-13 16:43:51 -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
|
@ -32,20 +32,16 @@ class S3FDExtractor(object):
|
|||
|
||||
olist = self.model.predict( np.expand_dims(input_image,0) )
|
||||
|
||||
detected_faces = self.refine (olist)
|
||||
|
||||
#filtering faces < 40pix by any side
|
||||
#enlarging bottom line a bit for 2DFAN-4, because default is not enough covering a chin
|
||||
new_detected_faces = []
|
||||
for ltrb in detected_faces:
|
||||
detected_faces = []
|
||||
for ltrb in self.refine (olist):
|
||||
l,t,r,b = [ x*input_scale for x in ltrb]
|
||||
bt = b-t
|
||||
if min(r-l,bt) < 40:
|
||||
if min(r-l,bt) < 40: #filtering faces < 40pix by any side
|
||||
continue
|
||||
b += bt*0.1
|
||||
new_detected_faces.append ( [int(x) for x in (l,t,r,b) ] )
|
||||
b += bt*0.1 #enlarging bottom line a bit for 2DFAN-4, because default is not enough covering a chin
|
||||
detected_faces.append ( [int(x) for x in (l,t,r,b) ] )
|
||||
|
||||
return new_detected_faces
|
||||
return detected_faces
|
||||
|
||||
def refine(self, olist):
|
||||
bboxlist = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue