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

[飞桨黑客松第四期] (128) MobileViTv3 #2691

Merged
merged 14 commits into from
Apr 6, 2023

Conversation

flytocc
Copy link
Contributor

@flytocc flytocc commented Mar 8, 2023

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

修改内容

  1. [bugfix]当DecodeImage使用pil backend时,image类型应转为RGB
  2. [update]ExponentialMovingAverage中使用numpy来完成ema weight的更新,可以一定程度上提速(大概快一倍)
  3. [bugfix]MixupOperatorCutmixOperatorFmixOperator中,索引打乱的方法存在一定缺陷,np.random.permutation可能造成部分索引在打乱前后顺序不变。改为逆序打乱索引。
  4. [update] 为RandCropImage添加use_log_aspect的支持
  5. [bugfix] 修复MultiScaleSamplerepoch不自增的bug
  6. [bugfix] 当使用checkpoint恢复训练时,更新sampler中的epoch为当前的epoch
  7. [add] 增加RandAugmentV3,用于MobileViTv3-v2模型的训练
  8. [add] 增加MobileViTv3算法,包括model、config、test_tipc、doc

复现精度

测试

Models Top1 Top5 Reference
top1
Reference
top5
FLOPs
(G)
Params
(M)
MobileViTv3_XXS 0.7087 0.8976 0.7098 - 289.02 1.25
MobileViTv3_XS 0.7663 0.9332 0.7671 - 926.98 2.49
MobileViTv3_S 0.7928 0.9454 0.7930 - 1841.39 5.76
MobileViTv3_XXS_L2 0.7028 0.8942 0.7023 - 256.97 1.15
MobileViTv3_XS_L2 0.7607 0.9300 0.7610 - 852.82 2.26
MobileViTv3_S_L2 0.7907 0.9440 0.7906 - 1651.96 5.17
MobileViTv3_x0_5 0.7200 0.9083 0.7233 - 481.33 1.43
MobileViTv3_x0_75 0.7626 0.9308 0.7655 - 1064.48 3.00
MobileViTv3_x1_0 0.7838 0.9421 0.7864 - 1875.96 5.14

训练

训练平台AIStudio:python3.7 + paddle2.4.0 + cuda11.2 + 4 * V100 32GB

Models Top1 Top5 Reference
top1
Reference
top5
weight & log
MobileViTv3_S 0.7915 0.9452 0.7928 - best_model_ema.ema.paparams & train.log

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

@paddle-bot
Copy link

paddle-bot bot commented Mar 8, 2023

Thanks for your contribution!

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
Copy link
Collaborator

TODO:
fix bs and lr to unset update_freq

@TingquanGao TingquanGao merged commit a69bc94 into PaddlePaddle:develop Apr 6, 2023
@flytocc flytocc deleted the MobileViT-v3 branch April 6, 2023 07:59
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

2 participants