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,
'pivot': (1960, 819),
'coordinates': [(1920, 782), (1993, 775), (1999, 848), (1927, 855)],
'bounding_box': {
'x': 1920,
'y': 775,
'width': 79,
'height': 80
},
'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.4.tar.gz
(4.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file facedetector-py-0.0.4.tar.gz.
File metadata
- Download URL: facedetector-py-0.0.4.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da320eeeff181b9db5c8a4c5bd85e98b43a0b8f84d76c2c8823e960fbe7ea7e9
|
|
| MD5 |
cda9e6b049b40efa5e3285bd2d33e4e8
|
|
| BLAKE2b-256 |
1d40210e1b38b315bcd84f20ce0f4582c38f81b2722d1b42937a7e7654d396c5
|
File details
Details for the file facedetector_py-0.0.4-py3-none-any.whl.
File metadata
- Download URL: facedetector_py-0.0.4-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8b9559d42003e5c851c935886661a32d8a60cb3d7f4f35e10a0dcd02ed8fab5
|
|
| MD5 |
1346513fe3e7b46acbe7b52f52d04206
|
|
| BLAKE2b-256 |
2b8e09e0867b4a27bfbc144ffd873d8071b0a7a9312afeb8cc428ba2a3439e8e
|