|
基于嵌入式深度神经网络的杂草识别模型
|
Abstract:
杂草的生存能力强,对环境要求低,分布广泛且随机,必将争夺农作物所需的水分和营养等生存条件,导致农作物的质量和产量有一定程度的降低。为解决以上问题,本文设计了一种基于嵌入式深度神经网络的杂草识别系统,使用嵌入式设备查看农田的杂草分布情况并检测出杂草的具体位置和种类,此时就可以有针对性地去除杂草,提高农作物质量和产量,节约劳动成本,同时保护生态环境。该系统选择YOLO系列算法进行模型训练,并通过模型转换获得合适的模型部署在嵌入式设备上进行目标检测。具体来讲,先筛选足够数量的杂草图像样本,经过手动标记获得对应标签文件,从而获得数据集;而后使用数据集模型训练,本文算法为YOLOv4、YOLOv4-tiny和YOLOx算法,得到PTH模型;PTH模型加载在PC端,PTH模型经模型转换生成TRT模型部署在嵌入式端Jetson Nano上。实验结果表明,采用F1值和mAP值进行模型准确度评估时,YOLOx最高,准确度为80.48%以上;采用计数准确度对目标检测正确率进行评估时,该指标下三个算法均在94%以上;采用单张处理时间进行速度评估时,YOLOv4-tiny作为轻量化网络仅需0.0068 s,嵌入式端仅需0.0453 s,相当于实时检测。
The strong survival ability, low environmental requirements, widespread and random distribution of weeds will inevitably compete for the living conditions such as water and nutrients needed by crops, leading to a certain degree of reduction in crop quality and yield. To solve these problems, this paper designs a weed recognition system based on embedded deep neural network. The sys-tem uses embedded devices to view the distribution of weeds in farmland, detect the specific loca-tion and species of weeds, and remove them in a targeted manner, improving crop quality and yield, saving labor costs, and protecting the ecological environment. This system selects the YOLO series algorithm for model training and deploys the appropriate model on embedded devices for target detection through model conversion. Specifically, a sufficient number of weed image samples are first selected and corresponding label files are obtained through manual labeling to obtain the da-taset. Then, the dataset is used for model training. The algorithms used in this paper are YOLOv4, YOLOv4-tiny, and YOLOx, and the PTH model is obtained. The PTH model is loaded on the PC side, and the TRT model is generated through model conversion and deployed on the embedded Jetson Nano. The experimental results indicate that when evaluating model accuracy using F1 score and mAP (mean Average Precision), YOLOx achieves the highest accuracy, surpassing 80.48%. When evaluating object detection accuracy using counting accuracy, all three algorithms perform above 94% in this metric. For speed evaluation based on single-frame pro- cessing time, YOLOv4-tiny, as a lightweight network, requires only 0.0068 seconds, and on the embedded platform, it takes only 0.0453 seconds, equivalent to real-time detection.
[1] | Sze, V., Chen, Y.H., Yang, T.J. and Emer, J.S. (2017) Efficient Processing of Deep Neural Networks: A Tutorial and Survey. Proceedings of the IEEE, 105, 2295-2329. https://doi.org/10.1109/JPROC.2017.2761740 |
[2] | Zhang, Y., Chan, W. and Jaitly, N. (2017) Very Deep Convolutional Networks for End-to-End Speech Recognition. 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), New Orleans, 5-9 March 2017, 4845-4849. https://doi.org/10.1109/ICASSP.2017.7953077 |
[3] | 王欣, 雷珺, 李小欢, 汤成. 基于深度神经网络的智能交互式学习系统[J]. 电子设计工程, 2022, 30(22): 73-77. |
[4] | 郭圣明, 贺筱媛, 胡晓峰, 吴琳, 欧微. 军用信息系统智能化的挑战与趋势[J]. 控制理论与应用, 2016, 33(12): 1562-1571. |
[5] | 田娜, 杨晓文, 单东林, 吴继成. 我国数字农业现状与展望[J]. 中国农机化学报, 2019, 40(4): 210-213. |
[6] | Lin, G., Tang, Y., Zou, X., Cheng, J. and Xiong, J. (2020) Fruit Detec-tion in Natural Environment Using Partial Shape Matching and Probabilistic Hough Transform. Precision Agriculture, 21, 160-177.
https://doi.org/10.1007/s11119-019-09662-w |
[7] | Gao, J., French, A.P., Pound, M.P., He, Y., Pridmore, T.P. and Pie-ters, J.G. (2020) Deep Convolutional Neural Networks for Image-Based Convolvulus Sepium Detection in Sugar Beet Fields. Plant Methods, 16, 29.
https://doi.org/10.1186/s13007-020-00570-z |
[8] | Liu, J., and Wang, X. (2020) Early Recognition of Tomato Gray Leaf Spot Disease Based on MobileNetv2-YOLOv3 Mode. Plant Methods, 16, 83. https://doi.org/10.1186/s13007-020-00624-2 |
[9] | Mazzia, V., Khaliq, A., Salvetti, F. and Chiaberge, M. (2020) Real-Time Apple Detection System Using Embedded Systems with Hardware Accelerators: An Edge AI Application. IEEE Access, 8, 9102-9114.
https://doi.org/10.1109/ACCESS.2020.2964608 |
[10] | 郭吉政. 免疫卷积神经网络并行优化及其嵌入式系统应用[D]: [硕士学位论文]. 上海: 东华大学, 2015. |
[11] | Cass, S. (2020) Nvidia Makes It Easy to Embed AI: The Jetson Nano Packs a Lot of Machine-Learning Power into DIY Projects-[Hands on]. IEEE Spectrum, 57, 14-16. https://doi.org/10.1109/MSPEC.2020.9126102 |
[12] | 李涛, 温广月, 钱振官, 田志慧, 沈国辉, 梁帝允. 不同类型杂草危害对小麦产量的影响[J]. 中国植保导刊, 2013, 33(4): 28-30. |