Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Keras implementation of Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. cloned from


  • Both theano and tensorflow backends are supported. However compile times are very high in theano, and tensorflow is highly recommended.
  • can be used to train a model. To train on WIDER face data, simply do: python -p /annotate.txt.
  • provides an alternative way to input data, using a text file. Simply provide a text file, with each line containing:

this file is already provided as annotate.txt You have to save all the images in All_Images folder if you want to save images at some different folder just make a small change in annotation file by changing the path to your images folder in create_txt function.(at the bottom of python file) filepath,x1,y1,x2,y2,class_name

For example:



The classes will be inferred from the file. To use the simple parser instead of the default pascal voc style parser,
use the command line option `-o simple`. For example `python -o simple -p my_data.txt`.
  • Running will write weights to disk to an hdf5 file, as well as all the setting of the training run to a pickle file. These settings can then be loaded by for any testing.

  • can be used to perform inference, given pretrained weights and a config file. Specify a path to the folder containing images: python -p /path/to/test_data/

  • Data augmentation can be applied by specifying --hf for horizontal flips, --vf for vertical flips and --rot for 90 degree rotations


  • contains all settings for the train or test run. The default settings match those in the original Faster-RCNN paper. The anchor box sizes are [128, 256, 512] and the ratios are [1:1, 1:2, 2:1].
  • The theano backend by default uses a 7x7 pooling region, instead of 14x14 as in the frcnn paper. This cuts down compiling time slightly.
  • The tensorflow backend performs a resize on the pooling region, instead of max pooling. This is much more efficient and has little impact on results.


  • If you get this error: ValueError: There is a negative shape in the graph!
    than update keras to the newest version

  • This repo was developed using python2. python3 should work thanks to the contribution of a number of users.

  • If you run out of memory, try reducing the number of ROIs that are processed simultaneously. Try passing a lower -n to Alternatively, try reducing the image size from the default value of 600 (this setting is found in


No description, website, or topics provided.




No releases published


No packages published