Jamshaid89
commited on
Commit
•
7cf8e2a
1
Parent(s):
5f0e788
Fixed threshold error
Browse files
app.py
CHANGED
@@ -11,7 +11,6 @@ client = MongoClient(uri)
|
|
11 |
db = client["Face_identification"]
|
12 |
identities_collection = db["face_identities"]
|
13 |
model_name="Facenet"
|
14 |
-
threshold = findThreshold(model_name , "cosine")
|
15 |
debug=False
|
16 |
|
17 |
def save_identity(image , name):
|
@@ -53,6 +52,8 @@ def findThreshold(model_name, distance_metric):
|
|
53 |
|
54 |
return threshold
|
55 |
|
|
|
|
|
56 |
def predict_image(image):
|
57 |
if debug:
|
58 |
print("1")
|
|
|
11 |
db = client["Face_identification"]
|
12 |
identities_collection = db["face_identities"]
|
13 |
model_name="Facenet"
|
|
|
14 |
debug=False
|
15 |
|
16 |
def save_identity(image , name):
|
|
|
52 |
|
53 |
return threshold
|
54 |
|
55 |
+
threshold = findThreshold(model_name , "cosine")
|
56 |
+
|
57 |
def predict_image(image):
|
58 |
if debug:
|
59 |
print("1")
|