Skip to content

Commit 52a3276

Browse files
authored
Bump version to v2.22.0
Bump version to v2.22.0
2 parents e359d3f + 7b2b7fe commit 52a3276

File tree

124 files changed

+6706
-369
lines changed

Some content is hidden

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

124 files changed

+6706
-369
lines changed

.dev_scripts/benchmark_inference_fps.py

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from mmcv import Config, DictAction
88
from mmcv.runner import init_dist
99
from terminaltables import GithubFlavoredMarkdownTable
10+
1011
from tools.analysis_tools.benchmark import repeat_measure_inference_speed
1112

1213

.dev_scripts/gather_models.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def get_dataset_name(config):
9898
LVISV05Dataset='LVIS v0.5',
9999
LVISV1Dataset='LVIS v1',
100100
VOCDataset='Pascal VOC',
101-
WIDERFaceDataset='WIDER Face')
101+
WIDERFaceDataset='WIDER Face',
102+
OpenImagesDataset='OpenImagesDataset',
103+
OpenImagesChallengeDataset='OpenImagesChallengeDataset')
102104
cfg = mmcv.Config.fromfile('./configs/' + config)
103105
return name_map[cfg.dataset_type]
104106

.github/workflows/build.yml

+66-12
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,26 @@ jobs:
3333
strategy:
3434
matrix:
3535
python-version: [3.7]
36-
torch: [1.5.1, 1.6.0, 1.7.0, 1.8.0, 1.9.0]
36+
torch: [1.5.1, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.1]
3737
include:
3838
- torch: 1.5.1
3939
torchvision: 0.6.1
40-
mmcv: 1.5.0
40+
mmcv: 1.5
4141
- torch: 1.6.0
4242
torchvision: 0.7.0
43-
mmcv: 1.6.0
43+
mmcv: 1.6
4444
- torch: 1.7.0
4545
torchvision: 0.8.1
46-
mmcv: 1.7.0
46+
mmcv: 1.7
4747
- torch: 1.8.0
4848
torchvision: 0.9.0
49-
mmcv: 1.8.0
49+
mmcv: 1.8
5050
- torch: 1.9.0
5151
torchvision: 0.10.0
52-
mmcv: 1.9.0
52+
mmcv: 1.9
53+
- torch: 1.10.1
54+
torchvision: 0.11.2
55+
mmcv: 1.10
5356
steps:
5457
- uses: actions/checkout@v2
5558
- name: Set up Python ${{ matrix.python-version }}
@@ -91,19 +94,19 @@ jobs:
9194
- torch: 1.5.1+cu101
9295
torch_version: torch1.5.1
9396
torchvision: 0.6.1+cu101
94-
mmcv: 1.5.0
97+
mmcv: 1.5
9598
- torch: 1.6.0+cu101
9699
torch_version: torch1.6.0
97100
torchvision: 0.7.0+cu101
98-
mmcv: 1.6.0
101+
mmcv: 1.6
99102
- torch: 1.7.0+cu101
100103
torch_version: torch1.7.0
101104
torchvision: 0.8.1+cu101
102-
mmcv: 1.7.0
105+
mmcv: 1.7
103106
- torch: 1.8.0+cu101
104107
torch_version: torch1.8.0
105108
torchvision: 0.9.0+cu101
106-
mmcv: 1.8.0
109+
mmcv: 1.8
107110

108111
steps:
109112
- uses: actions/checkout@v2
@@ -160,12 +163,16 @@ jobs:
160163
strategy:
161164
matrix:
162165
python-version: [3.6, 3.7, 3.8, 3.9]
163-
torch: [1.9.0+cu102]
166+
torch: [1.9.0+cu102, 1.10.1+cu102]
164167
include:
165168
- torch: 1.9.0+cu102
166169
torch_version: torch1.9.0
167170
torchvision: 0.10.0+cu102
168-
mmcv: 1.9.0
171+
mmcv: 1.9
172+
- torch: 1.10.1+cu102
173+
torch_version: torch1.10.1
174+
torchvision: 0.11.2+cu102
175+
mmcv: 1.10
169176

