Explorar o código

fix file reading

lyc8503 %!s(int64=4) %!d(string=hai) anos
pai
achega
bac057e6de
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      backend_refactor/service/photo/StandingPhotoAnalyzer.py

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

@@ -80,7 +80,7 @@ def analyse_npy_front(npy_front, height):
     }
     }
 
 
     result = []
     result = []
-    data = np.load(npy_front)[0]
+    data = npy_front
 
 
     result.append("------------------")
     result.append("------------------")
     result.append("正面分析内容如下:")
     result.append("正面分析内容如下:")
@@ -251,7 +251,7 @@ def analyse_npy_side(npy_side, height):
     }
     }
 
 
     result = []
     result = []
-    data = np.load(npy_side)[0]
+    data = npy_side
     h_pixel_eye2elbow = abs(data[15][1] - data[3][1])
     h_pixel_eye2elbow = abs(data[15][1] - data[3][1])
 
 
     h_real_eye2elbow = float(height) * 0.333
     h_real_eye2elbow = float(height) * 0.333