keras implementation of Faster R-CNN
Keras implementation of Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks.
cloned from https://github.com/yhenon/keras-frcnn/
train_frcnn.pycan be used to train a model. To train on Pascal VOC data, simply do:
python train_frcnn.py -p /path/to/pascalvoc/.
simple_parser.py provides an alternative way to input data, using a text file. Simply provide a text file, with each line containing:
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 train_frcnn.py -o simple -p my_data.txt.
train_frcnn.pywill write weights to disk to an hdf5 file, as well as all the setting of the training run to a
picklefile. These settings can then be loaded by
test_frcnn.pyfor any testing.
testfrcnn.py can be used to perform inference, given pretrained weights and a config file. Specify a path to the folder containing images: `python testfrcnn.py -p /path/to/test_data/`
Data augmentation can be applied by specifying
--hffor horizontal flips,
--vffor vertical flips and
--rotfor 90 degree rotations
If you get this error:
ValueError: There is a negative shape in the graph!
Make sure to use
python3. If you get this error:
TypeError: unorderable types: dict() < dict()you are using python3
If you run out of memory, try reducing the number of ROIs that are processed simultaneously. Try passing a lower
train_frcnn.py. Alternatively, try reducing the image size from the default value of 600 (this setting is found in
 Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks, 2015
 Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning, 2016