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

[飞桨黑客松第四期] (127) MobileViTv2 #2711

Merged
merged 7 commits into from
Apr 19, 2023

Conversation

flytocc
Copy link
Contributor

@flytocc flytocc commented Mar 16, 2023

任务详情: [飞桨黑客松第四期任务总览] Paddle#51281

修改内容

  1. [bugfix]DecodeImage使用pil backend时,image类型应转为RGB
  2. [bugfix]MixupOperatorCutmixOperatorFmixOperator中,索引打乱的方法存在一定缺陷,np.random.permutation可能造成部分索引在打乱前后顺序不变。改为逆序打乱索引。
  3. [bugfix] 当使用checkpoint恢复训练时,更新sampler中的epoch为当前的epoch
  4. [update]RandCropImage添加use_log_aspect的支持
  5. [add] 增加RandAugmentV3,用于MobileViTv2模型的训练
  6. [add] 增加MobileViTv2算法,包括model、config、test_tipc、doc

复现精度

测试

Models Top1 Top5 Reference
top1
Reference
top5
FLOPs
(G)
Params
(M)
MobileViTv2_x0_5 0.7017 0.8988 0.7018 - 480.46 1.37
MobileViTv2_x1_0 0.7813 0.9417 0.7809 - 1843.81 4.90
MobileViTv2_x1_5 0.8034 0.9509 0.8038 - 4090.07 10.60
MobileViTv2_x2_0 0.8116 0.9537 0.8117 - 7219.23 18.45

训练

训练平台为AIStudio,PaddlePaddle2.4.0 with V100*4

Models Top1 Top5 Reference
top1
Reference
top5
weight & log
MobileViTv2_x1_5 0.8045 0.9503 0.8038 - best_model_ema.ema.params & train*.log

权重及训练日志下载地址:百度网盘

@flytocc flytocc changed the title Mobile vi t v2 [飞桨黑客松第四期] (127) MobileViTv2 Mar 16, 2023
@Ligoml
Copy link
Collaborator

Ligoml commented Mar 21, 2023

@weisy11 请review下这道黑客松题目 谢谢

Copy link
Collaborator

@TingquanGao TingquanGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

验收通过:
MobileViT_x1_5: top1 acc 0.8038

docs/zh_CN/models/ImageNet1k/MobileViTv2.md Outdated Show resolved Hide resolved
docs/zh_CN/models/ImageNet1k/MobileViTv2.md Outdated Show resolved Hide resolved
docs/zh_CN/models/ImageNet1k/MobileViTv2.md Outdated Show resolved Hide resolved
docs/zh_CN/models/ImageNet1k/README.md Outdated Show resolved Hide resolved
docs/zh_CN/models/ImageNet1k/README.md Outdated Show resolved Hide resolved
ppcls/arch/backbone/model_zoo/mobilevit_v2.py Outdated Show resolved Hide resolved
ppcls/configs/ImageNet/MobileViTv2/MobileViTv2_x0_5.yaml Outdated Show resolved Hide resolved
ppcls/configs/ImageNet/MobileViTv2/MobileViTv2_x1_5.yaml Outdated Show resolved Hide resolved
ppcls/data/preprocess/batch_ops/batch_operators.py Outdated Show resolved Hide resolved
TingquanGao
TingquanGao previously approved these changes Apr 19, 2023
Copy link
Collaborator

@TingquanGao TingquanGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TingquanGao TingquanGao merged commit 0af4680 into PaddlePaddle:develop Apr 19, 2023
@flytocc flytocc deleted the MobileViT-v2 branch April 19, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants