Skip to main content

A fast and simplified implementation of biubug6/Pytorch_Retinaface inference module

Project description

Tiny RetinaFace

ci python license

Tiny RetinaFace is a fast and simplified implementation of biubug6/Pytorch_Retinaface inference module

Installation

pip install tiny-retinaface

Usage

from retinaface import read_image, detect_faces

# Read image as RGB ndarray
image = read_image("images/test.jpg")

# Detect faces as list of Face objects
faces = detect_faces(image)

Face object

Face(
    score=0.9997380375862122,
    x=142,
    y=322,
    width=60,
    height=72,
    landmarks=[
        Point(x=160, y=348),
        Point(x=187, y=345),
        Point(x=177, y=362),
        Point(x=165, y=376),
        Point(x=188, y=374)
    ]
)

Tiny RetinaFace Results on World Largest Selfie

from retinaface import read_image_url, detect_faces, draw_faces

url = "https://github.com/yakhyo/retinaface-pytorch/blob/main/assets/large_selfi.jpg?raw=true"

image = read_image_url(url)
faces = detect_faces(image, score_threshold=0.1, nms_threshold=0.1)

draw_faces(image, faces, filename="images/results.jpg")

largest_selfie

Acknowledgements

References

@inproceedings{Deng2020CVPR,
title = {RetinaFace: Single-Shot Multi-Level Face Localisation in the Wild},
author = {Deng, Jiankang and Guo, Jia and Ververas, Evangelos and Kotsia, Irene and Zafeiriou, Stefanos},
booktitle = {CVPR},
year = {2020}
}

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

tiny_retinaface-0.1.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tiny_retinaface-0.1.0-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file tiny_retinaface-0.1.0.tar.gz.

File metadata

  • Download URL: tiny_retinaface-0.1.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tiny_retinaface-0.1.0.tar.gz
Algorithm Hash digest
SHA256 35cccab2c496157dac5351c37de760fd5203b300de7b3a1eb932b522d3988afc
MD5 574a1e51b01b5882ca38615b8ebd97d1
BLAKE2b-256 7cb45c9ebd825afbe65fe5fd037a71a38f4c9cf0f5ace64b823099961a2b0043

See more details on using hashes here.

Provenance

The following attestation bundles were made for tiny_retinaface-0.1.0.tar.gz:

Publisher: release.yaml on ddfabbro/tiny-retinaface

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tiny_retinaface-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tiny_retinaface-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d2e9b1973f55796286f7a8737dbdb22ba2c7c213c9a654f7199b97a0cf1d44e
MD5 ea1152eccefe83483883479af1cb9e29
BLAKE2b-256 3c33af42cb1c582acb3842ffc47c63331d32a1c8a52f60d5f40c62109430c158

See more details on using hashes here.

Provenance

The following attestation bundles were made for tiny_retinaface-0.1.0-py3-none-any.whl:

Publisher: release.yaml on ddfabbro/tiny-retinaface

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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