Detectron2 Model Zoo and Baselines
Introduction
This file documents a large collection of baselines trained
with detectron2 in Sep-Oct, 2019.
All numbers were obtained on Big Basin
servers with 8 NVIDIA V100 GPUs & NVLink. The software in use were PyTorch 1.3, CUDA 9.2, cuDNN 7.4.2 or 7.6.3.
You can access these models from code using detectron2.model_zoo APIs.
In addition to these official baseline models, you can find more models in projects/.
How to Read the Tables
- The "Name" column contains a link to the config file. Running
tools/train_net.py
with this config file
and 8 GPUs will reproduce the model.
- Training speed is averaged across the entire training.
We keep updating the speed with latest version of detectron2/pytorch/etc.,
so they might be different from the metrics
file.
Training speed for multi-machine jobs is not provided.
- Inference speed is measured by
tools/train_net.py --eval-only
, or inference_on_dataset(),
with batch size 1 in detectron2 directly.
Measuring it with custom code may introduce other overhead.
Actual deployment in production should in general be faster than the given inference
speed due to more optimizations.
- The model id column is provided for ease of reference.
To check downloaded file integrity, any model on this page contains its md5 prefix in its file name.
- Training curves and other statistics can be found in
metrics
for each model.
Common Settings for COCO Models
-
All COCO models were trained on train2017
and evaluated on val2017
.
-
The default settings are not directly comparable with Detectron's standard settings.
For example, our default training data augmentation uses scale jittering in addition to horizontal flipping.
To make fair comparisons with Detectron's settings, see
Detectron1-Comparisons for accuracy comparison,
and benchmarks
for speed comparison.
-
For Faster/Mask R-CNN, we provide baselines based on 3 different backbone combinations:
- FPN: Use a ResNet+FPN backbone with standard conv and FC heads for mask and box prediction,
respectively. It obtains the best
speed/accuracy tradeoff, but the other two are still useful for research.
- C4: Use a ResNet conv4 backbone with conv5 head. The original baseline in the Faster R-CNN paper.
- DC5 (Dilated-C5): Use a ResNet conv5 backbone with dilations in conv5, and standard conv and FC heads
for mask and box prediction, respectively.
This is used by the Deformable ConvNet paper.
-
Most models are trained with the 3x schedule (~37 COCO epochs).
Although 1x models are heavily under-trained, we provide some ResNet-50 models with the 1x (~12 COCO epochs)
training schedule for comparison when doing quick research iteration.
ImageNet Pretrained Models
We provide backbone models pretrained on ImageNet-1k dataset.
These models have different format from those provided in Detectron: we do not fuse BatchNorm into an affine layer.
Pretrained models in Detectron's format can still be used. For example:
- X-152-32x8d-IN5k.pkl:
ResNeXt-152-32x8d model trained on ImageNet-5k with Caffe2 at FB (see ResNeXt paper for details on ImageNet-5k).
- R-50-GN.pkl:
ResNet-50 with Group Normalization.
- R-101-GN.pkl:
ResNet-101 with Group Normalization.
Torchvision's ResNet models can be used after converted by this script.
License
All models available for download through this document are licensed under the
Creative Commons Attribution-ShareAlike 3.0 license.
COCO Object Detection Baselines
Faster R-CNN:
RetinaNet:
Name |
lr sched |
train time (s/iter) |
inference time (s/im) |
train mem (GB) |
box AP |
model id |
download |
---|
R50 |
1x |
0.205 |
0.056 |
4.1 |
37.4 |
190397773 |
model | metrics |
R50 |
3x |
0.205 |
0.056 |
4.1 |
38.7 |
190397829 |
model | metrics |
R101 |
3x |
0.291 |
0.069 |
5.2 |
40.4 |
190397697 |
model | metrics |
RPN & Fast R-CNN:
COCO Instance Segmentation Baselines with Mask R-CNN
COCO Person Keypoint Detection Baselines with Keypoint R-CNN
COCO Panoptic Segmentation Baselines with Panoptic FPN
Name |
lr sched |
train time (s/iter) |
inference time (s/im) |
train mem (GB) |
box AP |
mask AP |
PQ |
model id |
download |
---|
R50-FPN |
1x |
0.304 |
0.053 |
4.8 |
37.6 |
34.7 |
39.4 |
139514544 |
model | metrics |
R50-FPN |
3x |
0.302 |
0.053 |
4.8 |
40.0 |
36.5 |
41.5 |
139514569 |
model | metrics |
R101-FPN |
3x |
0.392 |
0.066 |
6.0 |
42.4 |
38.5 |
43.0 |
139514519 |
model | metrics |
LVIS Instance Segmentation Baselines with Mask R-CNN
Mask R-CNN baselines on the LVIS dataset, v0.5.
These baselines are described in Table 3(c) of the LVIS paper.
NOTE: the 1x schedule here has the same amount of iterations as the COCO 1x baselines.
They are roughly 24 epochs of LVISv0.5 data.
The final results of these configs have large variance across different runs.
Cityscapes & Pascal VOC Baselines
Simple baselines for
- Mask R-CNN on Cityscapes instance segmentation (initialized from COCO pre-training, then trained on Cityscapes fine annotations only)
- Faster R-CNN on PASCAL VOC object detection (trained on VOC 2007 train+val + VOC 2012 train+val, tested on VOC 2007 using 11-point interpolated AP)
Other Settings
Ablations for Deformable Conv and Cascade R-CNN:
Ablations for normalization methods, and a few models trained from scratch following Rethinking ImageNet Pre-training.
(Note: The baseline uses 2fc
head while the others use 4conv1fc
head)
A few very large models trained for a long time, for demo purposes. They are trained using multiple machines: