TensorMask

Last updated on Feb 19, 2021

TensorMask (R50, 1x)

Parameters 36 Million
FLOPs 504 Billion
File Size 139.74 MB
Training Data MS COCO
Training Resources 8 NVIDIA V100 GPUs
Training Time

Architecture ResNet, FPN, Focal Loss
Max Iter 90000
lr sched 1x
Backbone Layers 50
SHOW MORE
SHOW LESS
TensorMask (R50, 6x)

Parameters 36 Million
FLOPs 504 Billion
File Size 139.74 MB
Training Data MS COCO
Training Resources 8 NVIDIA V100 GPUs
Training Time

Architecture ResNet, FPN, Focal Loss
Max Iter 540000
lr sched 6x
Backbone Layers 50
SHOW MORE
SHOW LESS
README.md

Summary

TensorMask is a method for dense object segmentation which treats dense instance segmentation as a prediction task over 4D tensors, explicitly capturing this geometry and enabling novel operators on 4D tensors.

Installation

First install Detectron2 following the documentation and setup the dataset. Then compile the TensorMask-specific op (swap_align2nat):

pip install -e /path/to/detectron2/projects/TensorMask

Training

To train a model, run:

python /path/to/detectron2/projects/TensorMask/train_net.py --config-file <config.yaml>

For example, to launch TensorMask BiPyramid training (1x schedule) with ResNet-50 backbone on 8 GPUs, one should execute:

python /path/to/detectron2/projects/TensorMask/train_net.py --config-file configs/tensormask_R_50_FPN_1x.yaml --num-gpus 8

Evaluation

Model evaluation can be done similarly (6x schedule with scale augmentation):

python /path/to/detectron2/projects/TensorMask/train_net.py --config-file configs/tensormask_R_50_FPN_6x.yaml --eval-only MODEL.WEIGHTS /path/to/model_checkpoint

Citation

@InProceedings{chen2019tensormask,
  title={Tensormask: A Foundation for Dense Object Segmentation},
  author={Chen, Xinlei and Girshick, Ross and He, Kaiming and Doll{\'a}r, Piotr},
  journal={The International Conference on Computer Vision (ICCV)},
  year={2019}
}

Results

Object Detection on COCO minival

Object Detection
BENCHMARK MODEL METRIC NAME METRIC VALUE GLOBAL RANK
COCO minival TensorMask (R50, 6x) box AP 41.4 # 61
COCO minival TensorMask (R50, 1x) box AP 37.6 # 98
Instance Segmentation
BENCHMARK MODEL METRIC NAME METRIC VALUE GLOBAL RANK
COCO minival TensorMask (R50, 6x) mask AP 35.8 # 48
COCO minival TensorMask (R50, 1x) mask AP 32.4 # 55