Spaces:
Running
Running
Josh Brown Kramer
commited on
Commit
·
c3f75db
1
Parent(s):
1a0eb3c
Switched to mediapipe
Browse files- align.py +4 -1
- requirements.txt +2 -1
- zombie.py +1 -1
align.py
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 1 |
import numpy as np
|
| 2 |
-
import
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
def get_locations(numpy_array,model_type="dlib"):
|
| 5 |
'''
|
|
|
|
| 1 |
import numpy as np
|
| 2 |
+
import mediapipe as mp
|
| 3 |
+
|
| 4 |
+
mp_face_detection = mp.solutions.face_detection
|
| 5 |
+
face_detection = mp_face_detection.FaceDetection(min_detection_confidence=0.5, model_selection=0)
|
| 6 |
|
| 7 |
def get_locations(numpy_array,model_type="dlib"):
|
| 8 |
'''
|
requirements.txt
CHANGED
|
@@ -3,4 +3,5 @@ onnxruntime-gpu
|
|
| 3 |
opencv-python
|
| 4 |
numpy
|
| 5 |
#face_recognition
|
| 6 |
-
dlib
|
|
|
|
|
|
| 3 |
opencv-python
|
| 4 |
numpy
|
| 5 |
#face_recognition
|
| 6 |
+
#dlib
|
| 7 |
+
mediapipe
|
zombie.py
CHANGED
|
@@ -67,7 +67,7 @@ def transition(path,model):
|
|
| 67 |
return get_concat_h(square,zombie)
|
| 68 |
|
| 69 |
def transition_onnx(rgb_image,model):
|
| 70 |
-
square,_ = align.align(rgb_image,enable_padding=False)
|
| 71 |
# if square is None:
|
| 72 |
# return None
|
| 73 |
|
|
|
|
| 67 |
return get_concat_h(square,zombie)
|
| 68 |
|
| 69 |
def transition_onnx(rgb_image,model):
|
| 70 |
+
square,_ = align.align(rgb_image,enable_padding=False,model_type="mediapipe")
|
| 71 |
# if square is None:
|
| 72 |
# return None
|
| 73 |
|