YOLOv5-based dense rice seed counting method integrating C3CBAM and Soft-NMS
Year: 2026
Type: article
Abstract: • Retain the small-object detection head, remove original medium and large-object heads, propose a tiny rice seed detection head, and optimize the neck network to boost accuracy. • Integrate CBAM attention into C3 modules of YOLOv5 backbone to enhance rice seed feature extraction and detection accuracy. • Adopt Soft-NMS in post-processing to address overlapping boxes of adherent or occluded seeds, reducing misses and improving robustness To improve the counting accuracy in dense rice seed scenarios, this study proposes a YOLOv5-based dense rice seed counting method that integrates C3CBAM and Soft-NMS. This method integrates the CBAM attention module into the shallow C3 modules of the backbone network to enhance image features. Additionally, it removes the original large and medium-sized object detection heads of YOLOv5 and adds a dedicated detection head for tiny rice seeds. For post-processing of model prediction data, the Soft-NMS algorithm is employed to replace standard Non-Maximum Suppression (NMS) and reduce missed detections. Finally, image acquisition, seed counting, and a user interface are integrated into a single system, enabling rice breeders to conduct seed counting tasks more intuitively and efficiently. Compared with the baseline YOLOv5 model, the recall and mAP@[0.5:0.95] of the improved model increase by 6.4% and 5.7%, respectively. Furthermore, this study designs experiments with three levels of seed density. In the intermediate-type rice seed samples, the detection accuracy reaches 100% under light and moderate density conditions, while it maintains stable counting performance under heavy density conditions with an accuracy above 99.7%. This work significantly enhances rice seed counting efficiency for researchers and facilitates rice variety improvement studies.
Source: Smart Agricultural Technology
Authors: Xiaoyang Liu, Xupeng Huang, Rongjin Zhu, Chongyang Hu, Cheng Wang, Chenxin Sun
Institution: Huai'an University
Language: English
Topic: Smart Agriculture and AI
Subfield: Plant Science
Domain: Life Sciences
SDG: Zero hunger
Open Access status: gold
Estimated APC paid: $1,770
Awards: G3641720786, G7511759580, G7783907124
OpenAlex ID: W7118496885
