CenterMask2

December 22, 2020 · View on GitHub

[CenterMask(original code)][vovnet-detectron2][arxiv] [BibTeX]

CenterMask2 is an upgraded implementation on top of detectron2 beyond original CenterMask based on maskrcnn-benchmark.

CenterMask : Real-Time Anchor-Free Instance Segmentation (CVPR 2020)
Youngwan Lee and Jongyoul Park
Electronics and Telecommunications Research Institute (ETRI)
pre-print : https://arxiv.org/abs/1911.06667

Highlights

  • First anchor-free one-stage instance segmentation. To the best of our knowledge, CenterMask is the first instance segmentation on top of anchor-free object detection (15/11/2019).
  • Toward Real-Time: CenterMask-Lite. This works provide not only large-scale CenterMask but also lightweight CenterMask-Lite that can run at real-time speed (> 30 fps).
  • State-of-the-art performance. CenterMask outperforms Mask R-CNN, TensorMask, and ShapeMask at much faster speed and CenterMask-Lite models also surpass YOLACT or YOLACT++ by large margins.
  • Well balanced (speed/accuracy) backbone network, VoVNetV2. VoVNetV2 shows better performance and faster speed than ResNe(X)t or HRNet.

Updates

  • CenterMask2 has been released. (20/02/2020)
  • Lightweight VoVNet has ben released. (26/02/2020)
  • Panoptic-CenterMask has been released. (31/03/2020)
  • code update for compatibility with pytorch1.7 and the latest detectron2 (22/12/2020)

Results on COCO val

Note

We measure the inference time of all models with batch size 1 on the same V100 GPU machine.

  • pytorch1.7.0
  • CUDA 10.1
  • cuDNN 7.3
  • multi-scale augmentation
  • Unless speficified, no Test-Time Augmentation (TTA)

CenterMask

MethodBackbonelr schedinference timemask APbox APdownload
Mask R-CNN (detectron2)R-503x0.05537.241.0model | metrics
Mask R-CNN (detectron2)V2-393x0.05239.343.8model | metrics
CenterMask (maskrcnn-benchmark)V2-393x0.07038.543.5link
CenterMask2V2-393x0.05039.744.2model | metrics
Mask R-CNN (detectron2)R-1013x0.07038.642.9model | metrics
Mask R-CNN (detectron2)V2-573x0.05839.744.2model | metrics
CenterMask (maskrcnn-benchmark)V2-573x0.07639.444.6link
CenterMask2V2-573x0.05840.545.1model | metrics
Mask R-CNN (detectron2)X-1013x0.12939.544.3model | metrics
Mask R-CNN (detectron2)V2-993x0.07640.344.9model | metrics
CenterMask (maskrcnn-benchmark)V2-993x0.10640.245.6link
CenterMask2V2-993x0.07741.446.0model | metrics
CenterMask2 (TTA)V2-993x-42.548.6model | metrics
  • TTA denotes Test-Time Augmentation (multi-scale test).

CenterMask-Lite

MethodBackbonelr schedinference timemask APbox APdownload
YOLACT550R-504x0.02328.230.3link
CenterMask (maskrcnn-benchmark)V-194x0.02332.435.9link
CenterMask2-LiteV-194x0.02332.835.9model | metrics
YOLACT550R-1014x0.03028.230.3link
YOLACT550++R-504x0.02934.1-link
YOLACT550++R-1014x0.03634.6-link
CenterMask (maskrcnn-benchmark)V-394x0.02736.340.7link
CenterMask2-LiteV-394x0.02836.740.9model | metrics
  • Note that The inference time is measured on Titan Xp GPU for fair comparison with YOLACT.

Lightweight VoVNet backbone

