ABSTRACT Accurate classification of rice grains with different milling degrees is essential for intelligent agricultural processing. In order to tackle this problem, we propose an enhanced object detection algorithm built upon YOLOv8n, named YOLOv8n‐FGLW. A high‐quality rice grain dataset with different milling degrees was first constructed, including images of coarsely milled, moderately milled, and finely milled grains. The YOLOv8n‐FGLW model integrates the Focusing Diffusion Pyramid Network (FDPN) to enhance multi‐scale feature extraction and employs the Global–Local Self‐Attention (GLSA) mechanism to strengthen spatial feature learning. Then, a Lightweight Asymmetric Detection Head (LADH) is designed to reduce computational cost while maintaining high detection accuracy. Finally, the Wise‐IoU loss function was applied to improve bounding box regression precision. The findings demonstrate that the proposed algorithm achieves strong performance in rice grain detection. The model achieves a precision of 0.979, recall of 0.980, mAP50 of 0.993, mAP50‐95 of 0.966, and FPS of 24.4, while reducing GFLOPs by 1.0 and parameters by 14.7%. The proposed model shows effectiveness in rice grain detection tasks and highlights its potential for deployment in intelligent grain grading systems.
Yang et al. (Sun,) studied this question.