mahyarnajibi / fast-rcnn-torch

Fast R-CNN Torch Implementation
MIT License
134 stars 32 forks source link

Torch implementation of the Fast R-CNN

This is a torch implementation of the Fast R-CNN proposed by Girshick et .al. [1].

Requirements

Running the demo

For running the demo you only need to download the weights of the Fast R-CNN network. Please run ./scripts/get_frcnn_models.sh to get the trained Fast R-CNN models (currently AlexNet trained on VOC2007 trainval set). After downloading the weights file you can run the demo in the terminal as follows:

qlua demo.lua

After running this file you should see the following detections:

alt text

Training the Fast-RCNN network

For training the Fast R-CNN network, you should download the pre-trained models, object proposals, and the Pascal VOC dataset. You can download the pre-trained AlexNet model and object proposals for VOC by running ./scripts/get_imgnet_models.sh and ./scripts/get_proposals.sh. Please download the VOC Devkit training data as well.

Now you can train the model by calling th main_train.lua. However, you should specify the required options appropriately. For a list of complete options run th main_train.lua -help.

Testing the Fast-RCNN network

Currently, you need Matlab to use the VOC evaluation functions. Please download the VOC2007 test data if you want to test on the test set. You can test your trained model by running th main_test.lua and passing the required options: