Spaces:
Running
Running
update on 2023-09-17
Browse files
app.py
CHANGED
@@ -36,16 +36,7 @@ def image_search_performer(image, threshold=20.0, results=3):
|
|
36 |
|
37 |
image_array = np.array(image)
|
38 |
|
39 |
-
|
40 |
-
face = e[0]['face']
|
41 |
-
from PIL import Image
|
42 |
-
# im = Image.fromarray(face)
|
43 |
-
im = Image.fromarray((face * 255).astype(np.uint8))
|
44 |
-
im.save("your_file.jpeg")
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
face = DeepFace.represent(img_path = image_array, detector_backend='yolov8', model_name='Facenet512')[0]['embedding']
|
49 |
return search_performer(face, threshold, results)
|
50 |
|
51 |
|
|
|
36 |
|
37 |
image_array = np.array(image)
|
38 |
|
39 |
+
face = DeepFace.represent(img_path = image_array, detector_backend='retinaface', model_name='Facenet512')[0]['embedding']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
return search_performer(face, threshold, results)
|
41 |
|
42 |
|
face.db
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:22ba2f133e87e06271e946f66c0ca1181f4532d988c3cd26aaa1d78825d5faa3
|
3 |
+
size 624459072
|
face.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0863e6af425c7cb01621ec5d964997bdf3891c60358286ab909ee01ea5b2a07f
|
3 |
+
size 7798000
|
persons.zip
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 3720545
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1a9b76556a0b1b92013ec8d6513e1231afabe4a00339f34804547347b5783735
|
3 |
size 3720545
|