Skip to content

Commit 3e26931

Browse files
authored
Release of v2.23.0
Release of v2.23.0
2 parents 6b87ac2 + bab144c commit 3e26931

File tree

113 files changed

+4169
-406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+4169
-406
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ jobs:
265265
- name: Build and install
266266
run: pip install -e .
267267
- name: Run unittests
268-
run: coverage run --branch --source mmdet -m pytest tests -sv
268+
run: coverage run --branch --source mmdet -m pytest tests
269269
- name: Generate coverage report
270270
run: |
271271
coverage xml

README.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
<img src="resources/mmdet-logo.png" width="600"/>
33
<div>&nbsp;</div>
44
<div align="center">
5-
<b><font size="5">OpenMMLab website</font></b>
5+
<b>OpenMMLab website</b>
66
<sup>
77
<a href="https://openmmlab.com">
8-
<i><font size="4">HOT</font></i>
8+
<i>HOT</i>
99
</a>
1010
</sup>
1111
&nbsp;&nbsp;&nbsp;&nbsp;
12-
<b><font size="5">OpenMMLab platform</font></b>
12+
<b>OpenMMLab platform</b>
1313
<sup>
1414
<a href="https://platform.openmmlab.com">
15-
<i><font size="4">TRY IT OUT</font></i>
15+
<i>TRY IT OUT</i>
1616
</a>
1717
</sup>
1818
</div>
@@ -74,11 +74,11 @@ This project is released under the [Apache 2.0 license](LICENSE).
7474

7575
## Changelog
7676

77-
**2.22.0** was released in 24/2/2022:
77+
**2.23.0** was released in 28/3/2022:
7878

