https://github.com/cospectrum/scrfd
Efficient face detection using SCRFD.
https://github.com/cospectrum/scrfd
face-detection face-detector
Last synced: about 1 year ago
JSON representation
Efficient face detection using SCRFD.
- Host: GitHub
- URL: https://github.com/cospectrum/scrfd
- Owner: cospectrum
- License: apache-2.0
- Created: 2023-11-07T23:11:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-16T17:35:06.000Z (over 1 year ago)
- Last Synced: 2025-03-27T19:43:06.751Z (over 1 year ago)
- Topics: face-detection, face-detector
- Language: Python
- Homepage:
- Size: 17.4 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SCRFD
[![github]](https://github.com/cospectrum/scrfd)
[![ci]](https://github.com/cospectrum/scrfd/actions)
[github]: https://img.shields.io/badge/github-cospectrum/scrfd-8da0cb?logo=github
[ci]: https://github.com/cospectrum/scrfd/workflows/ci/badge.svg
Efficient face detection using SCRFD.
```sh
pip install scrfd
```
```python
from scrfd import SCRFD, Threshold
from PIL import Image
face_detector = SCRFD.from_path("./models/scrfd.onnx")
threshold = Threshold(probability=0.4)
image = Image.open("./images/solvay_conference_1927.png").convert("RGB")
faces = face_detector.detect(image, threshold=threshold)
for face in faces:
bbox = face.bbox
kps = face.keypoints
score = face.probability
print(f"{bbox=}, {kps=}, {score=}")
```