Skip to main content

Chehro

Chehro is a face detection library for python with a mediapipe backend. It is faster and more accurate comparing to the old HAARCASCADE Classifier way of face detection in python/OpenCV.

Tested on a picture of Elon Musk

Installation guide

From source

First of all, you have to clone this repository to your local machine:

git clone https://github.com/prp-e/chehro

Then, you move to the source directory and run:

pip3 install -e .

NOTE: In some systems(specially Linux based ones) pip3 might be just pip, since most of moderl Linux distributions just left Python2 behind.

From PyPi

In case you want this package to be installed using pip then just run this command:

pip3 install chehro

NOTE: In some systems(specially Linux based ones) pip3 might be just pip, since most of moderl Linux distributions just left Python2 behind.

How to use

First, create a new python environment or project. Then you easily can do this:

import cv2
from chehro import Chehro

image = cv2.imread('faces.jpg')
detector = Chehro(image)

result, bboxes = detector.detect()

# In case you might need no bounding box drawn around faces, just run it like this
result, bboxes = detector.detect(draw=False)

NOTE : detect() method returns a tuple made of an image (or the result) and a list of bounding boxed. All bounding boxes are normalized and you don't need to normalize it manually.

Metadata

Release files for chehro 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chehro 0.0.4
File Size Uploaded Provenance Actions
chehro-0.0.4.tar.gz 2.8 kB Without provenance Details for chehro-0.0.4.tar.gz

Release files / chehro-0.0.4.tar.gz

Download URL chehro-0.0.4.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3a3bffe8982fe10c9bf51fb7893bbcc5d7a4de4c97272900a6e9abd1b65df3aa
BLAKE2b-256 checksum
How to use checksums
c5af91dd7b6d93e5f1a04bb8af0a693cd8af628ef68a678e766ebef088e74e5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.6

Security for chehro 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page