Caffe Model to detect Gender
Models can be downloaded from here
- age_gender_mean.t7
- haarcascade_frontalface_default.xml
- deploy_gender.prototxt
- gender_net.caffemodel
- mean.binaryproto
- Caffe Installation here
- Torch Installation with Luahere
- Other installations (Run 'luarocks install dpnn', 'pip install lutorpy')
- Download the trained model zip file from the link above and unzip the file
- Put all the model files in folder 'models'
- keep the codes and 'models' in the same location
- Make sure Camera is connected as USBID is 0(default)
- To check different implementation, run the following codes
- python gender_demo_lua.py : Python wrapper to run Lua code, fastest code
- th gender_demo_torch.lua : Lua code to detect gender, best accuracy
- python gender_demo_caffe.py : Caffe code, slower
https://github.com/szagoruyko/torch-opencv-demos/blob/master/age_gender/demo.lua
-
http://www.openu.ac.il/home/hassner/projects/cnn_agegender/cnn_age_gender_models_and_data.0.0.2.zip
-
As far as speed is concerned, you can check a discussion over here. GilLevi/AgeGenderDeepLearning#6
-
The subtraction from the mean is a way of normalization, please find a detailed answer here http://stats.stackexchange.com/a/220970