Skip to content

Commit

Permalink
Release of v2.23.0 (#7559)
Browse files Browse the repository at this point in the history
* [Fix] Adjust the order of get_classes and FileClient. (#7276)

* delete -sv (#7277)

Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>

* [Docs] Add Chinese version of finetune (#7178)

* [Fix] Fix wrong img name in onnx2tensorrt.py (#7157)

* [Docs] fix albumentations installed way (#7143)

* Update finetune.md

Translate the finetune.md doc to Chinese

* Update finetune.md

* Update finetune.md

* Update finetune.md

* fix lint

* fx lint

* fix pr

Co-authored-by: Jamie <jamiechoi1995@users.noreply.github.com>
Co-authored-by: BigDong <yudongwang@tju.edu.cn>

* set unmap_results=True in ssd_head (#7328)

* Update YOLOX log for non square input (#7235)

* [Enhance] add cpu_num in cocopanoptic for pq computing (#7315)

* add cpu_num in cocopanoptic for pq computing

* cpu_num -> nproc

* move nproc to evaluate

* [Enhancement] Allow to set channel_order in LoadImageFromFile (#7258)

* allow to set channel_order when loading images

* fix lint

* fix unit test

* fix lint

* [Fix] Force the inputs of `get_bboxes` in yolox_head to float32. (#7324)

* Fix softnms bug

* Add force_fp32 in corner_head and centripetal_head

* [Fix] Fix typo in FPN neck (#7347)

* update readme and pretrained related (#7301)

* [Docs] Add Chinese version of onnx2tensorrt.md (#7219)

* Fix bug of docs

* translate onnx2tensorrt.md

* fix

* fix end-of-file-fixer

* fix some bugs

* 修复链接跳转

* 修复链接跳转

* 修复链接跳转-测试1

* 修复链接跳转-测试2

* 修复链接跳转-测试2

* 修复链接跳转-测试3

* 修复链接跳转-测试5

* Fix

Co-authored-by: jbwang1997 <jbwang1997@gmail.com>

* Update useful_tools.md (#7180)

* [Enhancement]: Update colab tutorials (#7310)

* update colab tutorials

* update

* fix

* fix wrong CUDA explaination

* resolve comments

* resolve comments

* fix typo

Co-authored-by: Cedric Luo <luochunhua1996@outlook.com>
Co-authored-by: tripleMu <92794867+q3394101@users.noreply.github.com>
Co-authored-by: jbwang1997 <jbwang1997@gmail.com>
Co-authored-by: kira <39787375+yangrisheng@users.noreply.github.com>
Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>

* [Fix] fix misplaced arguments in LoadPanopticAnnotations (#7388)

* [Enhance] Take point sample related functions out of mask_point_head (#7353)

add point sample

replace function in mask_point_head

* [Enhance] Add instance evalutation for coco_panoptic (#7313)

update comments

rename function and replace condition

rename

add message for proposal_fast when instance segmentation evaluation

set cocoGt as arg

update comments

update comments

update docstring and rename

add unit test

update docstring

add assert for instance eval

* [Feature] Add diff seeds to diff ranks. (#7432)

* Enhance the robustness of analyze_logs.py (#7407)

* [Feature] Add multi machine dist_train (#7415)

* [Enchance] Supplementary notes of  sync_random_seed (#7440)

* Supplementary Notes

* update

* update

* update

* Unified name of orig as ori (#7456)

* Remove duplicate link (#7480)

* [Fix] Adding comments for MaxIoUAssigner (#7464)

* Add comments

* update url

* Add description in docstring

* Update sphinx

* update commit

* [Enhance] Update docstring of cross entropy loss (#7472)

* update docstring of ce loss

update docstring

* update docstring

* [Enchance] Added documentation on mmdet using mmcls‘s backbone (#7438)

* add how-to docs

* update

* update index.rst

* update

* update

* Update README.md (#7498)

* fix typos (#7510)

* update-mosaic-to-how-to (#7507)

* [Fix] Fix fpg link (#7478)

* [Doc] Mosaic documentation enhancements (#7470)

* Mosaic documentation enhancements

- Added Mosaic and MultiImageMixDataset must be used together in FAQ document
- Added the demo configuration of Faster R-CNN using Mosaic

* Mosaic doc enhancements

correct some errors as suggested

* Remove unnecessary Settings

a little change

* update some details

* update-mosaic-to-how-to

* Mosaic documentation enhancements

- Added Mosaic and MultiImageMixDataset must be used together in FAQ document
- Added the demo configuration of Faster R-CNN using Mosaic

* Mosaic doc enhancements

correct some errors as suggested

* Remove unnecessary Settings

a little change

* update some details

* rebase dev branch

delete the mosaic in fap.md since it is in how_to.md

* rebase dev

* Mosaic documentation enhancements

- Added Mosaic and MultiImageMixDataset must be used together in FAQ document
- Added the demo configuration of Faster R-CNN using Mosaic

* Mosaic doc enhancements

correct some errors as suggested

* Remove unnecessary Settings

a little change

* update some details

* rebase dev branch

delete the mosaic in fap.md since it is in how_to.md

* Mosaic documentation enhancements

- Added Mosaic and MultiImageMixDataset must be used together in FAQ document
- Added the demo configuration of Faster R-CNN using Mosaic

* Mosaic doc enhancements

correct some errors as suggested

* Remove unnecessary Settings

a little change

* update some details

* rebase dev

* Bug fix: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:2! (#7521)

修复Free anchor Retinanet网络训练时,可能会遇到计算得到的anchor与pre_bboxes不在同一个cuda device的bug。

* [Feature] Torchvision high-precision ResNet model (#7489)

* Update tnr model

* Update README

* Update README

* Update comments

* Update metafile.yml

* Update model URL

* add msdeformattn pixel decoder (#7466)

fix typo

rm img_metas

rename in pixel_decoder

update comments

rename

fix typo

generae points with MlvlPointGenerator

* [Enhance] MaskFormer refactor (#7471)

* maskformer refactor

update docstring

update docstring

update unit test

update unit test

update unit test

* remove redundant code

* update unit test

* [Feature] Support efficientnet in mmdetection. (#7514)

* Initial implementation

* Add missing import

* Add MemoryEfficientSwishImplementation. Add docstrings

* Add efficientnet2mmdet tool

* Add config folder

* Flake8

* Flake8

* Flake8

* Fix config

* Requested changes

* docformatter

* Update train config from https://github.com/google/automl/blob/master/efficientdet

* Run pre-commit

* Fix schedule

* Set by_epoch=False in scheduler

* Train 80 epochs

* Remove duplicated arg

* Update README.md

* efficient3 efficient0

* efficientNet imports

* efficientNet

* config edit path for eff3 and dropout for eff0

* efficientnet review2

* fix model_converter location and drop path

* fix model converter  and efficientnet import

* register memoryefficietnswish

* eff0, eff3

* fix  flake8 yapf isort

* same padding in tensorflow and edit drop path rate

* fix init of utils

* Align mmdet utils with mmcls

* Align mmdet.models.utils with mmcls

* Use mmcls efficientnet backbone

* Update

* Update

* Update metafile

Co-authored-by: David de la Iglesia Castro <daviddelaiglesiacastro@gmail.com>
Co-authored-by: David de la Iglesia Castro <diglesia@gradiant.org>
Co-authored-by: jiangyitong <jiangyitong1@sensetime.com>
Co-authored-by: jiangyitong <jiangyitong1998@outlook.com>

* [Fix] Fix reduction=mean in CELoss. (#7449)

* [Fix] Fix ignore in CELoss.

* add ut

* fix and add comments

* add avg_non_ignore option

* bce avg

* fix lint

* [Enhance] update pascal voc result (#7503)

* [Enhance] update pascal voc result

* minor fix

* [Feature] Support to set data root through commands (#7386)

* Fix #6915: Support to set data root through commands

* Support #6915: seperate function in tools/utils.py, support test.py and browse_dataset.py

* update #6915: refactor the code ref @hhaAndroid advice

* support #6915: fix format problem

* supoort corresponding scripts and update doc @hhaAndroid

* updata misc.py as @ZwwWayne and @hhaAndroid

* Update mmdet/utils/misc.py

Co-authored-by: Haian Huang(深度眸) <1286304229@qq.com>

* fix mmdet/utils/misc.py format problem

Co-authored-by: Haian Huang(深度眸) <1286304229@qq.com>

* [Feature] Add Mask2Former to mmdet (#6938)

update doc

update doc format

deepcopy pixel_decoder cfg

move mask_pseudo_sampler cfg to config file

move part of postprocess from head to detector

fix bug in postprocessing

move class setting from head to config file

remove if else

move mask2bbox to mask/util

update docstring

update docstring in result2json

fix bug

update class_weight

add maskformer_fusion_head

add maskformer fusion head

update

add cfg for filter_low_score

update maskformer

update class_weight

update config

update unit test

rename param

update comments in config

rename variable, rm arg, update unit tests

update mask2bbox

add unit test for mask2bbox

replace unsqueeze(1) and squeeze(1)

add unit test for maskformer_fusion_head

update docstrings

update docstring

delete \

remove modification to ce loss

update docstring

update docstring

update docstring of ce loss

update unit test

update docstring

update docstring

update docstring

rename

rename

add msdeformattn pixel decoder

maskformer refactor

add strides in config

remove redundant code

remove redundant code

update unit test

update config

update

* [Fix] Update unit test of CrossEntropyCost (#7537)

* [Fix] Memory leaking in panpotic segmentation evaluation (#7538)

* fix broadcast shape bug in yolov3 (#7551)

* Fix `pointrend` missing `get_uncertainty` function bug (#7550)

* [Fix] Adjust the order of get_classes and FileClient. (#7276)

* delete -sv (#7277)

Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>

* [Docs] Add Chinese version of finetune (#7178)

* [Fix] Fix wrong img name in onnx2tensorrt.py (#7157)

* [Docs] fix albumentations installed way (#7143)

* Update finetune.md

Translate the finetune.md doc to Chinese

* Update finetune.md

* Update finetune.md

* Update finetune.md

* fix lint

* fx lint

* fix pr

Co-authored-by: Jamie <jamiechoi1995@users.noreply.github.com>
Co-authored-by: BigDong <yudongwang@tju.edu.cn>

* set unmap_results=True in ssd_head (#7328)

* Update YOLOX log for non square input (#7235)

* [Enhance] add cpu_num in cocopanoptic for pq computing (#7315)

* add cpu_num in cocopanoptic for pq computing

* cpu_num -> nproc

* move nproc to evaluate

* [Enhancement] Allow to set channel_order in LoadImageFromFile (#7258)

* allow to set channel_order when loading images

* fix lint

* fix unit test

* fix lint

* [Fix] Force the inputs of `get_bboxes` in yolox_head to float32. (#7324)

* Fix softnms bug

* Add force_fp32 in corner_head and centripetal_head

* [Fix] Fix typo in FPN neck (#7347)

* update readme and pretrained related (#7301)

* [Docs] Add Chinese version of onnx2tensorrt.md (#7219)

* Fix bug of docs

* translate onnx2tensorrt.md

* fix

* fix end-of-file-fixer

* fix some bugs

* 修复链接跳转

* 修复链接跳转

* 修复链接跳转-测试1

* 修复链接跳转-测试2

* 修复链接跳转-测试2

* 修复链接跳转-测试3

* 修复链接跳转-测试5

* Fix

Co-authored-by: jbwang1997 <jbwang1997@gmail.com>

* Update useful_tools.md (#7180)

* [Enhancement]: Update colab tutorials (#7310)

* update colab tutorials

* update

* fix

* fix wrong CUDA explaination

* resolve comments

* resolve comments

* fix typo

Co-authored-by: Cedric Luo <luochunhua1996@outlook.com>
Co-authored-by: tripleMu <92794867+q3394101@users.noreply.github.com>
Co-authored-by: jbwang1997 <jbwang1997@gmail.com>
Co-authored-by: kira <39787375+yangrisheng@users.noreply.github.com>
Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>

* Fix pointrend missing get_uncertainty function bug

Co-authored-by: Wencheng Wu <41542251+274869388@users.noreply.github.com>
Co-authored-by: Yue Zhou <592267829@qq.com>
Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>
Co-authored-by: MingJian.L <45811724+matrixgame2018@users.noreply.github.com>
Co-authored-by: Jamie <jamiechoi1995@users.noreply.github.com>
Co-authored-by: BigDong <yudongwang@tju.edu.cn>
Co-authored-by: Cedric Luo <26483343+chhluo@users.noreply.github.com>
Co-authored-by: Yosuke Shinya <42844407+shinya7y@users.noreply.github.com>
Co-authored-by: Cedric Luo <luochunhua1996@outlook.com>
Co-authored-by: Jingwei Zhang <zjw18@mails.tsinghua.edu.cn>
Co-authored-by: jbwang1997 <jbwang1997@gmail.com>
Co-authored-by: Xiangxu-0103 <xuxiang0103@gmail.com>
Co-authored-by: tripleMu <92794867+q3394101@users.noreply.github.com>
Co-authored-by: kira <39787375+yangrisheng@users.noreply.github.com>

* fix docstring in bbox_nms.py (#7547)

* Create init_cfg.md

* Update docs/zh_cn/tutorials/init_cfg.md

Co-authored-by: Haian Huang(深度眸) <1286304229@qq.com>

* update init_cfg.md

* update init_cfg.md

* update init_cfg.md

* update init_cfg.md

* fix docstring

* fix docstring

Co-authored-by: Haian Huang(深度眸) <1286304229@qq.com>

* [Doc] Add doc for COCO panoptic segmentation test results submission  (#7430)

* [Doc] Add doc for coco panoptic segmentation test results submission

* add example

* add script

* update comments

* update

* update

* update

* update

* update

* Bump versions to v2.23.0 (#7555)

* Bump versions to v2.23.0

* update log

* replace two Efficientnet

* update mask2former log

* add maskformer and mask2former in README_zh-CN.md

* add efficientnet in README.md and  README_zh-CN.md

* update changelog

* simplify highlights

* update changelog.

* update changelog again

* add some highlights

Co-authored-by: Wencheng Wu <41542251+274869388@users.noreply.github.com>
Co-authored-by: Yue Zhou <592267829@qq.com>
Co-authored-by: MingJian.L <45811724+matrixgame2018@users.noreply.github.com>
Co-authored-by: Jamie <jamiechoi1995@users.noreply.github.com>
Co-authored-by: BigDong <yudongwang@tju.edu.cn>
Co-authored-by: Cedric Luo <26483343+chhluo@users.noreply.github.com>
Co-authored-by: Yosuke Shinya <42844407+shinya7y@users.noreply.github.com>
Co-authored-by: Cedric Luo <luochunhua1996@outlook.com>
Co-authored-by: Jingwei Zhang <zjw18@mails.tsinghua.edu.cn>
Co-authored-by: jbwang1997 <jbwang1997@gmail.com>
Co-authored-by: Xiangxu-0103 <xuxiang0103@gmail.com>
Co-authored-by: tripleMu <92794867+q3394101@users.noreply.github.com>
Co-authored-by: kira <39787375+yangrisheng@users.noreply.github.com>
Co-authored-by: Haian Huang(深度眸) <1286304229@qq.com>
Co-authored-by: Shilong Zhang <61961338+jshilong@users.noreply.github.com>
Co-authored-by: Osman F Bayram <74963545+osbm@users.noreply.github.com>
Co-authored-by: Diego <ceroytres@users.noreply.github.com>
Co-authored-by: Noah <37148740+bunge-bedstraw-herb@users.noreply.github.com>
Co-authored-by: Youth-Got <53550307+Youth-Got@users.noreply.github.com>
Co-authored-by: David de la Iglesia Castro <daviddelaiglesiacastro@gmail.com>
Co-authored-by: David de la Iglesia Castro <diglesia@gradiant.org>
Co-authored-by: jiangyitong <jiangyitong1@sensetime.com>
Co-authored-by: jiangyitong <jiangyitong1998@outlook.com>
Co-authored-by: RangiLyu <lyuchqi@gmail.com>
Co-authored-by: CCODING <ccoding04@gmail.com>
Co-authored-by: Kevin Ye <1752391457@qq.com>
Co-authored-by: Czm369 <40661020+Czm369@users.noreply.github.com>
  • Loading branch information
1 parent 6b87ac2 commit d819908
Show file tree
Hide file tree
Showing 113 changed files with 4,169 additions and 406 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ jobs:
- name: Build and install
run: pip install -e .
- name: Run unittests
run: coverage run --branch --source mmdet -m pytest tests -sv
run: coverage run --branch --source mmdet -m pytest tests
- name: Generate coverage report
run: |
coverage xml
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<img src="resources/mmdet-logo.png" width="600"/>
<div>&nbsp;</div>
<div align="center">
<b><font size="5">OpenMMLab website</font></b>
<b>OpenMMLab website</b>
<sup>
<a href="https://openmmlab.com">
<i><font size="4">HOT</font></i>
<i>HOT</i>
</a>
</sup>
&nbsp;&nbsp;&nbsp;&nbsp;
<b><font size="5">OpenMMLab platform</font></b>
<b>OpenMMLab platform</b>
<sup>
<a href="https://platform.openmmlab.com">
<i><font size="4">TRY IT OUT</font></i>
<i>TRY IT OUT</i>
</a>
</sup>
</div>
Expand Down Expand Up @@ -74,11 +74,11 @@ This project is released under the [Apache 2.0 license](LICENSE).

## Changelog

**2.22.0** was released in 24/2/2022:
**2.23.0** was released in 28/3/2022:

- Support [MaskFormer](configs/maskformer), [DyHead](configs/dyhead), [OpenImages Dataset](configs/openimages) and [TIMM backbone](configs/timm_example)
- Support visualization for Panoptic Segmentation
- 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
- Support [Mask2Former](configs/mask2former) and [EfficientNet](configs/efficientnet)
- Support setting data root through environment variable `MMDET_DATASETS`, users don't have to modify the corresponding path in config files anymore.
- Find a good recipe for fine-tuning high precision ResNet backbone pre-trained by Torchvision.

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

Expand Down Expand Up @@ -164,6 +164,7 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
<ul>
<li><a href="configs/panoptic_fpn">Panoptic FPN (CVPR'2019)</a></li>
<li><a href="configs/maskformer">MaskFormer (NeurIPS'2021)</a></li>
<li><a href="configs/mask2former">Mask2Former (ArXiv'2021)</a></li>
</ul>
</td>
<td>
Expand Down Expand Up @@ -228,6 +229,7 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
<li><a href="configs/swin">Swin (CVPR'2021)</a></li>
<li><a href="configs/pvt">PVTv2 (ArXiv'2021)</a></li>
<li><a href="configs/resnet_strikes_back">ResNet strikes back (ArXiv'2021)</a></li>
<li><a href="configs/efficientnet">EfficientNet (ArXiv'2021)</a></li>
</ul>
</td>
<td>
Expand Down
13 changes: 8 additions & 5 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ MMDetection 是一个基于 PyTorch 的目标检测开源工具箱。它是 [Ope

## 更新日志

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

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

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

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

Expand Down Expand Up @@ -162,6 +162,8 @@ MMDetection 是一个基于 PyTorch 的目标检测开源工具箱。它是 [Ope
<td>
<ul>
<li><a href="configs/panoptic_fpn">Panoptic FPN (CVPR'2019)</a></li>
<li><a href="configs/maskformer">MaskFormer (NeurIPS'2021)</a></li>
<li><a href="configs/mask2former">Mask2Former (ArXiv'2021)</a></li>
</ul>
</td>
<td>
Expand Down Expand Up @@ -226,6 +228,7 @@ MMDetection 是一个基于 PyTorch 的目标检测开源工具箱。它是 [Ope
<li><a href="configs/swin">Swin (CVPR'2021)</a></li>
<li><a href="configs/pvt">PVTv2 (ArXiv'2021)</a></li>
<li><a href="configs/resnet_strikes_back">ResNet strikes back (ArXiv'2021)</a></li>
<li><a href="configs/efficientnet">EfficientNet (ArXiv'2021)</a></li>
</ul>
</td>
<td>
Expand Down
30 changes: 30 additions & 0 deletions configs/efficientnet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# EfficientNet

> [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://arxiv.org/abs/1905.11946v5)
<!-- [BACKBONE] -->

## Introduction

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.

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.

## Results and Models

### RetinaNet

| Backbone | Style | Lr schd | Mem (GB) | Inf time (fps) | box AP | Config | Download |
| :-------------: | :-----: | :-----: | :------: | :------------: | :----: | :------: | :--------: |
|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]() |

## Citation

```latex
@article{tan2019efficientnet,
title={Efficientnet: Rethinking model scaling for convolutional neural networks},
author={Tan, Mingxing and Le, Quoc V},
journal={arXiv preprint arXiv:1905.11946},
year={2019}
}
```
19 changes: 19 additions & 0 deletions configs/efficientnet/metafile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Models:
- Name: retinanet_effb3_fpn_crop896_8x4_1x_coco
In Collection: RetinaNet
Config: configs/efficientnet/retinanet_effb3_fpn_crop896_8x4_1x_coco.py
Metadata:
Epochs: 12
Results:
- Task: Object Detection
Dataset: COCO
Metrics:
box AP: 40.5
Weights: url
Paper:
URL: https://arxiv.org/abs/1905.11946v5
Title: 'EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks'
README: configs/efficientnet/README.md
Code:
URL: https://github.com/open-mmlab/mmdetection/blob/v2.23.0/mmdet/models/backbones/efficientnet.py#L159
Version: v2.23.0
93 changes: 93 additions & 0 deletions configs/efficientnet/retinanet_effb3_fpn_crop896_8x4_1x_coco.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
_base_ = [
'../_base_/models/retinanet_r50_fpn.py',
'../_base_/datasets/coco_detection.py', '../_base_/default_runtime.py'
]

cudnn_benchmark = True
norm_cfg = dict(type='BN', requires_grad=True)
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/efficientnet/efficientnet-b3_3rdparty_8xb32-aa_in1k_20220119-5b4887a0.pth' # noqa
model = dict(
backbone=dict(
_delete_=True,
type='EfficientNet',
arch='b3',
drop_path_rate=0.2,
out_indices=(3, 4, 5),
frozen_stages=0,
norm_cfg=dict(
type='SyncBN', requires_grad=True, eps=1e-3, momentum=0.01),
norm_eval=False,
init_cfg=dict(
type='Pretrained', prefix='backbone', checkpoint=checkpoint)),
neck=dict(
in_channels=[48, 136, 384],
start_level=0,
out_channels=256,
relu_before_extra_convs=True,
no_norm_on_lateral=True,
norm_cfg=norm_cfg),
bbox_head=dict(type='RetinaSepBNHead', num_ins=5, norm_cfg=norm_cfg),
# training and testing settings
train_cfg=dict(assigner=dict(neg_iou_thr=0.5)))

# dataset settings
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
img_size = (896, 896)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True),
dict(
type='Resize',
img_scale=img_size,
ratio_range=(0.8, 1.2),
keep_ratio=True),
dict(type='RandomCrop', crop_size=img_size),
dict(type='RandomFlip', flip_ratio=0.5),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size=img_size),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
]
test_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipAug',
img_scale=img_size,
flip=False,
transforms=[
dict(type='Resize', keep_ratio=True),
dict(type='RandomFlip'),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size=img_size),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img']),
])
]
data = dict(
samples_per_gpu=4,
workers_per_gpu=4,
train=dict(pipeline=train_pipeline),
val=dict(pipeline=test_pipeline),
test=dict(pipeline=test_pipeline))
# optimizer
optimizer_config = dict(grad_clip=None)
optimizer = dict(
type='SGD',
lr=0.04,
momentum=0.9,
weight_decay=0.0001,
paramwise_cfg=dict(norm_decay_mult=0, bypass_duplicate=True))
# learning policy
lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=1000,
warmup_ratio=0.1,
step=[8, 11])
# runtime settings
runner = dict(type='EpochBasedRunner', max_epochs=12)

# NOTE: This variable is for automatically scaling LR,
# USER SHOULD NOT CHANGE THIS VALUE.
default_batch_size = 32 # (8 GPUs) x (4 samples per GPU)
8 changes: 8 additions & 0 deletions configs/faster_rcnn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ We further finetune some pre-trained models on the COCO subsets, which only cont
| [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) |
| [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) |

## Torchvision New Receipe (TNR)

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.

| Backbone | Style | Lr schd | Mem (GB) | Inf time (fps) | box AP | Config | Download |
| :-------------: | :-----: | :-----: | :------: | :------------: | :----: | :------: | :--------: |
| [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) |

## Citation

```latex
Expand Down
17 changes: 17 additions & 0 deletions configs/faster_rcnn/faster_rcnn_r50_fpn_tnr-pretrain_1x_coco.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
_base_ = [
'../_base_/models/faster_rcnn_r50_fpn.py',
'../_base_/datasets/coco_detection.py',
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
]

checkpoint = 'https://download.pytorch.org/models/resnet50-11ad3fa6.pth'
model = dict(
backbone=dict(init_cfg=dict(type='Pretrained', checkpoint=checkpoint)))

# `lr` and `weight_decay` have been searched to be optimal.
optimizer = dict(
_delete_=True,
type='AdamW',
lr=0.0001,
weight_decay=0.1,
paramwise_cfg=dict(norm_decay_mult=0., bypass_duplicate=True))
20 changes: 20 additions & 0 deletions configs/faster_rcnn/metafile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,23 @@ Models:
Metrics:
box AP: 43.1
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

- Name: faster_rcnn_r50_fpn_tnr-pretrain_1x_coco
In Collection: Faster R-CNN
Config: configs/faster_rcnn/faster_rcnn_r50_fpn_tnr-pretrain_1x_coco.py
Metadata:
Training Memory (GB): 4.0
inference time (ms/im):
- value: 46.73
hardware: V100
backend: PyTorch
batch size: 1
mode: FP32
resolution: (800, 1333)
Epochs: 12
Results:
- Task: Object Detection
Dataset: COCO
Metrics:
box AP: 40.2
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
Loading

0 comments on commit d819908

Please sign in to comment.