Skip to content

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

Notifications You must be signed in to change notification settings

ReadWriteV/faster-rcnn-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a1a90bb · May 25, 2023

History

56 Commits
Mar 27, 2023
May 25, 2023
Mar 27, 2023
Mar 27, 2023
Mar 27, 2023
Mar 27, 2023
Oct 21, 2022
Oct 21, 2022
May 25, 2023
May 25, 2023
May 25, 2023
Mar 27, 2023
Mar 27, 2023
Mar 27, 2023
Nov 7, 2022

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_FPN AP AP50
this 0.439 0.767
mmdet 0.437 0.769
ResNet50_FPN 0.438 0.768
VGG16 mAP
this 0.6798
Original Paper 0.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

Watchers

Forks

Releases

No releases published

Packages

No packages published