Skip to content

[CVPR 2022 Oral] AdaMixer: A Fast-Converging Query-Based Object Detector

License

Notifications You must be signed in to change notification settings

GuozhenZhang1999/AdaMixer

 
 

Repository files navigation

AdaMixer: A Fast-Converging Query-Based Object Detector arxiv

AdaMixer: A Fast-Converging Query-Based Object Detector
accept to CVPR 2022 as an oral presentation
Ziteng Gao, Limin Wang, Bing Han, Sheng Guo
Nanjing University, MYbank Ant Group

[slides] [arxiv]

📰 News

[2022.7.3] Reproduced model checkpoints and logs are available.

[2022.4.4] The code is available now.

[2022.3.31] Code will be released in a few days (not too long). Pre-trained models will take some time to grant the permission of Ant Group to be available online. Please stay tuned or watch this repo for quick information.

✨ Highlights

🆕 MLP-Mixer for Object Detection

To our best knowledge, we are the first to introduce the MLP-Mixer for Object detection. The MLP-Mixer is used in the DETR-like decoder in an adaptive and query-wise manner to enrich the adaptibility to varying objects across images.

⚡️ Fast Converging DETR-like Architecture

AdaMixer enjoys fast convergence speed and reach up to 45.0 AP on COCO val within 12 epochs with only the architectural design improvement. Our method is compatible with other training improvements, like multiple predictions from a query and denosing training, which are expected to improve AdaMixer further (we have not tried yet).

🧱 Simple Architecture, NO extra attentional encoders or FPNs required

Our AdaMixer does not hunger for extra attention encoders or explicit feature pyramid networks. Instead, we improve the query decoder in DETR-like detectors to keep the architecture as simple, efficient, and strong as possible.

➡️ Guide to Our Code

Our code structure follows the MMDetection framework. To get started, please refer to mmdetection doc get_started.md for installation.

Our AdaMixer config file lies in configs/adamixer folder. You can start training our detectors with make targets in Makefile.

The code of a AdaMixer decoder stage is in mmdet/models/roi_heads/bbox_heads/adamixer_decoder_stage.py. The code of the 3D feature space sampling is in mmdet/models/roi_heads/bbox_heads/sampling_3d_operator.py. The code of the adaptive mixing process is in mmdet/models/roi_heads/bbox_heads/adaptive_mixing_operator.py.

