Shanshan Hu , Guoxin Tang , Kang Yu , Wen Chen , Zhiwei Wang
{"title":"嵌入式YOLO v8:通过快速结构修剪方法实时检测复杂自然环境中的甘蔗节点","authors":"Shanshan Hu , Guoxin Tang , Kang Yu , Wen Chen , Zhiwei Wang","doi":"10.1016/j.measurement.2024.116291","DOIUrl":null,"url":null,"abstract":"<div><div>In the exploring of sugarcane intelligent harvesting technology, the target detection task of sugarcane node faces serious challenges on low detection accuracy affected by complex natural environment and the time-consuming task to lightweight algorithm structure. In addition, the classical target detection model, such as YOLO (You Only Look Once), with requirement of huge computationally ability puts huge computing pressure to the embedded device for sugarcane nodes detection. In order to solve these problems, this study proposed an improved YOLOv8n-ghost, which adopted Ghost module to build lightweight network and reduce model redundancy while ensuring performance. The dataset was extended and diversified by data classification and enhancement to increasing the robustness and generalization ability of the model. The structured pruning method based on DepGraph (Dependency Graph) was adopted to compress the optimized model, which greatly reduced the complexity of the model. To reduce experimentation time and computational cost, a rapid method for the optimal pruning rate was proposed by combination of big-small step size to quickly achieve the optimal pruning rate with shorter experiment time and satisfied accuracy. By comparison of different pruning methods and lightweight methods, the AP (Average Precision) of model Pruned 65 %-YOLOv8n-ghost was > 90 % with only 0.53 M parameters and 2.2G FLOPs. Finally, the model was accelerated with TensorRT and tested in the embedded device. The real-time speed of the improved model approached 30 frames per second, which was 200 % higher than before and met the requirements of real-time detection of sugarcane node.</div></div>","PeriodicalId":18349,"journal":{"name":"Measurement","volume":"242 ","pages":"Article 116291"},"PeriodicalIF":5.2000,"publicationDate":"2024-11-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Embedded YOLO v8: Real-time detection of sugarcane nodes in complex natural environments by rapid structural pruning method\",\"authors\":\"Shanshan Hu , Guoxin Tang , Kang Yu , Wen Chen , Zhiwei Wang\",\"doi\":\"10.1016/j.measurement.2024.116291\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>In the exploring of sugarcane intelligent harvesting technology, the target detection task of sugarcane node faces serious challenges on low detection accuracy affected by complex natural environment and the time-consuming task to lightweight algorithm structure. In addition, the classical target detection model, such as YOLO (You Only Look Once), with requirement of huge computationally ability puts huge computing pressure to the embedded device for sugarcane nodes detection. In order to solve these problems, this study proposed an improved YOLOv8n-ghost, which adopted Ghost module to build lightweight network and reduce model redundancy while ensuring performance. The dataset was extended and diversified by data classification and enhancement to increasing the robustness and generalization ability of the model. The structured pruning method based on DepGraph (Dependency Graph) was adopted to compress the optimized model, which greatly reduced the complexity of the model. To reduce experimentation time and computational cost, a rapid method for the optimal pruning rate was proposed by combination of big-small step size to quickly achieve the optimal pruning rate with shorter experiment time and satisfied accuracy. By comparison of different pruning methods and lightweight methods, the AP (Average Precision) of model Pruned 65 %-YOLOv8n-ghost was > 90 % with only 0.53 M parameters and 2.2G FLOPs. Finally, the model was accelerated with TensorRT and tested in the embedded device. The real-time speed of the improved model approached 30 frames per second, which was 200 % higher than before and met the requirements of real-time detection of sugarcane node.</div></div>\",\"PeriodicalId\":18349,\"journal\":{\"name\":\"Measurement\",\"volume\":\"242 \",\"pages\":\"Article 116291\"},\"PeriodicalIF\":5.2000,\"publicationDate\":\"2024-11-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Measurement\",\"FirstCategoryId\":\"5\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0263224124021766\",\"RegionNum\":2,\"RegionCategory\":\"工程技术\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"ENGINEERING, MULTIDISCIPLINARY\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Measurement","FirstCategoryId":"5","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0263224124021766","RegionNum":2,"RegionCategory":"工程技术","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"ENGINEERING, MULTIDISCIPLINARY","Score":null,"Total":0}
引用次数: 0
摘要
在甘蔗智能收获技术的探索中,甘蔗节点的目标检测任务面临着受复杂自然环境影响检测精度低、算法结构轻量化耗时长的严峻挑战。此外,YOLO (You Only Look Once)等经典目标检测模型对计算能力要求很高,对甘蔗节点检测的嵌入式设备带来了巨大的计算压力。为了解决这些问题,本研究提出了一种改进的YOLOv8n-ghost,采用Ghost模块构建轻量级网络,在保证性能的同时减少模型冗余。通过数据分类和增强对数据集进行扩展和多样化,提高模型的鲁棒性和泛化能力。采用基于依赖图(DepGraph)的结构化剪枝方法对优化后的模型进行压缩,大大降低了模型的复杂度。为了减少实验时间和计算成本,提出了一种大小步长相结合的快速最优剪枝率方法,以更短的实验时间和满意的精度快速获得最优剪枝率。通过对不同剪枝方法和轻量化方法的比较,剪枝65% -YOLOv8n-ghost模型的AP (Average Precision)为>;90%,参数为0.53 M, FLOPs为2.2G。最后,利用TensorRT对模型进行加速,并在嵌入式设备上进行测试。改进模型的实时速度接近30帧/秒,比以前提高了200%,满足了甘蔗节点实时检测的要求。
Embedded YOLO v8: Real-time detection of sugarcane nodes in complex natural environments by rapid structural pruning method
In the exploring of sugarcane intelligent harvesting technology, the target detection task of sugarcane node faces serious challenges on low detection accuracy affected by complex natural environment and the time-consuming task to lightweight algorithm structure. In addition, the classical target detection model, such as YOLO (You Only Look Once), with requirement of huge computationally ability puts huge computing pressure to the embedded device for sugarcane nodes detection. In order to solve these problems, this study proposed an improved YOLOv8n-ghost, which adopted Ghost module to build lightweight network and reduce model redundancy while ensuring performance. The dataset was extended and diversified by data classification and enhancement to increasing the robustness and generalization ability of the model. The structured pruning method based on DepGraph (Dependency Graph) was adopted to compress the optimized model, which greatly reduced the complexity of the model. To reduce experimentation time and computational cost, a rapid method for the optimal pruning rate was proposed by combination of big-small step size to quickly achieve the optimal pruning rate with shorter experiment time and satisfied accuracy. By comparison of different pruning methods and lightweight methods, the AP (Average Precision) of model Pruned 65 %-YOLOv8n-ghost was > 90 % with only 0.53 M parameters and 2.2G FLOPs. Finally, the model was accelerated with TensorRT and tested in the embedded device. The real-time speed of the improved model approached 30 frames per second, which was 200 % higher than before and met the requirements of real-time detection of sugarcane node.
期刊介绍:
Contributions are invited on novel achievements in all fields of measurement and instrumentation science and technology. Authors are encouraged to submit novel material, whose ultimate goal is an advancement in the state of the art of: measurement and metrology fundamentals, sensors, measurement instruments, measurement and estimation techniques, measurement data processing and fusion algorithms, evaluation procedures and methodologies for plants and industrial processes, performance analysis of systems, processes and algorithms, mathematical models for measurement-oriented purposes, distributed measurement systems in a connected world.