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

mtcnn optimization is input dependent #41

Closed
flyingmrwang opened this issue Jan 14, 2020 · 3 comments
Closed

mtcnn optimization is input dependent #41

flyingmrwang opened this issue Jan 14, 2020 · 3 comments

Comments

@flyingmrwang
Copy link

Your optimization of mtcnn is specifically designed for 720p input image. While other size may be scaled or padded to fit into 720p. The failure case may be an input of portrait rather than landscape. In this case, images are heavily squeezed and make it impossible to detect small faces. Is there any plan to make it input independent?

@jkjung-avt
Copy link
Owner

You are right. I've optimized MTCNN PNet based for 1280x720 image inputs, and it does not work very well for portrait inputs. But I don't plan to update the code to better support other cases for now. I think interested readers should be able to modify 'mtcnn/det1_relu.prototxt' and 'utils/mtcnn.py' by themselves.

In order to handle input images of multiple different input shapes, one might consider prebuilding TRT-PNet with a few different input shapes and select the best one at runtime.

@flyingmrwang
Copy link
Author

Actually, I am trying to find a face alignment model for efficient batch inference. Maybe mtcnn is not the best choice. Anyway, your demo helped me a lot.

@jkjung-avt
Copy link
Owner

Glad to hear that. Good luck with your own project.

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

No branches or pull requests

2 participants