NOTE:

  1. Please use mmcv_full==1.3.3 and pytorch>=1.5.0 for correct reproduction (#4, #12).Please make sure init_weight methods in AdaptiveSamplingMixing and AdaptiveMixing are called for correct initializations AND the initialized weights are not overrided by other methods (some MMCV versions may incur repeated initializations).
  2. We notice ~0.3 AP (42.7 AP reported in the paper) noise for AdaMixer w/ R50 with 1x training settings.

🧪 Main Results

Checkpoints and logs are available at google drive.

config detector backbone APval APtest APval (reprod.) ckpt (reprod.) log (reprod.)
config AdaMixer (1x schedule, 100 queries) R50 42.7 42.6 ckpt log
config AdaMixer (3x schedule, 300 queries) R50 47.0 47.2 46.8 ckpt log
config AdaMixer (3x schedule, 300 queries) R101 48.0 48.1 48.1 ckpt log
config AdaMixer (3x schedule, 300 queries) X101-DCN 49.5 49.3 49.7 ckpt log
config AdaMixer (3x schedule, 300 queries) Swin-S 51.3 51.3 on the way

Special thanks to Zhan Tong for these reproduced models.

✏️ Citation

If you find AdaMixer useful in your research, please cite us using the following entry:

@inproceedings{adamixer22cvpr,
  author    = {Ziteng Gao and
               Limin Wang and
               Bing Han and
               Sheng Guo},
  title     = {AdaMixer: A Fast-Converging Query-Based Object Detector},
  booktitle = {{CVPR}},
  year      = {2022}
}

👍 Acknowledgement

Thanks to Zhan Tong and Zihua Xiong for their help.

Original MMDetection README.md

The following begins the original mmdetection README.md file

News: We released the technical report on ArXiv.

Documentation: https://mmdetection.readthedocs.io/

Introduction

English | 简体中文

MMDetection is an open source object detection toolbox based on PyTorch. It is a part of the OpenMMLab project.

The master branch works with PyTorch 1.3+. The old v1.x branch works with PyTorch 1.1 to 1.4, but v2.0 is strongly recommended for faster speed, higher performance, better design and more friendly usage.

demo image

Major features

  • Modular Design

    We decompose the detection framework into different components and one can easily construct a customized object detection framework by combining different modules.

  • Support of multiple frameworks out of box

    The toolbox directly supports popular and contemporary detection frameworks, e.g. Faster RCNN, Mask RCNN, RetinaNet, etc.

  • High efficiency

    All basic bbox and mask operations run on GPUs. The training speed is faster than or comparable to other codebases, including Detectron2, maskrcnn-benchmark and SimpleDet.

  • State of the art

    The toolbox stems from the codebase developed by the MMDet team, who won COCO Detection Challenge in 2018, and we keep pushing it forward.

Apart from MMDetection, we also released a library mmcv for computer vision research, which is heavily depended on by this toolbox.

License

The mmdetection project is released under the Apache 2.0 license.

Changelog

v2.12.0 was released in 01/05/2021. Please refer to changelog.md for details and release history. A comparison between v1.x and v2.0 codebases can be found in compatibility.md.

Benchmark and model zoo

Results and models are available in the model zoo.

Supported backbones:

  • ResNet (CVPR'2016)
  • ResNeXt (CVPR'2017)
  • VGG (ICLR'2015)
  • HRNet (CVPR'2019)
  • RegNet (CVPR'2020)
  • Res2Net (TPAMI'2020)
  • ResNeSt (ArXiv'2020)

Supported methods:

Some other methods are also supported in projects using MMDetection.

Installation

Please refer to get_started.md for installation.

Getting Started

Please see get_started.md for the basic usage of MMDetection. We provide colab tutorial, and full guidance for quick run with existing dataset and with new dataset for beginners. There are also tutorials for finetuning models, adding new dataset, designing data pipeline, customizing models, customizing runtime settings and useful tools.

Please refer to FAQ for frequently asked questions.

Contributing

We appreciate all contributions to improve MMDetection. Please refer to CONTRIBUTING.md for the contributing guideline.

Acknowledgement

MMDetection is an open source project that is contributed by researchers and engineers from various colleges and companies. We appreciate all the contributors who implement their methods or add new features, as well as users who give valuable feedbacks. We wish that the toolbox and benchmark could serve the growing research community by providing a flexible toolkit to reimplement existing methods and develop their own new detectors.

Citation

If you use this toolbox or benchmark in your research, please cite this project.

@article{mmdetection,
  title   = {{MMDetection}: Open MMLab Detection Toolbox and Benchmark},
  author  = {Chen, Kai and Wang, Jiaqi and Pang, Jiangmiao and Cao, Yuhang and
             Xiong, Yu and Li, Xiaoxiao and Sun, Shuyang and Feng, Wansen and
             Liu, Ziwei and Xu, Jiarui and Zhang, Zheng and Cheng, Dazhi and
             Zhu, Chenchen and Cheng, Tianheng and Zhao, Qijie and Li, Buyu and
             Lu, Xin and Zhu, Rui and Wu, Yue and Dai, Jifeng and Wang, Jingdong
             and Shi, Jianping and Ouyang, Wanli and Loy, Chen Change and Lin, Dahua},
  journal= {arXiv preprint arXiv:1906.07155},
  year={2019}
}

Projects in OpenMMLab

  • MMCV: OpenMMLab foundational library for computer vision.
  • MMClassification: OpenMMLab image classification toolbox and benchmark.
  • MMDetection: OpenMMLab detection toolbox and benchmark.
  • MMDetection3D: OpenMMLab's next-generation platform for general 3D object detection.
  • MMSegmentation: OpenMMLab semantic segmentation toolbox and benchmark.
  • MMAction2: OpenMMLab's next-generation action understanding toolbox and benchmark.
  • MMTracking: OpenMMLab video perception toolbox and benchmark.
  • MMPose: OpenMMLab pose estimation toolbox and benchmark.
  • MMEditing: OpenMMLab image and video editing toolbox.
  • MMOCR: A Comprehensive Toolbox for Text Detection, Recognition and Understanding.
  • MMGeneration: OpenMMLab image and video generative models toolbox.

About

[CVPR 2022 Oral] AdaMixer: A Fast-Converging Query-Based Object Detector

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 65.1%
  • Python 34.9%