当前位置:网站首页>MobileOne: 移动端仅需1ms的高性能骨干
MobileOne: 移动端仅需1ms的高性能骨干
2022-06-29 03:33:00 【AI视觉网奇】
开源地址:
GitHub - shoutOutYangJie/MobileOne: An Improved One millisecond Mobile Backbone
1060显卡上,224*224,cpu上10ms,gpu上3ms。
测试代码:
if __name__ == '__main__':
model = make_mobileone_s0().cuda(0)
model.eval()
data = torch.rand(1, 3, 224, 224).cuda(0)
for i in range(10):
start = time.time()
out = model(data)
print('time', time.time() - start, out.size())MobileOne(≈MobileNetV1+RepVGG+训练Trick)是由Apple公司提出的一种基于iPhone12优化的超轻量型架构,在ImageNet数据集上以<1ms的速度取得了75.9%的Top1精度。

为更好的分析高效率网络的瓶颈所在,作者以iPhone12平台为基准,从不同维度进行了"瓶颈"分析,见上图。从中可以看到:
具有高参数量的模型也可以拥有低延迟,比如ShuffleNetV2;
具有高FLOPs的模型也可以拥有低延迟,比如MobileNetV1和ShuffleNetV2;

上表从SRCC角度进行了分析,可以看到:
在移动端,延迟与FLOPs和参数量的相关性较弱;
在PC-CPU端,该相关性进一步弱化。
具体方案
基于上述洞察,作者从先两个主要效率"瓶颈"维度上进行了对比,然后对性能"瓶颈"进行了分析并提出相应方案。

Activation Functions:上表对比了不同激活函数对于延迟的影响,可以看到:尽管具有相同的架构,但不同激活函数导致的延迟差异极大。本文默认选择ReLU激活函数。

Architectural Block:上表对影响延迟的两个主要因素(访存消耗与计算并行度)进行了分析,见上表,可以看到:当采用单分支结构时,模型具有更快的速度。此外,为改善效率,作者在大模型配置方面有限的实用了SE模块。

基于上述分析,MobileOne的核心模块基于MobileNetV1而设计,同时吸收了重参数思想,得到上图所示的结构。注:这里的重参数机制还存在一个超参k用于控制重参数分支的数量(实验表明:对于小模型来说,该变种收益更大)。

在Model Scaling方面类似MobileNetV2,上表给出了MobileOne不同配置的参数信息。

在训练优化方面,小模型需要更少的正则,因此作者提出了Annealing的正则调整机制(可带来0.5%指标提升);此外,作者还引入渐进式学习机制(可带来0.4%指标提升);最后,作者还采用EMA机制,最终MobileOne-S2模型达到了77.4%的指标。
实验结果

上表给出了ImageNet数据集上不同轻量型方案的性能与效率对比,可以看到:
哪怕最轻量的Transformer也需要至少4ms,而MobileOne-S4仅需1.86ms即可达到79.4%的精度;
相比EfficientNet-B0,MobileOne-S3不仅具有指标高1%,同时具有更快的推理速度;
相比其他方案,在PC-CPU端,MobileOne仍具有非常明显的优势。

上表为MS-COCO检测、VOC分割以及ADE20K分割任务上的性能对比,很明显:
在MC-COCO任务上,MobileOne-S4比MNASNet指标高27.8%,比MobileViT高6.1%;
在VOC分割任务上,所提方案比MobileViT高1.3%,比MobileNetV2高5.8%;
在ADE20K任务上,所提最佳方案比MobileNetV2高12%,而MobileOne-S1仍比MobileNetV2高2.9%。

在文章最后,作者俏皮的提了一句:"Although, our models are state-of-the art within the regime of efficient architectures, the accuracy lags large models ConvNeXt and Swin Transformer"。笔者想说的是:看上图。
边栏推荐
- Laravel, execute PHP artist migrate and report an error alter table `users`add unique `users_ email_ unique`(`email`))
- Preliminary construction of SSM project environment
- 87. (cesium chapter) cesium thermal map (pasted with terrain)
- 人大金仓(KingBase)导出表结构
- 【TcaplusDB知识库】TcaplusDB-tcaplusadmin工具介绍
- vim配置与使用
- Want to be an equipment manager? If you meet these three conditions, you can
- 【面试指南】AI算法面试
- [test theory] quality analysis ability
- 【Ubuntu】【Mysql】ubuntu安装了mysql 但是编译报错 mysql.h: No such file or directory
猜你喜欢

MATALB signal processing - signal transformation (7)
![[tcapulusdb] I wish you all a healthy Dragon Boat Festival!](/img/f8/d790cc38a0e1c4d6c3bd27d7158c4a.png)
[tcapulusdb] I wish you all a healthy Dragon Boat Festival!

VIM configuration and use

【面试指南】AI算法面试

Installation and deployment of sw-x framework

人大金仓(KingBase)导出表结构

【TcaplusDB知识库】修改业务修改集群cluster

87. (cesium chapter) cesium thermal map (pasted with terrain)
![Sequence traversal of binary tree ii[one of sequence traversal methods - > recursive traversal + level]](/img/f9/efb73dd6047e6d5833581376904788.png)
Sequence traversal of binary tree ii[one of sequence traversal methods - > recursive traversal + level]

如何理解MySQL的索引?
随机推荐
【TcaplusDB知识库】TcaplusDB技术支持介绍
【TcaplusDB知识库】修改业务修改集群cluster
二叉树的锯齿形层序遍历[分层遍历方式之一 -> 前序遍历+level]
Digital twin application of smart Park Based on Web GIS aerial photography
Solid state and memory module purchase
19.03 vessel description and simple application examples continued
Etcd教程 — 第七章 Etcd之事务API
Get error: Unsupported fork ordering: eip150block not enabled, but eip155block enabled at 0
Common methods of JS date and time
Seekbar custom pictures are not displayed completely up, down, left, right / bitmaptodrawable / bitmaptodrawable inter rotation / paddingstart/paddingend /thumboffset
gcc编译器包
Gcc compiler package
【TcaplusDB知识库】查看tcapdir目录服务器
Supplement to the scheme of gateway+nacos+knife4j (swagger)
An internal error occurred during: 'Retrieving archetypes:'.
Seura 2测试代码总结
Vscode plug-in used now
SQL performance optimization is really eye popping
88.(cesium篇)cesium聚合图
【若依(ruoyi)】ztree初始化