Skip to content

Repository files navigation

Faster RCNN Cpp

An implementation of Faster R-CNN with VGG16 backbone (https://arxiv.org/pdf/1506.01497.pdf) in libtorch.

Features

  • Supports PASCAL VOC 2007 and MS COCO 2017 datasets
  • Supports VGG16 backbone (from official torchvision model)
  • Supports ROI Pool and ROI Align modes
  • Supports PASCAL VOC 2007 and PASCAL VOC 2012 evaluation

Requirements

  • libtorch
  • torchvision
  • OpenCV
  • Boost

Build

cd faster-rcnn-cpp
cmake -S . -B build -DCMAKE_PREFIX_PATH=path_to_libtorch -DCMAKE_PREFIX_PATH=path_to_torchvision -DCMAKE_PREFIX_PATH=path_to_opencv -DCMAKE_PREFIX_PATH=path_to_boost
cmake --build build

Benchmark

PASCAL VOC 2007 (Train/Test: 07trainval/07test, non-difficult)

batch size: 1, lr: 0.00125, decay epoch: 9 12, total epoch: 12

ResNet50_FPNAPAP50
this0.4390.767
mmdet0.4370.769
ResNet50_FPN0.4380.768
VGG16mAP
this0.6798
Original Paper0.699
VGG16 (Pytorch)0.701

Todo

  • Implement the dataset transform with the interface of libtorch
  • Integrate evaluation into dataset and automatically run evaluation after test

Acknowledgement

This project is based on the following project:

About

An implementation of Faster R-CNN with VGG16 backbone in libtorch.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages