Face detection, face recognition and gender detection with OpenCV
Face detection. Face recognition. Gender detection.
Simple program that analyzes users from their every-day photos and detect them in real-time on the camera feed. Additional gender analysis is performed, too. Just for fun; based on OpenCV.
First you need to build the OpenCV
. Don't use brew
! We need to change configuration of OpenCV
contribution module. This can not be done with brew
. Hence, build everything manually. See build_opencv.sh
for more details.
Prerequisites:
cmake
ant
Use JDK17. Use JDK17. Use JDK17.
Run just train
to train users and gender data. Not all user raw images will be successfully processed, that is fine. More images you have, the better. Frontal face images only! Put them into the /user/<name>/raw
folder.
Photos used for genders training comes from AT&T dataset.
Run with just run
. JavaFX dialog opens. Wait for training data to load. Start camera (very first time it asks for permissions, then restart). Smile.
It's just me in the La La land. Yeah.