Update app.py
Browse files
app.py
CHANGED
|
@@ -172,7 +172,7 @@ def recognize_face_optimal(image_path):
|
|
| 172 |
for name, data in ref.get().items():
|
| 173 |
known_encoding = np.array(data["encoding"])
|
| 174 |
similarity_score = face_recognition.face_distance([known_encoding], unknown_encoding[0])[0]
|
| 175 |
-
if similarity_score
|
| 176 |
continue
|
| 177 |
matches.append((name, similarity_score))
|
| 178 |
|
|
|
|
| 172 |
for name, data in ref.get().items():
|
| 173 |
known_encoding = np.array(data["encoding"])
|
| 174 |
similarity_score = face_recognition.face_distance([known_encoding], unknown_encoding[0])[0]
|
| 175 |
+
if similarity_score > 0.50: # Only consider matches above 50.00% similarity
|
| 176 |
continue
|
| 177 |
matches.append((name, similarity_score))
|
| 178 |
|