物联网学报 ›› 2023, Vol. 7 ›› Issue (4): 132-141.doi: 10.11959/j.issn.2096-3750.2023.00365
• 理论与技术 • 上一篇
许柏涛, 陈翔
修回日期:
2023-07-27
出版日期:
2023-12-01
发布日期:
2023-12-01
作者简介:
许柏涛(1998- ),男,中山大学电子与信息工程学院硕士生,主要研究方向为物联网、图像识别、边缘计算等基金资助:
Botao XU, Xiang CHEN
Revised:
2023-07-27
Online:
2023-12-01
Published:
2023-12-01
Supported by:
摘要:
在现代农业物联网系统中,边缘计算是不可或缺的组成部分。在此背景下,可将轻量级病虫害图像识别任务置于边缘设备上,然而受限于设备计算和存储能力,该任务面临着不小的挑战。为了解决这些问题,提出了一种以经济实用的STM32为边缘设备进行病虫害图像识别的方法。该方法针对STM32的特点,基于MobileNetv2结构做出改进,并应用量化感知训练技术对神经网络模型进行压缩,提高了模型的可移植性。同时,模型使用X-CUBE-AI部署并进行了性能评估。实验结果表明,改进模型不仅保证了图像分类准确率,而且相较于其他轻量级神经网络,该模型对STM32的Flash与RAM资源的占用有所减小。
中图分类号:
许柏涛, 陈翔. 基于STM32的农业物联网病虫害图像识别算法研究[J]. 物联网学报, 2023, 7(4): 132-141.
Botao XU, Xiang CHEN. Research on agricultural IoT pest and disease image recognition algorithm based on STM32[J]. Chinese Journal on Internet of Things, 2023, 7(4): 132-141.
表2
STM32-MobileNet结构"
输入 | 运行 | t | c | n | s |
1602×3 | Conv2d | - | 32 | 1 | 2 |
802×32 | STM32-block | - | 16 | 1 | 1 |
802×16 | bottleneck | 6 | 24 | 2 | 2 |
402×24 | STM32-block | - | 32 | 2 | 1 |
402×32 | bottleneck | 6 | 64 | 2 | 2 |
202×64 | STM32-block | - | 96 | 3 | 1 |
202×96 | bottleneck | 6 | 160 | 2 | 2 |
102×160 | STM32-block | - | 320 | 1 | 1 |
102×320 | Avgpool | - | - | 1 | - |
1×1×320 | Conv2d 1×1 | - | 1 280 | 1 | 1 |
1×1×1 280 | Conv2d 1×1 | - | k |
表5
五分类苹果叶子病害数据集测试结果"
网络模型 | 准确率(C model) | 准确率(Python model) | Flash/KB | RAM/KB | 参数量 | CPU推理时间/s |
STM32-MobileNet(×0.35) | 90.69% | 91.89% | 256.52 | 137.26 | 139 038 | 512.745 |
FD_MobileNet(×0.35) | 86.39% | 88.72% | 324.49 | 96.12 | 251 429 | 300.733 |
MobileNet(×0.35) | 90.71% | 93.67% | 425.40 | 234.63 | 319 232 | 978.16 |
MobileNetv2(×0.35) | 90.67% | 92.44% | 498.41 | 165.20 | 420 667 | 661.169 |
[1] | 聂鹏程, 张慧, 耿洪良 ,等. 农业物联网技术现状与发展趋势[J]. 浙江大学学报(农业与生命科学版), 2021,47(2): 135-146. |
NIE P C , ZHANG H , GENG H L ,et al. Current situation and development trend of agricultural internet of things technology[J]. Journal of Zhejiang University (Agriculture & Life Sciences), 2021,47(2): 135-146. | |
[2] | TZOUNIS A , KATSOULALS N , BARTZANAS T . Internet of things in agriculture,recent advances and future challenges[J]. Biosystems Engineering, 2017(164): 31-48. |
[3] | 陆林峰, 管孝锋, 黄海龙 ,等. 基于农业物联网的应用平台构建[J]. 浙江农业科学, 2020,61(7): 1455-1457. |
LU L F , GUAN X F , HUANG H L ,et al. Construction of application platform based on agricultural internet of things[J]. Journal of Zhejiang Agricultural Sciences, 2020,61(7): 1455-1457. | |
[4] | ZHOU Y Q , TIAN L , LIU L ,et al. Fog computing enabled future mobile communication networks:a convergence of communication and computing[J]. IEEE Communications Magazine, 2019,57(5): 20-27. |
[5] | ZHOU Y Q , LIU L , WANG L ,et al. Service-aware 6G:an intelligent and open network based on the convergence of communication,computing and caching[J]. Digital Communications and Networks, 2020,6(3): 253-260. |
[6] | ZHANG X H , CAO Z Y , DONG W B . Overview of edge computing in the agricultural internet of things:key technologies,applications,challenges[J]. IEEE Access, 2020(8): 141748-141761. |
[7] | SUNYAEV A . Cloud computing[M]// Internet computing. Cham: Springer International Publishing, 2020. |
[8] | DILLON T , WU C , CHANG E . Cloud computing:issues and challenges[C]// Proceedings of 2010 24th IEEE International Conference on Advanced Information Networking and Applications. Piscataway:IEEE Press, 2010: 27-33. |
[9] | ALAM T . Cloud computing and its role in the information technology[J]. IAIC Transactions on Sustainable Digital Innovation (ITSDI), 2020,1(2): 108-115. |
[10] | 杨英茹, 吴华瑞, 张燕 ,等. 基于复杂环境的番茄叶部图像病虫害识别[J]. 中国农机化学报, 2021,42(9): 177-186. |
YANG Y R , WU H R , ZHANG Y ,et al. Tomato disease recognition using leaf image based on complex environment[J]. Journal of Chinese Agricultural Mechanization, 2021,42(9): 177-186. | |
[11] | 赵立新, 侯发东, 吕正超 ,等. 基于迁移学习的棉花叶部病虫害图像识别[J]. 农业工程学报, 2020,36(7): 184-191. |
ZHAO L X , HOU F D , LYU Z C ,et al. Image recognition of cotton leaf diseases and pests based on transfer learning[J]. Transactions of the Chinese Society of Agricultural Engineering, 2020,36(7): 184-191. | |
[12] | 钟林忆, 刘海峰, 董力中 ,等. 计算机视觉下的农作物病虫害图像识别研究[J]. 现代农业装备, 2021,42(1): 51-55. |
ZHONG L Y , LIU H F , DONG L Z ,et al. Image recognition of crop diseases and insect pests based on computer vision[J]. Modern Agricultural Equipments, 2021,42(1): 51-55. | |
[13] | 季力 . 基于 STM32 芯片的电参数测量与数据传输[J]. 自动化与仪器仪表, 2010(3): 137-139. |
JI L . Power measurement and data transmission based on STM32 chip[J]. Automation & Instrumentation, 2010(3): 137-139. | |
[14] | JACKO P , BERE? M , KOVá?OVá I ,et al. Remote IoT education laboratory for microcontrollers based on the STM32 chips[J]. Sensors (Basel,Switzerland), 2022,22(4): 1440. |
[15] | SANDLER M , HOWARD A , ZHU M L ,et al. MobileNetv2:inverted residuals and linear bottlenecks[C]// Proceedings of 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway:IEEE Press, 2018: 4510-4520. |
[16] | OSMAN A , ABID U , GEMMA L ,et al. TinyML platforms benchmarking[C]// International Conference on Applications in Electronics Pervading Industry,Environment and Society. Cham:Springer, 2022: 139-148. |
[17] | CHEN Y P , DAI X Y , CHEN D D ,et al. Mobile-former:bridging MobileNet and transformer[C]// Proceedings of 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway:IEEE Press, 2022: 5260-5269. |
[18] | QIN Z , ZHANG Z N , CHEN X T ,et al. FD-MobileNet:improved mobilenet with a fast downsampling strategy[C]// Proceedings of 2018 25th IEEE International Conference on Image Processing (ICIP). Piscataway:IEEE Press, 2018: 1363-1367. |
[19] | HE K M , ZHANG X Y , REN S Q ,et al. Deep residual learning for image recognition[C]// Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway:IEEE Press, 2016: 770-778. |
[20] | HAN K , WANG Y H , TIAN Q ,et al. GhostNet:more features from cheap operations[C]// Proceedings of 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway:IEEE Press, 2020: 1577-1586. |
[21] | YANG J W , SHEN X , XING J ,et al. Quantization networks[C]// Proceedings of 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway:IEEE Press, 2020: 7300-7308. |
[22] | LIU Z , WANG Y , HAN K ,et al. Post-training quantization for vision transformer[J]. Advances in Neural Information Processing Systems, 2021(34): 28092-28103. |
[23] | JACOB B , KLIGYS S , CHEN B ,et al. Quantization and training of neural networks for efficient integer-arithmetic-only inference[C]// Proceedings of 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway:IEEE Press, 2018: 2704-2713. |
[24] | 周敏敏 . 基于迁移学习的苹果叶面病害 Android 检测系统研究[D]. 杨凌:西北农林科技大学, 2019. |
ZHOU M M . Research on android detection system of apple leaf diseases based on transfer learning[D]. Yangling:Northwest A & F University, 2019. | |
[25] | JORDAN A A , PEGATOQUET A , CASTAGNETTI A ,et al. Deep learning for eye blink detection implemented at the edge[J]. IEEE Embedded Systems Letters, 2021,13(3): 130-133. |
[26] | FALBO V , APICELLA T , AURIOSO D ,et al. Analyzing machine learning on mainstream microcontrollers[C]// International Conference on Applications in Electronics Pervading Industry,Environment and Society. Cham:Springer, 2020: 103-108. |
[27] | ALONGI F , GHIELMETTI N , PAU D ,et al. Tiny neural networks for environmental predictions:an integrated approach with miosix[C]// Proceedings of 2020 IEEE International Conference on Smart Computing (SMARTCOMP). Piscataway:IEEE Press, 2020: 350-355. |
[28] | SAILESH M , SELVAKUMAR K , PRASANTH N . A novel framework for deployment of CNN models using post-training quantization on microcontroller[J]. Microprocessors and Microsystems, 2022(94): 104634. |
[29] | MERENDA M , PORCARO C , DELLA CORTE F G . LED junction temperature prediction using machine learning techniques[C]// Proceedings of 2020 IEEE 20th Mediterranean Electrotechnical Conference (MELECON). Piscataway:IEEE Press, 2020: 207-211. |
[30] | CAPOTONDI A , RUSCI M , FARISELLI M ,et al. CMix-NN:mixed low-precision CNN library for memory-constrained edge devices[J]. IEEE Transactions on Circuits and Systems II:Express Briefs, 2020,67(5): 871-875. |
[1] | 王珺, 马建炜, 罗金喜. 一种应用于边缘计算的区块链分片方案[J]. 物联网学报, 2023, 7(4): 88-100. |
[2] | 江雪, 赵亮. 无人机辅助移动边缘计算网络中轨迹设计和带宽分配策略[J]. 物联网学报, 2023, 7(4): 123-131. |
[3] | 袁培燕, 邵赛珂, 魏然, 张俊娜, 赵晓焱. 基于时延和能耗约束的感知数据协作卸载策略研究[J]. 物联网学报, 2023, 7(1): 109-117. |
[4] | 刘耀, 何岳园, 周红静, 李超良, 李闯. 移动边缘计算中基于资源联合分配的部分计算卸载方法[J]. 物联网学报, 2023, 7(1): 140-148. |
[5] | 苏麟, 党小超, 郝占军, 汝春瑞, 尚旭. 基于WPT-MEC的动态自适应卸载方法[J]. 物联网学报, 2022, 6(4): 128-138. |
[6] | 李贤, 毕宿志, 曾泓儒, 林彬, 林晓辉. 基于智能化用户协作的边缘计算任务卸载与资源分配优化[J]. 物联网学报, 2022, 6(4): 41-52. |
[7] | 孙君, 赵尚维康. 工业物联网中基于Sarsa算法的节能计算卸载方案[J]. 物联网学报, 2022, 6(3): 82-90. |
[8] | 张美楠, 张鸣琪, 丁飞, 庄衡衡, 马海蓉. 星地融合中继网络时延与能耗边缘优化卸载策略[J]. 物联网学报, 2022, 6(3): 124-132. |
[9] | 方娟, 叶志远, 张梦媛, 史佳眉, 滕自怡. 边云协同场景下基于强化学习的精英分层任务卸载策略研究[J]. 物联网学报, 2022, 6(1): 91-100. |
[10] | 苏新, 江苏, 周一青. 面向海洋观监测传感网的移动终端位置隐私保护研究[J]. 物联网学报, 2021, 5(4): 26-36. |
[11] | 曾德泽, 陈律昊, 顾琳, 李跃鹏. 云原生边缘计算:探索与展望[J]. 物联网学报, 2021, 5(2): 7-17. |
[12] | 张琪, 蒋宇娜, 葛晓虎, 李永会. 基于最优运输理论的物联网边缘计算资源优化机制[J]. 物联网学报, 2021, 5(2): 60-70. |
[13] | 袁昊, 郭得科, 唐国明, 罗来龙. 边缘计算中具有QoS保证的在线能耗感知任务分派[J]. 物联网学报, 2021, 5(2): 71-77. |
[14] | 路静, 李晗琳, 高林. 移动边缘计算任务切分与最优卸载算法设计[J]. 物联网学报, 2021, 5(2): 78-86. |
[15] | 张厚浩, 李晗琳, 高林. 移动边缘计算中的分层资源部署与共享策略[J]. 物联网学报, 2021, 5(1): 11-18. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||
|