Spaces:
Running
Running
Fix Bugs
Browse files- .gitignore +1 -0
- app.py +1 -1
- helpers.py +1 -1
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
password.txt
|
app.py
CHANGED
@@ -42,7 +42,7 @@ def find_names(image):
|
|
42 |
names = []
|
43 |
for i in ids:
|
44 |
names.append(source_imgs[i].split("/")[-1].split(".")[0])
|
45 |
-
recognition(imgs, ids, names, source_faces)
|
46 |
return ",".join(names), "Recognition.jpg"
|
47 |
|
48 |
demo = gr.Interface(
|
|
|
42 |
names = []
|
43 |
for i in ids:
|
44 |
names.append(source_imgs[i].split("/")[-1].split(".")[0])
|
45 |
+
recognition(imgs, ids, names, source_faces, d, source_imgs)
|
46 |
return ",".join(names), "Recognition.jpg"
|
47 |
|
48 |
demo = gr.Interface(
|
helpers.py
CHANGED
@@ -31,7 +31,7 @@ def findCosineDistance(source_representation, test_representation):
|
|
31 |
c = np.sum(np.multiply(test_representation, test_representation))
|
32 |
return 1 - (a / (np.sqrt(b) * np.sqrt(c)))
|
33 |
|
34 |
-
def recognition(imgs, ids, names, source_faces):
|
35 |
cols = 4
|
36 |
rows = int(np.ceil(len(imgs)/2))
|
37 |
img_count = 0
|
|
|
31 |
c = np.sum(np.multiply(test_representation, test_representation))
|
32 |
return 1 - (a / (np.sqrt(b) * np.sqrt(c)))
|
33 |
|
34 |
+
def recognition(imgs, ids, names, source_faces, d, source_imgs):
|
35 |
cols = 4
|
36 |
rows = int(np.ceil(len(imgs)/2))
|
37 |
img_count = 0
|