This is a simple implementation of Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. I mainly referred to two repositories below.
- python 3.5.x
- pytorch 0.4.1
- tensorboardX
- opencv3
- pillow
- easydict
- matplotlib
- Training and testing on VOC
- ResNet-50
- ResNet-101
voc07+12trainval/voc07test
original/res101 | this/res101 | this/res50 |
---|---|---|
76.4 | 76.9 | 76.0 |
Running time: ~100ms(10FPS) on a GTX 1080
You can inspect the accuray of both foreground and background samples in RPN and RCNN
-
First clone the code
git clone https://github.com/tztztztztz/faster-rcnn.pytorch.git
-
Install dependencies
cd $PROJECT pip install -r requirements.txt
-
Compile
roi_pooling layer
andgpu_nms
cd $PROJECT/faster_rcnn sh make.sh
Please follow the instructions of this repository to prepare the data
Get the model ResNet-50 ResNet-101, and put it at $PROJECT/data/pretrained
folder. See more detail at ruotian/pytorch-resent
python train.py --cuda
python test.py --cuda
you can check the detection results with command below
python test.py --cuda --vis