Siyuan Li*,1,2, Zedong Wang*,1, Zicheng Liu1,2, Chen Tan1,2, Haitao Lin1,2, Di Wu1,2, Zhiyuan Chen1, Jiangbin Zheng1,2, Stan Z. Li†,1
We propose MogaNet, a new family of efficient ConvNets, to pursue informative context mining with preferable complexity-performance trade-offs.
Table of Contents
We plan to release implementations of MogaNet in a few months. Please watch us for the latest release. Currently, this repo is reimplemented according to our official implementations in OpenMixup, and we are working on cleaning up experimental results and code implementations.
- ImageNet-1K Training and Validation Code [here] [models]
- Downstream Transfer to Object Detection and Instance Segmentation on COCO [code] [models]
- Downstream Transfer to Semantic Segmentation on ADE20K [code] [models]
- Downstream Transfer to 2D Human Pose Estimation on COCO [code]
- Image Classification on Google Colab and Notebook Demo [here]
Please check INSTALL.md for installation instructions.
See TRAINING.md for ImageNet-1K training and validation instructions, or refer to our OpenMixup implementations. We released pre-trained models on OpenMixup in moganet-in1k-weights. We have also reproduced ImageNet results with this repo and released args.yaml
/ summary.csv
/ model.pth.tar
in moganet-in1k-weights. The parameters in the trained model can be extracted by code.
Here is a notebook demo of MogaNet which run the steps to perform inference with MogaNet for image classification.
Model | Resolution | Params (M) | Flops (G) | Top-1 / top-5 (%) | Script | Download |
---|---|---|---|---|---|---|
MogaNet-XT | 224x224 | 2.97 | 0.80 | 76.5 / 93.4 | args / script | model / log |
MogaNet-XT | 256x256 | 2.97 | 1.04 | 77.2 / 93.8 | args / script | model / log |
MogaNet-T | 224x224 | 5.20 | 1.10 | 79.0 / 94.6 | args / script | model / log |
MogaNet-T | 256x256 | 5.20 | 1.44 | 79.6 / 94.9 | args / script | model / log |
MogaNet-T* | 256x256 | 5.20 | 1.44 | 80.0 / 95.0 | config / script | model / log |
MogaNet-S | 224x224 | 25.3 | 4.97 | 83.4 / 96.9 | args / script | model / log |
MogaNet-B | 224x224 | 43.9 | 9.93 | 84.2 / 97.0 | args / script | model / log |
MogaNet-L | 224x224 | 82.5 | 15.9 | 84.6 / 97.1 | args / script | model / log |
MogaNet-XL | 224x224 | 180.8 | 34.5 | 85.1 / 97.4 | args / script | model / log |
(1) The code to count MACs of MogaNet variants.
python get_flops.py --model moganet_tiny
(2) The code to visualize Grad-CAM activation maps (or variants of Grad-CAM) of MogaNet and other popular architectures.
python cam_image.py --use_cuda --image_path /path/to/image.JPEG --model moganet_tiny --method gradcam
This project is released under the Apache 2.0 license.
Our implementation is mainly based on the following codebases. We gratefully thank the authors for their wonderful works.
- pytorch-image-models.
- PoolFormer: Official PyTorch implementation of MetaFormer.
- ConvNeXt: Official PyTorch implementation of ConvNeXt.
- MMDetection: OpenMMLab Detection Toolbox and Benchmark.
- MMSegmentation: OpenMMLab Semantic Segmentation Toolbox and Benchmark.
- MMPose: OpenMMLab Pose Estimation Toolbox and Benchmark.
If you find this repository helpful, please consider citing:
@article{Li2022MogaNet,
title={Efficient Multi-order Gated Aggregation Network},
author={Siyuan Li and Zedong Wang and Zicheng Liu and Cheng Tan and Haitao Lin and Di Wu and Zhiyuan Chen and Jiangbin Zheng and Stan Z. Li},
journal={ArXiv},
year={2022},
volume={abs/2211.03295}
}