From 434dc1ca9f55def4e02cb29cd654c3a191f0242c Mon Sep 17 00:00:00 2001 From: Brandon Amos Date: Thu, 7 Jan 2016 18:43:25 -0500 Subject: [PATCH] Fix flake8 warnings. --- api-docs/conf.py | 8 ++++---- demos/web/websocket-server.py | 2 +- evaluation/lfw.py | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api-docs/conf.py b/api-docs/conf.py index f761bf4..5a75d9b 100644 --- a/api-docs/conf.py +++ b/api-docs/conf.py @@ -6,10 +6,6 @@ import os sys.path.insert(0, os.path.abspath('..')) -def setup(app): - app.add_javascript("sp.js") - app.add_javascript("track.js") - MOCK_MODULES = ['argparse', 'cv2', 'dlib', 'numpy', 'pandas'] for mod_name in MOCK_MODULES: sys.modules[mod_name] = mock.MagicMock() @@ -46,6 +42,10 @@ pygments_style = 'sphinx' todo_include_todos = True +def setup(app): + app.add_javascript("sp.js") + app.add_javascript("track.js") + # html_theme = 'alabaster' html_theme = 'sphinx_rtd_theme' html_static_path = ['_static'] diff --git a/demos/web/websocket-server.py b/demos/web/websocket-server.py index 4993429..7e380af 100755 --- a/demos/web/websocket-server.py +++ b/demos/web/websocket-server.py @@ -271,7 +271,7 @@ class OpenFaceServerProtocol(WebSocketServerProtocol): for bb in bbs: # print(len(bbs)) landmarks = align.findLandmarks(rgbFrame, bb) - alignedFace = align.align(args.imgDim, rgbImg, bb, + alignedFace = align.align(args.imgDim, rgbFrame, bb, landmarks=landmarks, landmarkIndices=openface.AlignDlib.OUTER_EYES_AND_NOSE) if alignedFace is None: diff --git a/evaluation/lfw.py b/evaluation/lfw.py index 4fe957b..ec853eb 100755 --- a/evaluation/lfw.py +++ b/evaluation/lfw.py @@ -219,6 +219,7 @@ def plotOpenFaceROC(workDir, plotFolds=True, color=None): AUC = getAUC(fprs, tprs) return foldPlot, meanPlot, AUC + def plotClassifyExp(workDir): print("Plotting.")