Skip to content

PatrickXYS/Reproduce_frcnn

Repository files navigation

Keras FRCNN for Object Detection

By Yao Xiao

Virginia Tech

This is a practical Faster RCNN's implementation based on Keras. For details you can read this paper: Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks

Requirements:

  1. Install Keras
  2. Python packages:
  • cython
  • opencv
  • numpy
  • matplotlib
  • scipy

Installation

Git clone the repository:

git clone https://github.com/PatrickXYS/Reproduce_frcnn.git

Use Pre-trained Model To Predict

Use pre-trained model to predict images. You can simply use command line under ./Reproduce_frcnn directory:

python test_frcnn.py -p ./img

If you want to use your own images, you can import your images into ./img directory. Then use the above command sentences.

Train Your Own Model

You need to first download Pascal_VOC dataset or COCO dataset from: ``

You need to put dataset under ./Reprouduce_frcnn directory

To train your own model, you can use vgg16, resnet50 or resnet101.

You need to put .h5 file under ./Reprouduce_frcnn directory

  • 1 Pascal_VOC dataset training:

      python train_frcnn.py -p ./VOCdevkit/
    
  • 2 COCO dataset training:

      python train_frcnn.py -p ./coco/
    

Prediction

After training you can check your results by running following commands:

python test_frcnn.py -p ./img

License and Citation

@article{He2015, author = {Kaiming He and Xiangyu Zhang and Shaoqing Ren and Jian Sun}, title = {Deep Residual Learning for Image Recognition}, journal = {arXiv preprint arXiv:1512.03385}, year = {2015} }

@inproceedings{renNIPS15fasterrcnn, Author = {Shaoqing Ren and Kaiming He and Ross Girshick and Jian Sun}, Title = {Faster {R-CNN}: Towards Real-Time Object Detection with Region Proposal Networks}, Booktitle = {Advances in Neural Information Processing Systems ({NIPS})}, Year = {2015} } }