资源算法mask-faster-rcnn

mask-faster-rcnn

2020-02-13 | |  33 |   0 |   0

pytorch-mask-rcnn

A pytorch implementation of Mask RCNN detection framework based on

This project supports single-GPU training of ResNet101-based Mask R-CNN (without FPN support). The purpose is to support the experiments in MAttNet, whose REFER dataset is a subset of COCO training portion. Thus our pre-trained model takes COCO_2014_train_minus_refer_valtest + COCO_2014_valminusminival images for training.

Prerequisites

  • Python 2.7

  • Pytorch 0.2 or higher

  • CUDA 8.0 or higher

  • requirements.txt

Preparation

  1. First of all, clone the code with refer API:

git clone --recursive https://github.com/lichengunc/mask-faster-rcnn
  1. Prepare data:

  • COCO: We use coco to name COCO's API as inheritance. Download the annotations and images into data/coco. Note the valminusminival and minival can be downloaded here.

git clone https://github.com/cocodataset/cocoapi data/coco
  • REFER: Follow the instructions in REFER to prepare the annotations for RefCOCO, RefCOCO+ and RefCOCOg.

git clone https://github.com/lichengunc/refer data/refer
  • ImageNet Weights: Find the resnet101-caffe download link from this repository, and download it as data/imagenet_weights/res101.pth.

  • coco_minus_refer: Make the coco_minus_refer annotation, which is to be saved as data/coco/annotations/instances_train_minus_refer_valtest2014.json

python tools/make_coco_minus_refer_instances.py

Compilation

As pointed out by ruotianluo/pytorch-faster-rcnn, choose the right -arch to compile the cuda code:

GPU modelArchitecture
TitanX (Maxwell/Pascal)sm_52
GTX 960Msm_50
GTX 1080 (Ti)sm_61
Grid K520 (AWS g2.2xlarge)sm_30
Tesla K80 (AWS p2.xlarge)sm_37

Compile the CUDA-based nms and roi_pooling using following simple commands:

cd lib
make

Training

Run by (notime as extra/tag)

./experiments/scripts/train_mask_rcnn_notime.sh 0 refcoco res101 notime
  • Train on COCO 2014 trainval35k minus refer_valtest, and test on minival (800k/1250k), 35.8 on detection and 30.7 on segmentation (nms).

Checking the training process by calling tensorboard, and check it at server.cs.unc.edu:port_number

tensorboard --logdir tensorboard/res101 --port=port_number

Evaluation

Run by (notime as extra/tag)

./experiments/scripts/test_mask_rcnn_notime.sh 0 refcoco res101 notime

Detection Comparison:

  • Compared with Faster R-CNN trained/evaluated on the same images.

DetectionAPAP50AP75
Faster R-CNN34.153.736.8
Our Mask R-CNN35.855.338.6

Segmentation Comparison:

  • We compare with Mask R-CNN implementation. Note this comparison is slightly unfair to ours, due to

  • We have fewer (~6,500) training images.

  • Our training is single GPU.

  • The shorter border length in our model is 600px instead of 800px.

SegmentationAPAP50AP75
Original Mask R-CNN32.754.234.0
Our Mask R-CNN30.752.332.4

Pretrained Model

We provide the model we used in MAttNet for mask comprehension.

Download and put the downloaded .pth and .pkl files into output/res101/coco_2014_train_minus_refer_valtest+coco_2014_valminusminival/notime

Demo

  • Follow the ipython notebook of test/check_model.ipynb to test our model.


上一篇:Chainer_Mask_R-CNN

下一篇:siamese-mask-rcnn

用户评价
全部评价

热门资源

  • 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...