当前位置:网站首页>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"。笔者想说的是:看上图。
边栏推荐
- 深度解析“链动2+1”模式的商业逻辑
- 设备监理师证书含金量怎样?值得考吗?
- [tcaplusdb knowledge base] Introduction to tcaplusdb tcapulogmgr tool (II)
- [World Ocean Day] tcapulusdb calls on you to protect marine biodiversity together
- How to understand MySQL indexes?
- 微秒级 TCP 时间戳
- 【TcaplusDB知识库】TcaplusDB表数据缓写介绍
- Digital twin application of smart Park Based on Web GIS aerial photography
- An internal error occurred during: 'Retrieving archetypes:'.
- [data update] NPU development data based on 3568 development board is fully upgraded
猜你喜欢
![[interview guide] AI algorithm interview](/img/00/918608afe7f2b8e4fd89770b512b41.png)
[interview guide] AI algorithm interview

High performance current limiter guava ratelimiter

【TcaplusDB知识库】TcaplusDB-tcaplusadmin工具介绍

Grafana入门教程
![[tcaplusdb knowledge base] view tcapdir directory server](/img/b6/f3734dfb03ec789525636335457b99.png)
[tcaplusdb knowledge base] view tcapdir directory server

An annotation elegant implementation of interface data desensitization
[email protected]"/>Unable to locate program input point [email protected]

Digital twin application of smart Park Based on Web GIS aerial photography

2D human posture estimation deeppose
![[tcapulusdb] I wish you all a healthy Dragon Boat Festival!](/img/f8/d790cc38a0e1c4d6c3bd27d7158c4a.png)
[tcapulusdb] I wish you all a healthy Dragon Boat Festival!
随机推荐
The efficiency of 20 idea divine plug-ins has been increased by 30 times, and it is necessary to write code
人大金仓(KingBase)导出表结构
Open source demo| you draw and I guess -- make your life more interesting
做 SQL 性能优化真是让人干瞪眼
Implementing mqtt communication with PHP
【TcaplusDB知识库】TcaplusDB数据导入介绍
凌晨三点学习的你,感到迷茫了吗?
SSH无密码登陆
Distributed ID solution
Digital twin application of smart Park Based on Web GIS aerial photography
Efficientnetv2 - get smaller models and faster training with NAS, scaling, and fused mbconv
Grafana入门教程
Same tree [from part to whole]
Input input box click with border
Why is informatization ≠ digitalization? Finally someone made it clear
Modstart rewrite rule
【TcaplusDB知识库】TcaplusDB技术支持介绍
[ruoyi] ztree initialization
【TcaplusDB知识库】修改业务修改集群cluster
leetcode:560. 和为 K 的子数组