170177
steps:
171178
- uses: actions/checkout@v2
@@ -224,3 +231,50 @@ jobs:
224231
env_vars: OS,PYTHON
225232
name: codecov-umbrella
226233
fail_ci_if_error: false
234+
235+
build_windows:
236+
runs-on: ${{ matrix.os }}
237+
strategy:
238+
matrix:
239+
os: [windows-2022]
240+
python: [3.8]
241+
platform: [cpu, cu111]
242+
steps:
243+
- uses: actions/checkout@v2
244+
- name: Set up Python ${{ matrix.python }}
245+
uses: actions/setup-python@v2
246+
with:
247+
python-version: ${{ matrix.python }}
248+
- name: Upgrade pip
249+
run: pip install pip --upgrade --user
250+
- name: Install PyTorch
251+
# As a complement to Linux CI, we test on PyTorch LTS version
252+
run: pip install torch==1.8.2+${{ matrix.platform }} torchvision==0.9.2+${{ matrix.platform }} -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
253+
- name: Install MMCV
254+
run: pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.8/index.html --only-binary mmcv-full
255+
- name: Install unittest dependencies
256+
run: |
257+
python -V
258+
python -m pip install pycocotools
259+
python -m pip install -r requirements/tests.txt -r requirements/optional.txt
260+
python -m pip install albumentations>=0.3.2 --no-binary imgaug,albumentations
261+
python -m pip install git+https://github.com/cocodataset/panopticapi.git
262+
python -c 'import mmcv; print(mmcv.__version__)'
263+
- name: Show pip list
264+
run: pip list
265+
- name: Build and install
266+
run: pip install -e .
267+
- name: Run unittests
268+
run: coverage run --branch --source mmdet -m pytest tests -sv
269+
- name: Generate coverage report
270+
run: |
271+
coverage xml
272+
coverage report -m
273+
- name: Upload coverage to Codecov
274+
uses: codecov/codecov-action@v2
275+
with:
276+
file: ./coverage.xml
277+
flags: unittests
278+
env_vars: OS,PYTHON
279+
name: codecov-umbrella
280+
fail_ci_if_error: false

.owners.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
assign:
2+
strategy:
3+
# random
4+
daily-shift-based
5+
scedule:
6+
'*/1 * * * *'
7+
assignees:
8+
- Czm369
9+
- hhaAndroid
10+
- jbwang1997
11+
- RangiLyu
12+
- BIGWangYuDong
13+
- chhluo
14+
- ZwwWayne

.pre-commit-config.yaml

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@ repos:
33
rev: 3.8.3
44
hooks:
55
- id: flake8
6-
- repo: https://github.com/asottile/seed-isort-config
7-
rev: v2.2.0
8-
hooks:
9-
- id: seed-isort-config
10-
- repo: https://github.com/timothycrosley/isort
11-
rev: 4.3.21
6+
- repo: https://github.com/PyCQA/isort
7+
rev: 5.10.1
128
hooks:
139
- id: isort
1410
- repo: https://github.com/pre-commit/mirrors-yapf

README.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ This project is released under the [Apache 2.0 license](LICENSE).
7474

7575
## Changelog
7676

77-
**2.21.0** was released in 8/2/2022:
77+
**2.22.0** was released in 24/2/2022:
7878

79-
- Support CPU training
80-
- Allow to set parameters about multi-processing to speed up training and testing
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
8182

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