79-
- Support [MaskFormer](configs/maskformer), [DyHead](configs/dyhead), [OpenImages Dataset](configs/openimages) and [TIMM backbone](configs/timm_example)
80-
- Support visualization for Panoptic Segmentation
81-
- Release a good recipe of using ResNet in object detectors pre-trained by [ResNet Strikes Back](https://arxiv.org/abs/2110.00476), which consistently brings about 3~4 mAP improvements over RetinaNet, Faster/Mask/Cascade Mask R-CNN
79+
- Support [Mask2Former](configs/mask2former) and [EfficientNet](configs/efficientnet)
80+
- Support setting data root through environment variable `MMDET_DATASETS`, users don't have to modify the corresponding path in config files anymore.
81+
- Find a good recipe for fine-tuning high precision ResNet backbone pre-trained by Torchvision.
8282

8383
Please refer to [changelog.md](docs/en/changelog.md) for details and release history.
8484

@@ -164,6 +164,7 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
164164
<ul>
165165
<li><a href="configs/panoptic_fpn">Panoptic FPN (CVPR'2019)</a></li>
166166
<li><a href="configs/maskformer">MaskFormer (NeurIPS'2021)</a></li>
167+
<li><a href="configs/mask2former">Mask2Former (ArXiv'2021)</a></li>
167168
</ul>
168169
</td>
169170
<td>
@@ -228,6 +229,7 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
228229
<li><a href="configs/swin">Swin (CVPR'2021)</a></li>
229230
<li><a href="configs/pvt">PVTv2 (ArXiv'2021)</a></li>
230231
<li><a href="configs/resnet_strikes_back">ResNet strikes back (ArXiv'2021)</a></li>
232+
<li><a href="configs/efficientnet">EfficientNet (ArXiv'2021)</a></li>
231233
</ul>
232234
</td>
233235
<td>

README_zh-CN.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ MMDetection 是一个基于 PyTorch 的目标检测开源工具箱。它是 [Ope
7373

7474
## 更新日志
7575

76-
最新的 **2.22.0** 版本已经在 2022.02.24 发布:
76+
最新的 **2.23.0** 版本已经在 2022.03.28 发布:
7777

78-
- 支持 [MaskFormer](configs/maskformer)[DyHead](configs/dyhead)[OpenImages Dataset](configs/openimages) [TIMM backbone](configs/timm_example)
79-
- 支持全景分割可视化
80-
- 发布了一个在目标检测任务中使用 ResNet 的好方法,它是由 [ResNet Strikes Back](https://arxiv.org/abs/2110.00476) 预训练的,并且能稳定的在 RetinaNet, Faster/Mask/Cascade Mask R-CNN 上带来约 3-4 mAP 的提升
78+
- 支持 [Mask2Former](configs/mask2former) [Efficientnet](configs/efficientnet)
79+
- 支持通环境变量 `MMDET_DATASETS` 设置数据根目录,因此无需修改配置文件中对应的路径。
80+
- 发现一个很好的方法来微调由 Torchvision 预训练的高精度 ResNet 主干。
8181

82-
如果想了解更多版本更新细节和历史信息,请阅读[更新日志](docs/changelog.md)
82+
如果想了解更多版本更新细节和历史信息,请阅读[更新日志](docs/en/changelog.md)
8383

8484
如果想了解 MMDetection 不同版本之间的兼容性, 请参考[兼容性说明文档](docs/zh_cn/compatibility.md)
8585

@@ -162,6 +162,8 @@ MMDetection 是一个基于 PyTorch 的目标检测开源工具箱。它是 [Ope
162162
<td>
163163
<ul>
164164
<li><a href="configs/panoptic_fpn">Panoptic FPN (CVPR'2019)</a></li>
165+
<li><a href="configs/maskformer">MaskFormer (NeurIPS'2021)</a></li>
166+
<li><a href="configs/mask2former">Mask2Former (ArXiv'2021)</a></li>
165167
</ul>
166168
</td>
167169
<td>
@@ -226,6 +228,7 @@ MMDetection 是一个基于 PyTorch 的目标检测开源工具箱。它是 [Ope
226228
<li><a href="configs/swin">Swin (CVPR'2021)</a></li>
227229
<li><a href="configs/pvt">PVTv2 (ArXiv'2021)</a></li>
228230
<li><a href="configs/resnet_strikes_back">ResNet strikes back (ArXiv'2021)</a></li>
231+
<li><a href="configs/efficientnet">EfficientNet (ArXiv'2021)</a></li>
229232
</ul>
230233
</td>
231234
<td>

configs/efficientnet/README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# EfficientNet
2+
3+
> [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://arxiv.org/abs/1905.11946v5)
4+
5+
<!-- [BACKBONE] -->
6+
7+
## Introduction
8+
9+
Convolutional Neural Networks (ConvNets) are commonly developed at a fixed resource budget, and then scaled up for better accuracy if more resources are available. In this paper, we systematically study model scaling and identify that carefully balancing network depth, width, and resolution can lead to better performance. Based on this observation, we propose a new scaling method that uniformly scales all dimensions of depth/width/resolution using a simple yet highly effective compound coefficient. We demonstrate the effectiveness of this method on scaling up MobileNets and ResNet.
10+
11+
To go even further, we use neural architecture search to design a new baseline network and scale it up to obtain a family of models, called EfficientNets, which achieve much better accuracy and efficiency than previous ConvNets. In particular, our EfficientNet-B7 achieves state-of-the-art 84.3% top-1 accuracy on ImageNet, while being 8.4x smaller and 6.1x faster on inference than the best existing ConvNet. Our EfficientNets also transfer well and achieve state-of-the-art accuracy on CIFAR-100 (91.7%), Flowers (98.8%), and 3 other transfer learning datasets, with an order of magnitude fewer parameters.
12+
13+
## Results and Models
14+
15+
### RetinaNet
16+
17+
| Backbone | Style | Lr schd | Mem (GB) | Inf time (fps) | box AP | Config | Download |
18+
| :-------------: | :-----: | :-----: | :------: | :------------: | :----: | :------: | :--------: |
19+
|Efficientnet-b3 | pytorch | 1x | - | - | 40.5 |[config](https://github.com/open-mmlab/mmdetection/tree/master/configs/efficientnet/retinanet_effb3_fpn_crop896_8x4_1x_coco.py) | [model]() &#124; [log]() |
20+
21+
## Citation
22+
23+
```latex
24+
@article{tan2019efficientnet,
25+
title={Efficientnet: Rethinking model scaling for convolutional neural networks},
26+
author={Tan, Mingxing and Le, Quoc V},
27+
journal={arXiv preprint arXiv:1905.11946},
28+
year={2019}
29+
}
30+
```

configs/efficientnet/metafile.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Models:
2+
- Name: retinanet_effb3_fpn_crop896_8x4_1x_coco
3+
In Collection: RetinaNet
4+
Config: configs/efficientnet/retinanet_effb3_fpn_crop896_8x4_1x_coco.py
5+
Metadata:
6+
Epochs: 12
7+
Results:
8+
- Task: Object Detection
9+
Dataset: COCO
10+
Metrics:
11+
box AP: 40.5
12+
Weights: url
13+
Paper:
14+
URL: https://arxiv.org/abs/1905.11946v5
15+
Title: 'EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks'
16+
README: configs/efficientnet/README.md
17+
Code:
18+
URL: https://github.com/open-mmlab/mmdetection/blob/v2.23.0/mmdet/models/backbones/efficientnet.py#L159
19+
Version: v2.23.0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
_base_ = [
2+
'../_base_/models/retinanet_r50_fpn.py',
3+
'../_base_/datasets/coco_detection.py', '../_base_/default_runtime.py'
4+
]
5+
6+
cudnn_benchmark = True
7+
norm_cfg = dict(type='BN', requires_grad=True)
8+
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/efficientnet/efficientnet-b3_3rdparty_8xb32-aa_in1k_20220119-5b4887a0.pth' # noqa
9+
model = dict(
10+
backbone=dict(
11+
_delete_=True,
12+
type='EfficientNet',
13+
arch='b3',
14+
drop_path_rate=0.2,
15+
out_indices=(3, 4, 5),
16+
frozen_stages=0,
17+
norm_cfg=dict(
18+
type='SyncBN', requires_grad=True, eps=1e-3, momentum=0.01),
19+
norm_eval=False,
20+
init_cfg=dict(
21+
type='Pretrained', prefix='backbone', checkpoint=checkpoint)),
22+
neck=dict(
23+
in_channels=[48, 136, 384],
24+
start_level=0,
25+
out_channels=256,
26+
relu_before_extra_convs=True,
27+
no_norm_on_lateral=True,
28+
norm_cfg=norm_cfg),
29+
bbox_head=dict(type='RetinaSepBNHead', num_ins=5, norm_cfg=norm_cfg),
30+
# training and testing settings
31+
train_cfg=dict(assigner=dict(neg_iou_thr=0.5)))
32+
33+
# dataset settings
34+
img_norm_cfg = dict(
35+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
36+
img_size = (896, 896)
37+
train_pipeline = [
38+
dict(type='LoadImageFromFile'),
39+
dict(type='LoadAnnotations', with_bbox=True),
40+
dict(
41+
type='Resize',
42+
img_scale=img_size,
43+
ratio_range=(0.8, 1.2),
44+
keep_ratio=True),
45+
dict(type='RandomCrop', crop_size=img_size),
46+
dict(type='RandomFlip', flip_ratio=0.5),
47+
dict(type='Normalize', **img_norm_cfg),
48+
dict(type='Pad', size=img_size),
49+
dict(type='DefaultFormatBundle'),
50+
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
51+
]
52+
test_pipeline = [
53+
dict(type='LoadImageFromFile'),
54+
dict(
55+
type='MultiScaleFlipAug',
56+
img_scale=img_size,
57+
flip=False,
58+
transforms=[
59+
dict(type='Resize', keep_ratio=True),
60+
dict(type='RandomFlip'),
61+
dict(type='Normalize', **img_norm_cfg),
62+
dict(type='Pad', size=img_size),
63+
dict(type='ImageToTensor', keys=['img']),
64+
dict(type='Collect', keys=['img']),
65+
])
66+
]
67+
data = dict(
68+
samples_per_gpu=4,
69+
workers_per_gpu=4,
70+
train=dict(pipeline=train_pipeline),
71+
val=dict(pipeline=test_pipeline),
72+
test=dict(pipeline=test_pipeline))
73+
# optimizer
74+
optimizer_config = dict(grad_clip=None)
75+
optimizer = dict(
76+
type='SGD',
77+
lr=0.04,
78+
momentum=0.9,
79+
weight_decay=0.0001,
80+
paramwise_cfg=dict(norm_decay_mult=0, bypass_duplicate=True))
81+
# learning policy
82+
lr_config = dict(
83+
policy='step',
84+
warmup='linear',
85+
warmup_iters=1000,
86+
warmup_ratio=0.1,
87+
step=[8, 11])
88+
# runtime settings
89+
runner = dict(type='EpochBasedRunner', max_epochs=12)
90+
91+
# NOTE: This variable is for automatically scaling LR,
92+
# USER SHOULD NOT CHANGE THIS VALUE.
93+
default_batch_size = 32 # (8 GPUs) x (4 samples per GPU)

configs/faster_rcnn/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ We further finetune some pre-trained models on the COCO subsets, which only cont
6464
| [R-50-FPN](./faster_rcnn_r50_caffe_fpn_mstrain_1x_coco-person.py) | caffe | person | [R-50-FPN-Caffe-3x](./faster_rcnn_r50_caffe_fpn_mstrain_3x_coco.py) | 3.7 | 55.8 | [config](./faster_rcnn_r50_caffe_fpn_mstrain_1x_coco-person.py) | [model](https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco-person/faster_rcnn_r50_fpn_1x_coco-person_20201216_175929-d022e227.pth) &#124; [log](https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco-person/faster_rcnn_r50_fpn_1x_coco-person_20201216_175929.log.json) |
6565
| [R-50-FPN](./faster_rcnn_r50_caffe_fpn_mstrain_1x_coco-person-bicycle-car.py) | caffe | person-bicycle-car | [R-50-FPN-Caffe-3x](./faster_rcnn_r50_caffe_fpn_mstrain_3x_coco.py) | 3.7 | 44.1 | [config](./faster_rcnn_r50_caffe_fpn_mstrain_1x_coco-person-bicycle-car.py) | [model](https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco-person-bicycle-car/faster_rcnn_r50_fpn_1x_coco-person-bicycle-car_20201216_173117-6eda6d92.pth) &#124; [log](https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco-person-bicycle-car/faster_rcnn_r50_fpn_1x_coco-person-bicycle-car_20201216_173117.log.json) |
6666

67+
## Torchvision New Receipe (TNR)
68+
69+
Torchvision released its high-precision ResNet models. The training details can be found on the [Pytorch website](https://pytorch.org/blog/how-to-train-state-of-the-art-models-using-torchvision-latest-primitives/). Here, we have done grid searches on learning rate and weight decay and found the optimal hyper-parameter on the detection task.
70+
71+
| Backbone | Style | Lr schd | Mem (GB) | Inf time (fps) | box AP | Config | Download |
72+
| :-------------: | :-----: | :-----: | :------: | :------------: | :----: | :------: | :--------: |
73+
| [R-50-TNR](./faster_rcnn_r50_fpn_tnr-pretrain_1x_coco.py) | pytorch | 1x | - | | 40.2 | [config](https://github.com/open-mmlab/mmdetection/blob/master/configs/faster_rcnn/faster_rcnn_r50_fpn_tnr-pretrain_1x_coco.py) | [model](https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_tnr-pretrain_1x_coco/faster_rcnn_r50_fpn_tnr-pretrain_1x_coco_20220320_085147-efedfda4.pth) &#124; [log](https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_tnr-pretrain_1x_coco/faster_rcnn_r50_fpn_tnr-pretrain_1x_coco_20220320_085147-efedfda4.log.json) |
74+
6775
## Citation
6876

6977
```latex
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
_base_ = [
2+
'../_base_/models/faster_rcnn_r50_fpn.py',
3+
'../_base_/datasets/coco_detection.py',
4+
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
5+
]
6+
7+
checkpoint = 'https://download.pytorch.org/models/resnet50-11ad3fa6.pth'
8+
model = dict(
9+
backbone=dict(init_cfg=dict(type='Pretrained', checkpoint=checkpoint)))
10+
11+
# `lr` and `weight_decay` have been searched to be optimal.
12+
optimizer = dict(
13+
_delete_=True,
14+
type='AdamW',
15+
lr=0.0001,
16+
weight_decay=0.1,
17+
paramwise_cfg=dict(norm_decay_mult=0., bypass_duplicate=True))

configs/faster_rcnn/metafile.yml

+20
Original file line numberDiff line numberDiff line change
@@ -405,3 +405,23 @@ Models:
405405
Metrics:
406406
box AP: 43.1
407407
Weights: https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_x101_64x4d_fpn_mstrain_3x_coco/faster_rcnn_x101_64x4d_fpn_mstrain_3x_coco_20210524_124528-26c63de6.pth
408+
409+
- Name: faster_rcnn_r50_fpn_tnr-pretrain_1x_coco
410+
In Collection: Faster R-CNN
411+
Config: configs/faster_rcnn/faster_rcnn_r50_fpn_tnr-pretrain_1x_coco.py
412+
Metadata:
413+
Training Memory (GB): 4.0
414+
inference time (ms/im):
415+
- value: 46.73
416+
hardware: V100
417+
backend: PyTorch
418+
batch size: 1
419+
mode: FP32
420+
resolution: (800, 1333)
421+
Epochs: 12
422+
Results:
423+
- Task: Object Detection
424+
Dataset: COCO
425+
Metrics:
426+
box AP: 40.2
427+
Weights: https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_tnr-pretrain_1x_coco/faster_rcnn_r50_fpn_tnr-pretrain_1x_coco_20220320_085147-efedfda4.pth

0 commit comments

Comments
 (0)