Turing311 commited on
Commit
5415867
·
1 Parent(s): 01cd0a8
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -105,8 +105,10 @@ def compare_face():
105
  response.headers["Content-Type"] = "application/json; charset=utf-8"
106
  return response
107
 
108
- feature32_1 = feature1.view(dtype=np.float32) / np.linalg.norm(feature32)
109
- feature32_2 = feature2.view(dtype=np.float32) / np.linalg.norm(feature32)
 
 
110
  print('===========================', (1 + np.dot(feature32_1, feature32_2)) / 2)
111
  feature32 = np.frombuffer(feature1, dtype=np.float32, count=512)
112
 
 
105
  response.headers["Content-Type"] = "application/json; charset=utf-8"
106
  return response
107
 
108
+ feature32_1 = feature1.view(dtype=np.float32)
109
+ feature32_1 = feature32_1 / np.linalg.norm(feature32_1)
110
+ feature32_2 = feature2.view(dtype=np.float32)
111
+ feature32_2 = feature32_2 / np.linalg.norm(feature32_2)
112
  print('===========================', (1 + np.dot(feature32_1, feature32_2)) / 2)
113
  feature32 = np.frombuffer(feature1, dtype=np.float32, count=512)
114