File tree 1 file changed +5
-5
lines changed
webService/app/module_one
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -43,22 +43,22 @@ def allowed_file(filename):
43
43
44
44
def process_images (file , file2 ):
45
45
46
- face_match = False
46
+ _match = False
47
47
known_image = face_recognition .load_image_file (file )
48
48
unknown_image = face_recognition .load_image_file (file2 )
49
49
known_face_locations = face_recognition .face_locations (known_image )
50
50
unknown_face_locations = face_recognition .face_locations (unknown_image )
51
51
52
52
if len (known_face_locations ) == 0 :
53
53
result = {
54
- "faces-match " : face_match ,
54
+ "facesMatch " : _match ,
55
55
"error" : "no face found" ,
56
56
"code" : "500"
57
57
}
58
58
return jsonify (result )
59
59
elif len (unknown_face_locations ) == 0 :
60
60
result = {
61
- "faces-match " : face_match ,
61
+ "facesMatch " : _match ,
62
62
"error" : "no face found" ,
63
63
"code" : "500"
64
64
}
@@ -68,10 +68,10 @@ def process_images(file, file2):
68
68
unknown_face_encodings = face_recognition .face_encodings (unknown_image , unknown_face_locations )
69
69
match = face_recognition .compare_faces ([known_face_encodings ], unknown_face_encodings [0 ], 0.50 )
70
70
if match [0 ]:
71
- face_match = True
71
+ _match = True
72
72
# Return the result as json
73
73
result = {
74
- "faces-match " : face_match ,
74
+ "facesMatch " : _match ,
75
75
"error" : "" ,
76
76
"code" : "200"
77
77
}
You can’t perform that action at this time.
0 commit comments