Packaged version YOLOv5 Face Detector
Project description
Yolov5 Face Detection
Description
The project is a wrap over yolov5-face repo. Made simple portable interface for model import and inference. Model detects faces on images and returns bounding boxes and coordinates of 5 facial keypoints, which can be used for face alignment.
Installation
pip install yolov5facedetector
Usage example
from yolov5facedetector.face_detector import YoloDetector
import numpy as np
from PIL import Image
model = YoloDetector(target_size=720,gpu=0,min_face=90)
rgb_array_img = np.array(Image.open('test_image.jpg')) # Will make RGB Numpy Array Image
bboxes, confs, points = model.predict(rgb_array_img)
You can also pass several images packed in a list to get multi-image predictions.
bboxes, confs, points = model.predict([image1,image2])
Other pretrained models
Currently Support YOLOv5 type n,m & l type of model from yolov5-face repo. Default model type is 'yolov5n' but you can change to m & l (larger model version) which is auto download when first time used
Example below:
model = YoloFace(yolo_type='yolov5l',target_size=720) # Will download weight file automatically
bboxes, confs, points = model.predict(rgb_array_img)
Result example
Citiation
Thanks to deepcam-cn for pretrained models and Rebrikov Artem for providing wrapper function of YOLOv5Face.
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
Built Distribution
File details
Details for the file yolov5facedetector-1.0.1.tar.gz
.
File metadata
- Download URL: yolov5facedetector-1.0.1.tar.gz
- Upload date:
- Size: 164.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d866867b6ceb6ea7cdb008ed6ab73f6fa83d87b0c3648b5eca0dc57239fd8951 |
|
MD5 | 0af15424e1240373084441fabc27151f |
|
BLAKE2b-256 | 39f68962897a635a5473e91ea5c47600788110adedd9d90ef09ec05a692e9347 |
File details
Details for the file yolov5facedetector-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: yolov5facedetector-1.0.1-py3-none-any.whl
- Upload date:
- Size: 95.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b72fc579b8a1f40b8a64668a8c03bc07365c86c918db12459cc1c6bda37dd88 |
|
MD5 | cff74e233f232caf81c77f11944d062f |
|
BLAKE2b-256 | a1962769095ed7285039671223652fc8a1af849651eaf45b88886417e35466cc |