LeoDu 4 years ago
parent
commit
63198636cf

+ 1 - 1
backend_refactor/route/analyze.py

@@ -30,7 +30,7 @@ def callback_generator(task_uuid):
 def photo_analysis():
     req = request.get_json()
     
-    ana = StandingPhotoAnalyzer(req['front'], req['right'])
+    ana = StandingPhotoAnalyzer(req['front'], req['right'], req['height'])
 
     task_uuid = str(uuid.uuid4())
     new_task = Task(task_uuid, 'PHOTO_STANDINGPOSE')

+ 2 - 2
backend_refactor/service/photo/StandingPhotoAnalyzer.py

@@ -1,7 +1,7 @@
 import math
 from typing import Callable
 
-from service.photo import BasePhotoAnalyzer
+from service.photo.BasePhotoAnalyzer import BasePhotoAnalyzer
 
 import cv2
 import matplotlib.pyplot as plt
@@ -350,7 +350,7 @@ class StandingPhotoAnalyzer(BasePhotoAnalyzer):
 
     def __init__(self, *args):
         super().__init__()
-        assert len(self.args) == 3, "Invalid arguments: expect 2 photo uuids and height."
+        assert len(args) == 3, "Invalid arguments: expect 2 photo uuids and height."
         self.args = args[:2]
         self.height = args[2]