MethodBackboneParam.lr schedinference timemask APbox APdownload
CenterMask2-LiteMobileNetV23.5M4x0.02127.229.8model | metrics
CenterMask2-LiteV-1911.2M4x0.02332.835.9model | metrics
CenterMask2-LiteV-19-Slim3.1M4x0.02129.832.5model | metrics
CenterMask2-LiteV-19Slim-DW1.8M4x0.02027.129.5model | metrics
  • DW and Slim denote depthwise separable convolution and a thiner model with half the channel size, respectively.
  • Params. means the number of parameters of backbone.

Deformable VoVNet Backbone

MethodBackbonelr schedinference timemask APbox APdownload
CenterMask2V2-393x0.05039.744.2model | metrics
CenterMask2V2-39-DCN3x0.06140.345.1model | metrics
CenterMask2V2-573x0.05840.545.1model | metrics
CenterMask2V2-57-DCN3x0.07140.945.5model | metrics
CenterMask2V2-993x0.07741.446.0model | metrics
CenterMask2V2-99-DCN3x0.11042.046.9model | metrics
  • DCN denotes deformable convolutional networks v2. Note that we apply deformable convolutions from stage 3 to 5 in backbones.

Panoptic-CenterMask

MethodBackbonelr schedinference timemask APbox APPQdownload
Panoptic-FPNR-503x0.06340.036.541.5model | metrics
Panoptic-CenterMaskR-503x0.06341.437.342.0model | metrics
Panoptic-FPNV-393x0.06342.838.543.4model | metrics
Panoptic-CenterMaskV-393x0.06643.439.043.7model | metrics
Panoptic-FPNR-1013x0.07842.438.543.0model | metrics
Panoptic-CenterMaskR-1013x0.07643.539.043.6model | metrics
Panoptic-FPNV-573x0.07043.439.244.3model | metrics
Panoptic-CenterMaskV-573x0.07143.939.644.5model | metrics
Panoptic-CenterMaskV-993x0.09145.140.645.4model | metrics

Installation

All you need to use centermask2 is detectron2. It's easy!
you just install detectron2 following INSTALL.md.
Prepare for coco dataset following this instruction.

Training

ImageNet Pretrained Models

We provide backbone weights pretrained on ImageNet-1k dataset for detectron2.

To train a model, run

cd centermask2
python train_net.py --config-file "configs/<config.yaml>"

For example, to launch CenterMask training with VoVNetV2-39 backbone on 8 GPUs, one should execute:

cd centermask2
python train_net.py --config-file "configs/centermask/centermask_V_39_eSE_FPN_ms_3x.yaml" --num-gpus 8

Evaluation

Model evaluation can be done similarly:

  • if you want to inference with 1 batch --num-gpus 1
  • --eval-only
  • MODEL.WEIGHTS path/to/the/model.pth
cd centermask2
wget https://dl.dropbox.com/s/tczecsdxt10uai5/centermask2-V-39-eSE-FPN-ms-3x.pth
python train_net.py --config-file "configs/centermask/centermask_V_39_eSE_FPN_ms_3x.yaml" --num-gpus 1 --eval-only MODEL.WEIGHTS centermask2-V-39-eSE-FPN-ms-3x.pth

TODO

  • Adding Lightweight models
  • Applying CenterMask for PointRend or Panoptic-FPN.

Citing CenterMask

If you use VoVNet, please use the following BibTeX entry.

@inproceedings{lee2019energy,
  title = {An Energy and GPU-Computation Efficient Backbone Network for Real-Time Object Detection},
  author = {Lee, Youngwan and Hwang, Joong-won and Lee, Sangrok and Bae, Yuseok and Park, Jongyoul},
  booktitle = {Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops},
  year = {2019}
}

@inproceedings{lee2020centermask,
  title={CenterMask: Real-Time Anchor-Free Instance Segmentation},
  author={Lee, Youngwan and Park, Jongyoul},
  booktitle={CVPR},
  year={2020}
}

Special Thanks to

mask scoring for detectron2 by Sangrok Lee
FCOS_for_detectron2 by AdeliDet team.