Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include faster implementation of mtcnn #865

Merged
merged 5 commits into from
Oct 19, 2023

Conversation

haddyadnan
Copy link
Contributor

MTCNN gives a performs well for face detection tasks but can be slow too
I've included another implementation of mtcnn repo which is quite faster than the standalone mtcnn. you can checkout their benchmark here here.

The bounding box returned is similar too
Result on the same image:
fastmtcnn -> [{'age': 29,
'region': {'x': 306, 'y': 458, 'w': 1035, 'h': 1381},
'face_confidence': 0.9994694590568542},
{'age': 34,
'region': {'x': 286, 'y': 844, 'w': 46, 'h': 55},
'face_confidence': 0.846997082233429}]

mtcnn -> [{'age': 29,
'region': {'x': 305, 'y': 457, 'w': 1036, 'h': 1378},
'face_confidence': 0.9993908405303955},
{'age': 32,
'region': {'x': 287, 'y': 844, 'w': 44, 'h': 52},
'face_confidence': 0.7173819541931152}]

Another example:
fastmtcnn -> [{'age': 25,
'region': {'x': 287, 'y': 136, 'w': 50, 'h': 68},
'face_confidence': 1.0},
{'age': 30,
'region': {'x': 36, 'y': 147, 'w': 40, 'h': 54},
'face_confidence': 0.9999947547912598},
{'age': 33,
'region': {'x': 383, 'y': 155, 'w': 33, 'h': 47},
'face_confidence': 0.9999902248382568},
{'age': 47,
'region': {'x': 204, 'y': 143, 'w': 39, 'h': 54},
'face_confidence': 0.9999575614929199},
{'age': 29,
'region': {'x': 121, 'y': 141, 'w': 51, 'h': 67},
'face_confidence': 0.9998831748962402}]

mtcnn -> [{'age': 25,
'region': {'x': 286, 'y': 134, 'w': 52, 'h': 71},
'face_confidence': 1.0},
{'age': 34,
'region': {'x': 384, 'y': 156, 'w': 31, 'h': 44},
'face_confidence': 0.9999959468841553},
{'age': 33,
'region': {'x': 36, 'y': 145, 'w': 40, 'h': 55},
'face_confidence': 0.999796450138092},
{'age': 45,
'region': {'x': 205, 'y': 143, 'w': 39, 'h': 53},
'face_confidence': 0.9995798468589783},
{'age': 28,
'region': {'x': 119, 'y': 139, 'w': 53, 'h': 70},
'face_confidence': 0.9993777275085449}]

PS: the order might differ

@serengil serengil merged commit cc5b18e into serengil:master Oct 19, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants