Python script for detecting faces in an image
Project description
FaceDetector
Python script for detecting faces in an image.
Installation
pip install facedetector-py
Usage
from facedetector import FaceDetector
img = 'path/to/image.jpg' # or NumPy array
faces = FaceDetector.detect(img)
print(faces)
Output:
[
{
'score': 0.9990496039390564,
'angle': -5.194428907734846,
'size': 73,
'pivot': (1960, 819),
'bounding_box': [(1920, 782), (1993, 775), (1999, 848), (1927, 855)],
'landmarks': {
'right_eye': (1949.1595, 809.30695),
'left_eye': (1970.3654, 808.0268),
'nose': (1963.1459, 819.6671),
'mouth_right': (1953.5267, 830.48206),
'mouth_left': (1968.4865, 829.6616),
'eyes_center': (1959, 808),
'mouth_center': (1961, 830),
'face_center': (1960, 819)
}
},
...
]
Test
pytest tests/
License
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
facedetector-py-0.0.1.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for facedetector_py-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d7362dbf296930d81dad6814cfe4290e2b7bae711b000c0c69f372a12bbf5f5 |
|
MD5 | da9db94980dc3e5e91a9a6b2dd9f8706 |
|
BLAKE2b-256 | b11df76f973f52bd78fb1f9194684580fbb558eead052c14b3a2fd8805ded330 |