Fix pep8 errors.
This commit is contained in:
parent
ec7650cf73
commit
97cb800a40
|
@ -62,6 +62,7 @@ TEMPLATE = np.float32([
|
|||
TPL_MIN, TPL_MAX = np.min(TEMPLATE, axis=0), np.max(TEMPLATE, axis=0)
|
||||
MINMAX_TEMPLATE = (TEMPLATE - TPL_MIN) / (TPL_MAX - TPL_MIN)
|
||||
|
||||
|
||||
class NaiveDlib:
|
||||
# https://github.com/cmusatyalab/openface/blob/master/images/dlib-landmark-mean.png
|
||||
INNER_EYES_AND_BOTTOM_LIP = np.array([39, 42, 57])
|
||||
|
@ -103,7 +104,7 @@ class NaiveDlib:
|
|||
|
||||
if method == 'affine':
|
||||
H = cv2.getAffineTransform(npLandmarks[landmarkIndices],
|
||||
size*MINMAX_TEMPLATE[landmarkIndices])
|
||||
size * MINMAX_TEMPLATE[landmarkIndices])
|
||||
thumbnail = cv2.warpAffine(rgbImg, H, (size, size))
|
||||
else:
|
||||
raise Exception('Unrecognized method: {}'.format(method))
|
||||
|
|
|
@ -16,6 +16,7 @@ import os
|
|||
|
||||
import cv2
|
||||
|
||||
|
||||
class Image:
|
||||
|
||||
def __init__(self, cls, name, path):
|
||||
|
|
|
@ -101,7 +101,7 @@ def alignMain(args):
|
|||
if not os.path.isfile(imgName):
|
||||
rgb = imgObject.getRGB()
|
||||
outRgb = align.alignImg('affine', args.size, rgb,
|
||||
landmarkIndices = landmarkIndices)
|
||||
landmarkIndices=landmarkIndices)
|
||||
if args.fallbackLfw and outRgb is None:
|
||||
nFallbacks += 1
|
||||
deepFunneled = "{}/{}.jpg".format(os.path.join(args.fallbackLfw,
|
||||
|
|
Loading…
Reference in New Issue