@@ -162,6 +163,7 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
162163
<td>
163164
<ul>
164165
<li><a href="configs/panoptic_fpn">Panoptic FPN (CVPR'2019)</a></li>
166+
<li><a href="configs/maskformer">MaskFormer (NeurIPS'2019)</a></li>
165167
</ul>
166168
</td>
167169
<td>
@@ -225,6 +227,7 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
225227
<li><a href="configs/pvt">PVT (ICCV'2021)</a></li>
226228
<li><a href="configs/swin">Swin (CVPR'2021)</a></li>
227229
<li><a href="configs/pvt">PVTv2 (ArXiv'2021)</a></li>
230+
<li><a href="configs/resnet_strikes_back">ResNet strikes back (ArXiv'2021)</a></li>
228231
</ul>
229232
</td>
230233
<td>
@@ -234,6 +237,7 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
234237
<li><a href="configs/carafe">CARAFE (ICCV'2019)</a></li>
235238
<li><a href="configs/fpg">FPG (ArXiv'2020)</a></li>
236239
<li><a href="configs/groie">GRoIE (ICPR'2020)</a></li>
240+
<li><a href="configs/dyhead">DyHead (CVPR'2021)</a></li>
237241
</ul>
238242
</td>
239243
<td>
@@ -252,6 +256,7 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
252256
<li><a href="configs/gn+ws">Weight Standardization (ArXiv'2019)</a></li>
253257
<li><a href="configs/pisa">Prime Sample Attention (CVPR'2020)</a></li>
254258
<li><a href="configs/strong_baselines">Strong Baselines (CVPR'2021)</a></li>
259+
<li><a href="configs/resnet_strikes_back">Resnet strikes back (ArXiv'2021)</a></li>
255260
</ul>
256261
</td>
257262
</tr>
@@ -321,4 +326,4 @@ If you use this toolbox or benchmark in your research, please cite this project.
321326
- [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab optical flow toolbox and benchmark.
322327
- [MMEditing](https://github.com/open-mmlab/mmediting): OpenMMLab image and video editing toolbox.
323328
- [MMGeneration](https://github.com/open-mmlab/mmgeneration): OpenMMLab image and video generative models toolbox.
324-
- [MMDeploy](https://github.com/open-mmlab/mmdeploy): OpenMMLab Model Deployment Framework.
329+
- [MMDeploy](https://github.com/open-mmlab/mmdeploy): OpenMMLab model deployment framework.

README_zh-CN.md

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

7474
## 更新日志
7575

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

78-
- 支持了 CPU 训练
79-
- 允许设置多进程相关的参数来加速训练与推理
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 的提升
8081

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

@@ -224,6 +225,7 @@ MMDetection 是一个基于 PyTorch 的目标检测开源工具箱。它是 [Ope
224225
<li><a href="configs/pvt">PVT (ICCV'2021)</a></li>
225226
<li><a href="configs/swin">Swin (CVPR'2021)</a></li>
226227
<li><a href="configs/pvt">PVTv2 (ArXiv'2021)</a></li>
228+
<li><a href="configs/resnet_strikes_back">ResNet strikes back (ArXiv'2021)</a></li>
227229
</ul>
228230
</td>
229231
<td>
@@ -233,6 +235,7 @@ MMDetection 是一个基于 PyTorch 的目标检测开源工具箱。它是 [Ope
233235
<li><a href="configs/carafe">CARAFE (ICCV'2019)</a></li>
234236
<li><a href="configs/fpg">FPG (ArXiv'2020)</a></li>
235237
<li><a href="configs/groie">GRoIE (ICPR'2020)</a></li>
238+
<li><a href="configs/dyhead">DyHead (CVPR'2021)</a></li>
236239
</ul>
237240
</td>
238241
<td>
@@ -251,6 +254,7 @@ MMDetection 是一个基于 PyTorch 的目标检测开源工具箱。它是 [Ope
251254
<li><a href="configs/gn+ws">Weight Standardization (ArXiv'2019)</a></li>
252255
<li><a href="configs/pisa">Prime Sample Attention (CVPR'2020)</a></li>
253256
<li><a href="configs/strong_baselines">Strong Baselines (CVPR'2021)</a></li>
257+
<li><a href="configs/resnet_strikes_back">Resnet strikes back (ArXiv'2021)</a></li>
254258
</ul>
255259
</td>
256260
</tr>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# dataset settings
2+
dataset_type = 'OpenImagesDataset'
3+
data_root = 'data/OpenImages/'
4+
img_norm_cfg = dict(
5+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6+
train_pipeline = [
7+
dict(type='LoadImageFromFile'),
8+
dict(type='LoadAnnotations', with_bbox=True, denorm_bbox=True),
9+
dict(type='Resize', img_scale=(1024, 800), keep_ratio=True),
10+
dict(type='RandomFlip', flip_ratio=0.5),
11+
dict(type='Normalize', **img_norm_cfg),
12+
dict(type='Pad', size_divisor=32),
13+
dict(type='DefaultFormatBundle'),
14+
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
15+
]
16+
test_pipeline = [
17+
dict(type='LoadImageFromFile'),
18+
dict(
19+
type='MultiScaleFlipAug',
20+
img_scale=(1024, 800),
21+
flip=False,
22+
transforms=[
23+
dict(type='Resize', keep_ratio=True),
24+
dict(type='RandomFlip'),
25+
dict(type='Normalize', **img_norm_cfg),
26+
dict(type='Pad', size_divisor=32),
27+
dict(type='ImageToTensor', keys=['img']),
28+
dict(type='Collect', keys=['img']),
29+
],
30+
),
31+
]
32+
data = dict(
33+
samples_per_gpu=2,
34+
workers_per_gpu=0, # workers_per_gpu > 0 may occur out of memory
35+
train=dict(
36+
type=dataset_type,
37+
ann_file=data_root + 'annotations/oidv6-train-annotations-bbox.csv',
38+
img_prefix=data_root + 'OpenImages/train/',
39+
label_file=data_root + 'annotations/class-descriptions-boxable.csv',
40+
hierarchy_file=data_root +
41+
'annotations/bbox_labels_600_hierarchy.json',
42+
pipeline=train_pipeline),
43+
val=dict(
44+
type=dataset_type,
45+
ann_file=data_root + 'annotations/validation-annotations-bbox.csv',
46+
img_prefix=data_root + 'OpenImages/validation/',
47+
label_file=data_root + 'annotations/class-descriptions-boxable.csv',
48+
hierarchy_file=data_root +
49+
'annotations/bbox_labels_600_hierarchy.json',
50+
meta_file=data_root + 'annotations/validation-image-metas.pkl',
51+
image_level_ann_file=data_root +
52+
'annotations/validation-annotations-human-imagelabels-boxable.csv',
53+
pipeline=test_pipeline),
54+
test=dict(
55+
type=dataset_type,
56+
ann_file=data_root + 'annotations/validation-annotations-bbox.csv',
57+
img_prefix=data_root + 'OpenImages/validation/',
58+
label_file=data_root + 'annotations/class-descriptions-boxable.csv',
59+
hierarchy_file=data_root +
60+
'annotations/bbox_labels_600_hierarchy.json',
61+
meta_file=data_root + 'annotations/validation-image-metas.pkl',
62+
image_level_ann_file=data_root +
63+
'annotations/validation-annotations-human-imagelabels-boxable.csv',
64+
pipeline=test_pipeline))
65+
evaluation = dict(interval=1, metric='mAP')

configs/dyhead/README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# DyHead
2+
3+
> [Dynamic Head: Unifying Object Detection Heads with Attentions](https://arxiv.org/abs/2106.08322)
4+
5+
<!-- [ALGORITHM] -->
6+
7+
## Abstract
8+
9+
The complex nature of combining localization and classification in object detection has resulted in the flourished development of methods. Previous works tried to improve the performance in various object detection heads but failed to present a unified view. In this paper, we present a novel dynamic head framework to unify object detection heads with attentions. By coherently combining multiple self-attention mechanisms between feature levels for scale-awareness, among spatial locations for spatial-awareness, and within output channels for task-awareness, the proposed approach significantly improves the representation ability of object detection heads without any computational overhead. Further experiments demonstrate that the effectiveness and efficiency of the proposed dynamic head on the COCO benchmark. With a standard ResNeXt-101-DCN backbone, we largely improve the performance over popular object detectors and achieve a new state-of-the-art at 54.0 AP. Furthermore, with latest transformer backbone and extra data, we can push current best COCO result to a new record at 60.6 AP.
10+
11+
<div align=center>
12+
<img src="https://user-images.githubusercontent.com/42844407/149169448-fcafb6d0-b866-41cc-9422-94de9f1e1761.png" height="300"/>
13+
</div>
14+
15+
## Results and Models
16+
17+
| Method | Backbone | Style | Setting | Lr schd | Mem (GB) | Inf time (fps) | box AP | Config | Download |
18+
|:------:|:--------:|:-------:|:------------:|:-------:|:--------:|:--------------:|:------:|:------:|:--------:|
19+
| ATSS | R-50 | caffe | reproduction | 1x | 5.4 | 13.2 | 42.5 | [config](./atss_r50_caffe_fpn_dyhead_1x_coco.py) | [model](https://download.openmmlab.com/mmdetection/v2.0/dyhead/atss_r50_fpn_dyhead_for_reproduction_1x_coco/atss_r50_fpn_dyhead_for_reproduction_4x4_1x_coco_20220107_213939-162888e6.pth) &#124; [log](https://download.openmmlab.com/mmdetection/v2.0/dyhead/atss_r50_fpn_dyhead_for_reproduction_1x_coco/atss_r50_fpn_dyhead_for_reproduction_4x4_1x_coco_20220107_213939.log.json) |
20+
| ATSS | R-50 | pytorch | simple | 1x | 4.9 | 13.7 | 43.3 | [config](./atss_r50_fpn_dyhead_1x_coco.py) | [model](https://download.openmmlab.com/mmdetection/v2.0/dyhead/atss_r50_fpn_dyhead_4x4_1x_coco/atss_r50_fpn_dyhead_4x4_1x_coco_20211219_023314-eaa620c6.pth) &#124; [log](https://download.openmmlab.com/mmdetection/v2.0/dyhead/atss_r50_fpn_dyhead_4x4_1x_coco/atss_r50_fpn_dyhead_4x4_1x_coco_20211219_023314.log.json) |
21+
22+
- We trained the above models with 4 GPUs and 4 `samples_per_gpu`.
23+
- The `reproduction` setting aims to reproduce the official implementation based on Detectron2.
24+
- The `simple` setting serves as a minimum example to use DyHead in MMDetection. Specifically,
25+
- it adds `DyHead` to `neck` after `FPN`
26+
- it sets `stacked_convs=0` to `bbox_head`
27+
- The `simple` setting achieves higher AP than the original implementation.
28+
We have not conduct ablation study between the two settings.
29+
`dict(type='Pad', size_divisor=128)` may further improve AP by prefer spatial alignment across pyramid levels, although large padding reduces efficiency.
30+
31+
## Relation to Other Methods
32+
33+
- DyHead can be regarded as an improved [SEPC](https://arxiv.org/abs/2005.03101) with [DyReLU modules](https://arxiv.org/abs/2003.10027) and simplified [SE blocks](https://arxiv.org/abs/1709.01507).
34+
- Xiyang Dai et al., the author team of DyHead, adopt it for [Dynamic DETR](https://openaccess.thecvf.com/content/ICCV2021/html/Dai_Dynamic_DETR_End-to-End_Object_Detection_With_Dynamic_Attention_ICCV_2021_paper.html).
35+
The description of Dynamic Encoder in Sec. 3.2 will help you understand DyHead.
36+
37+
## Citation
38+
39+
```latex
40+
@inproceedings{DyHead_CVPR2021,
41+
author = {Dai, Xiyang and Chen, Yinpeng and Xiao, Bin and Chen, Dongdong and Liu, Mengchen and Yuan, Lu and Zhang, Lei},
42+
title = {Dynamic Head: Unifying Object Detection Heads With Attentions},
43+
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
44+
year = {2021}
45+
}
46+
```

0 commit comments

Comments
 (0)