cc1234 commited on
Commit
f4c2a7f
1 Parent(s): aad61cc

update on 2023-09-17

Browse files
Files changed (4) hide show
  1. app.py +1 -10
  2. face.db +2 -2
  3. face.json +2 -2
  4. persons.zip +1 -1
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
- e = DeepFace.extract_faces(image_array, detector_backend="yolov8")
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:900f4d05a8140712397993d8c15bcddd6fe9918868dfe34d25025b94729e7e49
3
- size 596021280
 
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:5b2fb086b8d3aad7f48b4c7717837a06a0c77fd4280f2567cf46153a8706c03c
3
- size 7438480
 
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:1b82f18eec507f082663a1f6be974caf941aa45ae172ab15da8272cd22e6a08d
3
  size 3720545
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a9b76556a0b1b92013ec8d6513e1231afabe4a00339f34804547347b5783735
3
  size 3720545