Turing311 commited on
Commit
4a8f480
·
1 Parent(s): 7328f2e
Files changed (1) hide show
  1. app.py +0 -7
app.py CHANGED
@@ -104,13 +104,6 @@ def compare_face():
104
  response.status_code = 200
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
- sim_2 = (1 + np.dot(feature32_1, feature32_2)) / 2
113
- # feature32 = np.frombuffer(feature1, dtype=np.float32, count=512)
114
 
115
  similarity = ttv_compare_feature(feature1, feature2)
116
  if similarity > 0.7:
 
104
  response.status_code = 200
105
  response.headers["Content-Type"] = "application/json; charset=utf-8"
106
  return response
 
 
 
 
 
 
 
107
 
108
  similarity = ttv_compare_feature(feature1, feature2)
109
  if similarity > 0.7: