资源算法maskrcnn_benchmark.cpp

maskrcnn_benchmark.cpp

2019-12-19 | |  49 |   0 |   0

maskrcnn_benchmark.cpp

Codacy Badge

faster rcnn cpp implementation based on maskrcnn-benchmark

Codes

All code architecture from maskrcnn-benchmark

Installation

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

datasets
  - coco
    - train2017
    - val2017
  - annotations
    - instances_val2017.json
    - instances_train2017.json

Results

Device:  RTX2080ti 1 GPU, cuda 10, cudnn 7, Ubuntu 16.04

ResNet

VoVNet

ResNets are 1x and VoVNets are 2x

backbonetypelr schedinference total batchinference time(s/im)box APSpeed Improvement
R-50-FPN(python)Fast1x80.059890.3680
R-50-FPN(cpp)Fast1x80.055200.3687.8%
R-101-FPN(python)Fast1x80.076270.3910
R-101-FPN(cpp)Fast1x80.071760.3915.9%
VoV-39(python)Fast2x80.064790.3980
VoV-39(cpp)Fast2x80.059490.3988.1%
VoV-57(python)Fast2x80.072240.4090
VoV-57(cpp)Fast2x80.067130.4097%

Warning

In Progress.

  • It doesn't support training yet.(Testing!)

TODO

  • concat dataset

  • python jit -> cpp model code

  • multi GPU training(code complete but bug exists in libtorch)

  • cmake install

  • clean up code

Requirements

  • Yaml-cpp

  • gtest

  • libtorch >= 1.2

  • rapidjson

  • opencv

MODELS

Download into /models

namefromlink
R-50(backbone only)python-pretrainedlink
R-101(backbone only)python-pretrainedlink
R-50-FPNpython-trainedlink
R-101-FPNpython-trainedlink
R-50-C4python-trainedlink
V-39-FPNpython-trainedlink
V-57-FPNpython-trainedlink


上一篇:maskrcnn-benchmark

下一篇:kaggle-open-images-2019-instance-segmentation

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...