align-dlib: Fix logic for debug images for #43.
This commit is contained in:
parent
f9170eb3aa
commit
986db491be
|
@ -149,7 +149,7 @@ class NaiveDlib:
|
|||
"face's bounding box.")
|
||||
return
|
||||
|
||||
if outputPrefix:
|
||||
if outputDebug:
|
||||
io.imsave(getName(), cwImg)
|
||||
return cwImg
|
||||
|
||||
|
|
|
@ -89,12 +89,14 @@ def alignMain(args):
|
|||
nFallbacks = 0
|
||||
for imgObject in imgs:
|
||||
outDir = os.path.join(args.outputDir, imgObject.cls)
|
||||
imgName = "{}/{}.png".format(outDir, imgObject.name)
|
||||
openface.helper.mkdirP(outDir)
|
||||
outputPrefix = os.path.join(outDir, imgObject.name)
|
||||
imgName = outputPrefix + ".png"
|
||||
|
||||
if not os.path.isfile(imgName):
|
||||
rgb = imgObject.getRGB(cache=False)
|
||||
out = align.alignImg(args.method, args.size, rgb,
|
||||
outputPrefix=outDir,
|
||||
outputPrefix=outputPrefix,
|
||||
outputDebug=args.outputDebugImages)
|
||||
if args.fallbackLfw and out is None:
|
||||
nFallbacks += 1
|
||||
|
|
Loading…
Reference in New Issue