Spaces:
Build error
Build error
File size: 338 Bytes
a9640c3 |
1 2 3 4 5 6 7 8 9 10 11 |
from faceNet.faceDetection import MPFaceDetection
from faceNet.faceNet import FaceNet
import numpy as np
def detect_face(image: np.array) -> np.array:
facenet = FaceNet(
detector = MPFaceDetection(),
onnx_model_path = "models/faceNet.onnx",
force_cpu = True,
)
return facenet.detect_save_faces(image) |