Jie Shi, Xinrui Zhang, Yantao Zhao, Zhi Li, Linlin Yang, Wencai Yang
{"title":"A grain flow detection method based on an improved YOLOv8n model and dual-line counting with a multi-criterion discrimination mechanism","authors":"Jie Shi, Xinrui Zhang, Yantao Zhao, Zhi Li, Linlin Yang, Wencai Yang","doi":"10.1016/j.atech.2025.101728","DOIUrl":null,"url":null,"abstract":"<div><div>To support non-contact grain yield monitoring in smart agriculture, this study presents a deep learning-based method for grain flow detection. The system includes two core components: an enhanced YOLOv8n detection model and a dual-line counting algorithm guided by multiple decision rules. In real harvesting conditions, challenges such as occlusion, fast grain movement, poor lighting, and small target sizes often lead to missed detections when using standard YOLO models. To improve performance, the YOLOv8n structure is modified in three ways. A minimum point distance IoU loss (MPDIoU) is applied to better distinguish overlapping grains. A spatial-channel shared attention (SCSA) module is added to help the model focus on weak or small grain targets. A lightweight Spatial and Channel reconstruction Convolution (SCConv) module is inserted into the network to reduce computation while maintaining accuracy. As a result, the updated model reaches 90.6 % in precision, 91.4 % in recall, and 94.5 % in mAP, improving the original version by 2.7, 1.7, and 2.5 points. In the counting stage, a dual-line method is used, combining rules such as movement direction checking, two-line crossing validation, abnormal shape removal, and IoU-based filtering. The full system remains stable even when grains move quickly, supporting reliable detection under field conditions.</div></div>","PeriodicalId":74813,"journal":{"name":"Smart agricultural technology","volume":"13 ","pages":"Article 101728"},"PeriodicalIF":7.1000,"publicationDate":"2026-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Smart agricultural technology","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2772375525009591","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2025/12/17 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"AGRICULTURAL ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
To support non-contact grain yield monitoring in smart agriculture, this study presents a deep learning-based method for grain flow detection. The system includes two core components: an enhanced YOLOv8n detection model and a dual-line counting algorithm guided by multiple decision rules. In real harvesting conditions, challenges such as occlusion, fast grain movement, poor lighting, and small target sizes often lead to missed detections when using standard YOLO models. To improve performance, the YOLOv8n structure is modified in three ways. A minimum point distance IoU loss (MPDIoU) is applied to better distinguish overlapping grains. A spatial-channel shared attention (SCSA) module is added to help the model focus on weak or small grain targets. A lightweight Spatial and Channel reconstruction Convolution (SCConv) module is inserted into the network to reduce computation while maintaining accuracy. As a result, the updated model reaches 90.6 % in precision, 91.4 % in recall, and 94.5 % in mAP, improving the original version by 2.7, 1.7, and 2.5 points. In the counting stage, a dual-line method is used, combining rules such as movement direction checking, two-line crossing validation, abnormal shape removal, and IoU-based filtering. The full system remains stable even when grains move quickly, supporting reliable detection under field conditions.