Skip to main content

Efficient face detection using SCRFD

Project description

SCRFD

github ci

Efficient face detection using SCRFD.

pip install scrfd
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.jpg").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=}")
face detection

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scrfd-0.3.0.tar.gz (8.7 MB view details)

Uploaded Source

Built Distribution

scrfd-0.3.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file scrfd-0.3.0.tar.gz.

File metadata

  • Download URL: scrfd-0.3.0.tar.gz
  • Upload date:
  • Size: 8.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.8

File hashes

Hashes for scrfd-0.3.0.tar.gz
Algorithm Hash digest
SHA256 35855c664d565492aab0068f1c64b4957a15ca6cd106b9c8b1642d67cfeeb5fc
MD5 badfe513673cb68fed26943f69ddc5ee
BLAKE2b-256 42cc6a993a455aaeae086bdc66dd0884cb1269a6e5c971614340e91fab46edfb

See more details on using hashes here.

File details

Details for the file scrfd-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: scrfd-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.8

File hashes

Hashes for scrfd-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b515d38fabd65c77603f730e72601994875d129d287f5bea73d6871c2ca6f5f
MD5 ca37e8e7ba758390e6b85a0437a9dc39
BLAKE2b-256 cbda49ea3ab1eec1d7ad7170b2f295022cb6cc1dfcda2024bba2f1b33c0bf683

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page