MTCNN face recognition
Implementation of the MTCNN face detection algorithm. This project converted the code from ipazc/mtcnn to TF Lite.
Installation
You can install the package through pip:
pip install mtcnn-tflite
Quick start
Similar to the original implementation, the following example illustrates the ease of use of this package:
>>> from mtcnn_tflite.MTCNN import MTCNN
>>> import cv2
>>>
>>> img = cv2.cvtColor(cv2.imread("ivan.jpg"), cv2.COLOR_BGR2RGB)
>>> detector = MTCNN()
>>> detector.detect_faces(img)
[
{
'box': [276, 88, 51, 68],
'confidence': 0.9989245533943176,
'keypoints': {
'left_eye': (291, 117),
'right_eye': (314, 114),
'nose': (303, 130),
'mouth_left': (296, 143),
'mouth_right': (314, 141)
}
}
]
Benchmark
| Image size | TF version | Process time * |
|---|---|---|
| 561x561 | TF2 | 698ms |
| 561x561 | This repository (TF Lite) | 445ms |
* executed on a CPU: Intel i7-10510U
License
Metadata
Release files for mtcnn-tflite 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mtcnn_tflite-0.0.4.tar.gz | 2.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mtcnn_tflite-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.5 MB
Release files / mtcnn_tflite-0.0.4.tar.gz
| Download URL | mtcnn_tflite-0.0.4.tar.gz |
|---|---|
| Size | 2.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb6337693fbd717c380c8d30e14a0835f584ca2fa00af9b3fd9745c4ecadd749
|
|
BLAKE2b-256 checksum How to use checksums |
0de5ac21dd01d7941be3e84f6e42f7fa5ad4822e55ce072db921ad47abe65657
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
|
Release files / mtcnn_tflite-0.0.4-py3-none-any.whl
| Download URL | mtcnn_tflite-0.0.4-py3-none-any.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fecf370f9487892f3c5a296546e784cd5b8bac4c6d043c7e895af8a136bfcb3a
|
|
BLAKE2b-256 checksum How to use checksums |
c60ee346624dc7098030f310b869f3fc718e376523eefa7dd4ac57116f37b70f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
|