https://github.com/eqs/pylibfacedetection
Python binding of libfacedetection
https://github.com/eqs/pylibfacedetection
Last synced: about 1 year ago
JSON representation
Python binding of libfacedetection
- Host: GitHub
- URL: https://github.com/eqs/pylibfacedetection
- Owner: eqs
- License: other
- Created: 2019-11-01T16:49:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-02T15:15:51.000Z (over 6 years ago)
- Last Synced: 2025-03-20T18:39:50.241Z (about 1 year ago)
- Language: Python
- Size: 22.5 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pylibfacedetection
[](https://pypi.python.org/pypi/pylibfacedetection)
[](https://travis-ci.com/eqs/pylibfacedetection)
`pylibfacedetection` is a Python binding of libfacedetection (https://github.com/ShiqiYu/libfacedetection).
# Usage
A minimal example:
```python
import cv2
from pylibfacedetection import FaceDetector
filepath = './path/to/image'
image = cv2.imread(filepath)
detector = FaceDetector()
results = detector.detect(image)
image_out = image.copy()
for result in results:
x, y, w, h, p, a = result
if p > 50:
cv2.rectangle(image_out, (x, y), (x + w, y + h),
(0, 255, 0), thickness=4)
print(results)
cv2.namedWindow('result', cv2.WINDOW_NORMAL)
cv2.imshow('result', image_out)
cv2.waitKey(0)
cv2.destroyAllWindows()
```
# Installation
```sh
pip install pylibfacedetection
```
# Licence
BSD
# Authors
eqs (https://www.eqseqs.work)