• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

shoutOutYangJie/MobileOne: An Improved One millisecond Mobile Backbone

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

shoutOutYangJie/MobileOne

开源软件地址(OpenSource Url):

https://github.com/shoutOutYangJie/MobileOne

开源编程语言(OpenSource Language):

Python 100.0%

开源软件介绍(OpenSource Introduction):

MobileOne: An Improved One millisecond Mobile Backbone

This is an un-official implementation of Paper An Improved One millisecond Mobile Backbone, whose performance is close to the paper.

Actually I achieve the MobileOne' s0 architecture (the smallest one), and validate on ImageNet-1000k dataset. And a val accuracy is here.

mobile-one block

Model before merging blocks after merging blocks FLOPS
origin paper (s0) none 71.4 275M
my implementation (s0) 70.470 70.518 274M

Note that I only train a "s0" version, but you can easily modify the code to train other version, please see "mobileone.py" to refer to a configuration.

Different from original paper, We don't use:

  • AutoAugment. In fact, S0 indeed abandons autoaugment.
  • annealed weight decay. I set it constantly 4e-5.
  • label smoothing regularization
  • EMA update strategy
  • progressive learning curriculum. I directly use 224px to train.
  • Custom Weight decay Loss. I directly use WeightDecay in optimizer.

very Important

I thank grygielski for finding a bug of my implementation, which is a very easy-correct mistake. please refer to this issue

Because I don't plan to retrain the model, so I don't want to rewrite the code. For the mistake, you can just delete the "if" condition, like this:

self.dw_bn_layer = nn.BatchNorm2d(in_channels) if out_channels == in_channels and stride == 1 else None

to

self.dw_bn_layer = nn.BatchNorm2d(in_channels)

For validation

I release a pretrained model weight, click here to download. The test script validates the trained model, and also generates a converted deploy model.

python test.py {your imagenet-1000k dataset path} deploy mobileone_s0_hello_best.pth.tar

A converted deploy model is generated at "mobileone_deploy_model.pt" file.

For train

I train the mobileone-s0 on 8 32G-V100 GPUS, costing about 4 days.

python train.py -a mobileone_s0 --dist-url 'tcp://127.0.0.1:23333' --dist-backend 'nccl' --multiprocessing-distributed --world-size 1 --rank 0 --workers 32 {your imagenet-1000k dataset path} --tag hello --wd 4e-5

For use

model = make_mobileone_s0(deploy=True)
model.load(torch.load('mobileone_depoly_model.pt'))
model.cuda()

acknowledgement

The entire code is based on RepVGG repository. Thanks for simply-using code.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mambows/mobilemenu: Turn unorderer list menu into dropdown select menu发布时间:2022-08-30
下一篇:
madbook/reddit-mobile发布时间:2022-08-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap