Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add PoolFormer (CVPR'2022) #1537

Merged
merged 10 commits into from
Oct 1, 2022

Conversation

MengzhangLI
Copy link
Contributor

@MengzhangLI MengzhangLI commented Apr 30, 2022

Motivation

Support PoolFormer (CVPR'2022)
Paper: MetaFormer is Actually What You Need for Vision
Code: https://github.com/sail-sg/poolformer/tree/main/segmentation
Upstream backbone from MMClassification: https://github.com/open-mmlab/mmclassification/tree/master/configs/poolformer

  • Align Inference Results against official repo
  • Align Training metric of models to repeat results
  • Post-processing: Upload README.md and models & logs.

Results about Aligning Inference metric

Method Backbone Pretrain Iters mIoU
Semantic FPN PoolFormer-S12 ImageNet-1K 40K 37.15
Semantic FPN PoolFormer-S24 ImageNet-1K 40K 40.27
Semantic FPN PoolFormer-S36 ImageNet-1K 40K 41.97
Semantic FPN PoolFormer-M36 ImageNet-1K 40K 42.36
Semantic FPN PoolFormer-M48 ImageNet-1K 40K 42.72

Thus, the inference metric has been aligned, which means the model structure and test pipeline are both totally correct.

Results about Aligning Training metric

Method Backbone Pretrain Iters mIoU (paper) re-training
Semantic FPN PoolFormer-S12 ImageNet-1K 40K 37.15 37.07
Semantic FPN PoolFormer-S24 ImageNet-1K 40K 40.27 40.51
Semantic FPN PoolFormer-S36 ImageNet-1K 40K 41.97 41.81
Semantic FPN PoolFormer-M36 ImageNet-1K 40K 42.36 42.35
Semantic FPN PoolFormer-M48 ImageNet-1K 40K 42.72 42.43

Thus, PoolFormer could be re-implemented in this PR.

Total Results

Method Backbone Crop Size pretrain Batch Size Lr schd Mem (GB) Inf time (fps) mIoU mIoU(ms+flip) mIoU* mIoU*(ms+flip) config download
FPN PoolFormer-S12 512x512 ImageNet-1K 32 40000 4.17 23.48 36.0 36.42 37.07 38.44 config model | log
FPN PoolFormer-S24 512x512 ImageNet-1K 32 40000 5.47 15.74 39.35 39.73 40.36 41.08 config model | log
FPN PoolFormer-S36 512x512 ImageNet-1K 32 40000 6.77 11.34 40.64 40.99 41.81 42.72 config model | log
FPN PoolFormer-M36 512x512 ImageNet-1K 32 40000 8.59 8.97 40.91 41.28 42.35 43.34 config model | log
FPN PoolFormer-M48 512x512 ImageNet-1K 32 40000 10.48 6.69 41.82 42.2 42.76 43.57 config model | log

Note:

  • mIoU with * is collected when ResizeToMultiple is adopted in test_pipeline, so do mIoU in logs.

@codecov
Copy link

codecov bot commented Apr 30, 2022

Codecov Report

Base: 89.11% // Head: 89.14% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (bbdac5c) compared to base (ee25adc).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1537      +/-   ##
==========================================
+ Coverage   89.11%   89.14%   +0.03%     
==========================================
  Files         145      145              
  Lines        8716     8716              
  Branches     1471     1471              
==========================================
+ Hits         7767     7770       +3     
+ Misses        707      704       -3     
  Partials      242      242              
Flag Coverage Δ
unittests 89.14% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmseg/datasets/pipelines/transforms.py 98.64% <0.00%> (+0.58%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MengzhangLI MengzhangLI added the WIP Work in process label Apr 30, 2022
@MengzhangLI MengzhangLI self-assigned this Apr 30, 2022
@MengzhangLI MengzhangLI added the Algorithm Improvement or addition of new algorithm model label May 1, 2022
@MeowZheng MeowZheng requested a review from Junjun2016 July 6, 2022 02:50
@MengzhangLI MengzhangLI removed the WIP Work in process label Aug 31, 2022
@MeowZheng MeowZheng merged commit 6c746fa into open-mmlab:master Oct 1, 2022
@MengzhangLI MengzhangLI deleted the Add_PoolFormer branch November 22, 2022 15:25
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
Needed to convert `timesteps` to `float32` a bit sooner.

Fixes open-mmlab#1537
huajiangjiangLi added a commit to pytorchuser/HDB-Seg that referenced this pull request Apr 12, 2023
* [Feature] Add PoolFormer (CVPR'2022)

* Upload README.md, models and log.json

* fix wrong base config name in config file

* refactor alignresize

* delete align_resize.py

* change config name

* use ResizetoMultiple to replace AlignResize

* update readme

* fix config bug

* resolve conflict
wjkim81 pushed a commit to wjkim81/mmsegmentation that referenced this pull request Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Algorithm Improvement or addition of new algorithm model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants