oarriaga / face_classification

Real-time face detection and emotion/gender classification using fer2013/imdb datasets with a keras CNN model and openCV.
MIT License
5.61k stars 1.59k forks source link

Why whoever is predicted to "man" ? #29

Closed Jinkeycode closed 7 years ago

Jinkeycode commented 7 years ago

When I run your model,I get this result: predicted_test_image

rather than your example: robocup_team

oarriaga commented 7 years ago

I believe you might be using an incorrect set of models. As far as I can remember it should give the same image just by performing the image_demo script on the test image. If not, there is a variable in the code called "offset". Which refers to the bounding boxes size offsets before resizing them and passing them forward trough the network. This has to be dynamically changed in accordance to the bounding box dimensions (bigger boxes need bigger offsets and smaller boxes need smaller offsets) and I haven't had the time to do it. Consequently, changing that variable to zero when running this image might give the proper result.