EggYOLOPlant: optimized YOLOv8 for real-time eggplant seedling center detection
摘要
The current level of mechanization in the eggplant planting industry is low, with most planting processes still carried out manually. In the context of using agricultural machinery for automated operations, such as automatic pesticide spraying, the real-time detection of eggplant seeding centers is a crucial step. An EggYOLOPlant real-time detection model is designed to address the challenges of detecting the seedling centers by the diverse appearance features of the eggplant in complex planting environments, where there are different lighting conditions on sunny days, cloudy days, and evenings, as well as the presence of many weeds. We constructed a small dataset using real-world images of eggplant seedlings captured in their natural environment, which was used to train and evaluate EggYOLOPlant as well as other object detection models. The EggYOLOPlant model is based on an enhanced YOLOv8 architectural framework. The original backbone was replaced with an Mblock-based architecture, which originates from MobileNetV3’s feature extraction module. Additionally, we replaced the C2f model in the Neck layer with the C2f-faster model. The Grad-CAM visualization of the backbone layer outputs revealed that EggYOLOPlant’s feature activations were more focused on target regions than YOLOv8, demonstrating superior background suppression. The experimental results demonstrate that EggYOLOPlant achieves 94.7% precision (P) and 95.9% mAP50 on the test set, representing a + 4.0% (P) and + 3.8% (mAP50) improvement compared to the baseline YOLOv8 model (90.7% P, 92.1% mAP50). Additionally, the number of parameters has been reduced from 2.7 to 1.9 M (a 30% decrease), while the FPS has increased from 267 to 294, achieving a 10.1% improvement in speed. In comparison to Faster-RCNN, YOLOv5s, RT-DETR, and YOLO11s, the mAP50 of this model demonstrates an improvement of 3.2%, 1.8%, 3.5% and 1.5%, respectively. Moreover, the detection speed exhibits a notable enhancement, reaching approximately 24 times, 1.59 times, 1.95 times, and 1.61 times that of the aforementioned models, respectively. Furthermore, we deployed EggYOLOPlant on the Honor X10 smartphone using the NCNN framework, achieving an average runtime speed of 25.2 FPS, thereby preliminarily validating the model’s real-time performance on mobile devices.