A face detection system with mediapipe backend.
Project description
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.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file chehro-0.0.4.tar.gz
.
File metadata
- Download URL: chehro-0.0.4.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a3bffe8982fe10c9bf51fb7893bbcc5d7a4de4c97272900a6e9abd1b65df3aa |
|
MD5 | f436a9bb4389d449d107ddab5722a9e3 |
|
BLAKE2b-256 | c5af91dd7b6d93e5f1a04bb8af0a693cd8af628ef68a678e766ebef088e74e5a |