Spaces:
Sleeping
Sleeping
Download faceDetect.py from Hoanha2101/FPTCheckInFastAPI: direct link, hf CLI and curl.
- Browser
- Download file 249 Bytes
-
https://huggingface.co/spaces/Hoanha2101/FPTCheckInFastAPI/resolve/main/faceDetect.py
- Command line
-
hf download hf://spaces/Hoanha2101/FPTCheckInFastAPI/faceDetect.py
-
curl -L -o faceDetect.py https://huggingface.co/spaces/Hoanha2101/FPTCheckInFastAPI/resolve/main/faceDetect.py
249 Bytes
| # from ultralytics import YOLO | |
| # modelYolo_path = "weights/yolov8n-face.pt" | |
| # faceDetector = YOLO(modelYolo_path) | |
| import cv2 | |
| # Khai báo Haarcascade face detector | |
| face_cascade = cv2.CascadeClassifier('weights/haarcascade_frontalface_default.xml') | |