Application of faster_rcnn in logo detection case
Setup by Franck FOTSO
This project aims to use the py_faster_rcnn tool to detect logo 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 20 classes, and launch a training with the VGG16 architecture. This repository involves all required files to launch a train or test process by your own.
We have setup our own dataset (20 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_logo.git $ cd faster_rcnn_logo
-
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'
- logo.20cls: Google Drive -> data/VOCdevkit2007
- Download the models and uncompress in 'data/logo_models'
- logo_models (VGG16): Google Drive -> data/logo_models
- logo_models (RestNet-101): coming soon
-
Run the demo:
$ cd $faster_rcnn_logo_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_logo_DIR/experiments/scripts $ bash faster_rcnn_end2end_logo.sh 0 VGG16 pascal_voc \ --set EXP_DIR logo_20cls RNG_SEED 42 TRAIN.SCALES "[400,500,600,700]"
The model generated at the 30kth iteration gives a mAP^0.5 = 0.7408
All results related to demo dataset will be saved at 'data/demo_out'
Please feel free to leave suggestions or comments to Franck FOTSO ([email protected])