Spaces:
Runtime error
Runtime error
Testing
Browse files
app.py
CHANGED
@@ -109,7 +109,7 @@ def compare_face():
|
|
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)
|
113 |
# feature32 = np.frombuffer(feature1, dtype=np.float32, count=512)
|
114 |
|
115 |
similarity = ttv_compare_feature(feature1, feature2)
|
|
|
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)
|