# SPL-YOLOv8: A Lightweight Method for Rape Flower Cluster Detection and Counting Based on YOLOv8n
## 1 Introduction
For example, [PERSON]'s [18] TasselNetV2++ uses a dual-branch network with multi-scale feature fusion to enhance feature extraction across various scenarios. This method achieved an RMSE reduction of over 8.0% on datasets including soybean seedlings, wheat spikes, corn ears, and sorghum heads. These techniques don't require precise detection and localization of each object, giving them an advantage when dealing with densely distributed targets. However, they lack information on the position of counted objects, which means they can't reflect the geometric information of targets like wheat spikes. This limits their application in precision agriculture. To solve this problem, detection-based counting methods have gained research attention. These methods count objects by precisely detecting and locating them, providing additional positional and geometric information. For instance, [PERSON] [19] evaluated the SwinT-YOLO method on a corn tassel dataset, achieving a detection accuracy of 95.11% and demonstrating its potential for real-time corn tassel detection in field conditions. [PERSON] [20] used UAV RGB images to count rice plants, [PERSON] [21] identified volunteer cotton plants in cornfields via UAV RGB imagery, [PERSON] [22] successfully detected and counted citrus trees using a UAV platform, and [PERSON] [23] developed a multi-scale feature enhancement network for wheat spike detection and counting in complex scenes, constructing a dense wheat spike dataset with UAV-acquired data. Against the backdrop of continuous advancements in computer vision technology and the growing demand for precision agriculture applications, research on rape flower clusters monitoring and counting has achieved significant progress [7]. Currently, automatic recognition and counting of rapeseed flower clusters have been successfully realized. However, existing models have revealed a critical issue in practical applications: their high complexity has not yet met lightweight standards. As a result, these models require substantial computational resources for deployment and operation, limiting their widespread adoption in agricultural settings. Detecting rape flower clusters in UAV orthophoto mosaics presents challenges due to their small size, which provides insufficient feature information for recognition. Frequent occlusion between rapeseed inflorescences often leads to missed detections and inaccurate localization [7]. Field edge computing devices have limited processing power, making it crucial to balance computational cost and real-time monitoring capabilities. Scholars have extensively studied lightweight detection technologies for crop phenotyping in large-field environments. The YOLOv8 [24] model stands out for its exceptional accuracy and rapid detection speed, capable of recognizing multiple object types in high-resolution images. Inspired by this, this paper proposes the SPL-YOLOv8 detection model (where \"SPL\" represents the initials of the three improvements in the model: \"S\" for \"StarNet\", \"P\" for \"PGD\", and \"L\" for \"Lamp\"). The model significantly enhances the efficiency of rapeseed inflorescence detection through three key strategies by making major improvements to the backbone and neck of the YOLOv8 network. The main contributions of this paper are as follows:  
(1) StarNet lightweight backbone network is proposed: as the backbone network of the model, StarNet significantly reduces the computational complexity and the amount of parameters by optimizing the network structure, while maintaining efficient feature extraction ability, which provides a strong basic support for subsequent detection tasks. (2) Design C2f-Star feature fusion module: by extending the spatial dimension of features, the C2f-Star module enhances the feature expression ability, effectively reduces the impact of occlusion and overlap on detection performance, and significantly improves the adaptability and robustness of the model in complex scenes.