Application of faster_rcnn in face recognition case
Setup by Franck FOTSO
This project aims to use the py_faster_rcnn tool to recognize face in real scene image. If your are interessed by the original project (python), please feel free to have a look here. We have setup a small dataset with only 24 classes, and launch a training with the VGG16 architecture. This repository involves all required files to launch a training or test process by your own. Indeed this page does not present the best model performance on our dataset, it just shows one more use case of the py_faster_rcnn project.
We have setup our own dataset (24 cls) based on pascal_voc schema. Required files are available here:
OS: Ubuntu 16.04 64 bit
GPU: Nvidia GTX 950M 4G
Cuda 8.0
CuDNN 3.0.8
Python 2.7.12
OpenCV 3.1.0
- Caffe prerequisites
- Python's packages (requirements.txt)
To install this project, please follow the steps below:
-
Download the repository:
$ cd /opt $ sudo git clone --recursive https://github.com/romyny/faster_rcnn_face.git $ cd faster_rcnn_face
-
Install all externals repositories required:
$ cd caffe-faster-rcnn
Adjust Makefile.config, then
$ sudo mkdir build $ cd build $ cmake .. $ make -j4 $ make install $ cd ../..
Install project's libs
$ cd libs $ make $ cd ..
-
Install python's packages required:
for req in $(cat caffe-faster-rcnn/requirements.txt); do pip install $req; done
Get the data and models required:
- Download the data and uncompress in 'data'
- person.24cls: Google Drive -> data/VOCdevkit2007
- Download the models and uncompress in 'data/person_models'
- person_models (VGG16): Google Drive -> data/person_models
- person_models (RestNet-101): coming soon
-
Run the demo:
$ cd $faster_rcnn_face_DIR $ python tools/demo.py
Note: this script will be performed on the test set
For help use the command: python tools/demo.py --help
-
Launch train & test process:
$ cd $faster_rcnn_face_DIR/experiments/scripts $ bash faster_rcnn_end2end_face.sh 0 VGG16 pascal_voc \ --set EXP_DIR person_24cls RNG_SEED 42 TRAIN.SCALES "[400,500,600,700]"
The model generated at the 30k^th iteration gives a mAP^0.5 = 0.7217
All results related to demo dataset will be saved at 'data/demo_out'
Please feel free to leave suggestions or comments to Franck FOTSO (romyny9096@gmail.com)