align-dlib: Check if image was correctly loaded.

This commit is contained in:
Brandon Amos 2015-12-12 15:27:54 -05:00
parent 244ac78e90
commit 446436ced1
1 changed files with 6 additions and 2 deletions

View File

@ -100,8 +100,12 @@ def alignMain(args):
if not os.path.isfile(imgName):
rgb = imgObject.getRGB()
if rgb is not None:
print(imgName, type(rgb), rgb.shape)
outRgb = align.alignImg('affine', args.size, rgb,
landmarkIndices=landmarkIndices)
else:
outRgb = None
if args.fallbackLfw and outRgb is None:
nFallbacks += 1
deepFunneled = "{}/{}.jpg".format(os.path.join(args.fallbackLfw,