As a traditional staple food, rice plays a vital role in feeding our population. With projected global population growth, rice demand is expected to increase by 30% by 2050 [
1]. The rice processing chain—comprising cleaning, hulling, milling, finishing, and packaging—relies critically on the hulling stage. This key process determines both processing efficiency and final product quality [
2]. During this stage, a rubber roller huller removes paddy grain husks through the friction generated between its rubber rollers [
3]. The shelling rate [
4] and brown rice breakage rate [
5] directly impact both product quality and economic value. A low shelling rate indicates ineffective recycling and reprocessing of unshelled rice grains, leading to raw material waste. Conversely, a high brown rice breakage rate increases the quantity of broken grains during subsequent milling, thereby reducing the market value of the finished rice [
6]. Consequently, the shelling rate and brown rice breakage rate serve as critical performance indicators for rubber roller hullers. However, current industry practice predominantly relies on manual sampling for monitoring these two indicators. This method suffers from low efficiency, poor timeliness, and susceptibility to sampling inaccuracies. Consequently, operators struggle to capture huller operating status accurately and promptly, ultimately compromising quality control and production efficiency at this critical processing stage [
7].
Driven by rapid advances in deep learning and continuous improvements in computational hardware, object detection methodologies have transitioned from traditional feature-engineering approaches to contemporary deep learning-based frameworks [
8]. Contemporary object detection methodologies are primarily categorized into two paradigms. One consists of two-stage algorithms, exemplified by Fast R-CNN and Faster R-CNN [
9], which first generate region proposals then perform classification and localization. For instance, in agricultural grain inspection applications, Wu et al. [
10] developed a specialized detection framework based on Faster R-CNN, achieving effective wheat grain detection and counting under complex backgrounds, multiangle perspectives, and varying degrees of grain density. Nevertheless, despite its robust detection performance, the method’s computationally intensive architecture and processing complexity hinder real-time implementation, limiting its practical deployment in high-throughput agricultural scenarios. In contrast, single-stage detection frameworks, exemplified by YOLO (You Only Look Once), achieve a favorable balance between speed and accuracy, enabling real-time object detection with minimal computational overhead. This efficiency makes them particularly suitable for time-sensitive grain inspection tasks, where rapid and accurate analysis of paddy grains, wheat kernels, or other cereals is critical for quality control and yield estimation. As a result, YOLO-based architectures have been widely adopted in grain inspection applications in recent years. For instance, Liu et al. [
11] proposed an enhanced YOLOv5 model for broken rice detection. Experimental results demonstrated that the enhanced model achieved a mean Average Precision (mAP) of 98.9%, representing a 0.3% improvement over the baseline YOLOv5, while reducing both model parameters and computational complexity by over 85%. Addressing the challenges of similar-sized corn kernels and impurities, high object density, and small target dimensions, Zhang et al. [
12] developed an enhanced YOLOv8 architecture. Their method achieved 95.33% precision for broken detection and 96.15% for impurity detection. To develop a rapid and nondestructive method for rice mold detection, Sun et al. [
13] proposed a detection framework based on YOLOv5 that identifies mold-infected regions and quantifies their coverage areas in rice samples. The model achieved a precision of 82.1% and recall of 86.5% on the validation set, demonstrating its effectiveness in automated mold assessment under controlled conditions. Recent years have witnessed lightweight network architectures emerging as a key research focus to enhance model deployability in real-world applications. Exemplifying this trend, Li et al. [
14] enhanced YOLOv7-tiny through a lightweight feature extraction backbone and decoupled head structure, simultaneously improving detection precision and inference efficiency. To address issues of insufficient detection accuracy, slow inference speed, and high computational resource consumption, Wang et al. [
15] substituted the backbone structure of YOLOv8 with MobileNetV3-small. This modification reduced model complexity while maintaining accuracy. Furthermore, the Ghost convolution (GsConv) module was integrated to enhance the feature extraction network, optimizing particle identification and localization. Experimental results demonstrated that the enhanced YOLOv8 achieved 97.4% accuracy, with a 66% reduction in parameters and a 70.7% reduction in computational complexity (FLOPs). To achieve accurate in situ detection and identification of maize pests and diseases, Shi et al. [
16] employed EfficientViT as the backbone network to reduce computational complexity. Additionally, they introduced spatial channel reconstruction convolution (SCConv) into the C2f module to enhance feature extraction performance. The improved model, termed YOLOv8-EGCW, was evaluated on a custom-built maize pest and disease dataset, achieving a mean average precision (mAP) of 93.4%.
Despite significant progress in improving grain detection accuracy and model lightweight, a critical gap remains in the development of real-time, lightweight methods specifically tailored for the accurate quantification of rice hulling performance metrics—namely, the shelling rate (SR) and brown rice breakage rate (BR). Current approaches still face persistent challenges such as missed detections and misclassification when processing high-density rice grain images. For instance, Zou et al. [
17] demonstrated that in high-density paddy imaging scenarios, traditional detection algorithms struggle to distinguish individual rice grains because of morphological homogeneity and occlusion effects, particularly under partial occlusion conditions. Sun et al. [
18] further revealed that severe occlusion in certain panicle categories can result in nearly half of the grains remaining undetected, which significantly compromises counting accuracy. These issues reflect four major limitations of existing methods: (1) data scarcity: high-quality annotated datasets specifically designed for SR/BR detection tasks are largely lacking, limiting model training and generalization capabilities; (2) morphology blindness: conventional models fail to fully exploit critical morphological features of rice grains, such as geometric shape and husk texture, leading to misclassification between intact and broken grains; (3) density-induced errors: in densely packed and overlapping scenarios, high miss rates severely impact counting accuracy, making reliable detection difficult; (4) accuracy–efficiency tradeoff: lightweight models often sacrifice detection accuracy for speed, while high-accuracy models tend to be computationally intensive, posing challenges for real-time deployment. These limitations collectively hinder the practical implementation of automated, real-time SR/BR monitoring systems, which are essential for optimizing rice milling efficiency and quality control.
To address the aforementioned challenges in real-time quantification of rice hulling performance metrics, this study proposes a lightweight rice grain detection framework based on an improved YOLOv8n architecture. The key contributions include: (1) the construction of a high-quality image dataset covering representative rice varieties under diverse illumination conditions and key grain states relevant to hulling quality assessment; (2) the design and implementation of a novel, lightweight detection model incorporating architectural enhancements—including a C2f-Faster-CGLU backbone, BiFPN-based multiscale feature fusion, AFGC fine-grained attention mechanism, and a customized lightweight Detect_Rice detection head—to improve detection accuracy and efficiency for dense, small-target rice grains; and (3) the development of a robust mass–count conversion model that enables accurate quantification of both shelling rate (SR) and brown rice breakage rate (BR), meeting the requirements specified in the national standard GB/T 29898-2013 [
19]. This work lays a solid technical foundation for intelligent rice hulling and processing systems.