export INSTALL_DIR=$PWD
git clone --recursive https://github.com/lsrock1/maskrcnn_benchmark.cpp.git
cd $INSTALL_DIR
// if opencv is not installed
// opencv install
cd maskrcnn_benchmark.cpp/lib/opencv
mkdir build
cd build
cmake ..
make install
// if yaml-cpp is not installed
// yaml-cpp install
cd $INSTALL_DIR
cd maskrcnn_benchmark.cpp/lib/yaml-cpp
mkdir build
cd build
cmake ..
make install
// Download pytorch cpp (cxx11 ABI)
// place libtorch folder in maskrcnn_benchmark.cpp/lib directory
// if you are using without cuda and get dyld: Library not loaded: @rpath/libmklml.dylib error
// https://github.com/pytorch/pytorch/issues/14165
cd $INSTALL_DIR
cd maskrcnn_benchmark.cpp
mkdir build
cd build
cmake ..
make
//run inference r50-fpn
run.out ../configs/e2e_faster_rcnn_R_50_FPN_1x.yaml inference
Datasets
Download coco datasets make directory under maskrcnn_benchmark.cpp