Design and implementation of a lightweight real-time detection model GCA-YOLOv8n for apple ripeness
收藏资源简介:
Objective To address issues with traditional apple ripeness detection models, including excessive size, slow inference speed and low detection accuracy. MethodWe constructed a lightweight real-time detection model, GCA-YOLOv8n, based on an improved YOLOv8n. First, the C3Ghost module replaced the C2f module of original model to achieve lightweight design and enhance inference speed. Second, the GhostConv module substituted the original Conv layer to improve information extraction efficiency and reduce redundancy in convolutional layers. Finally, the ACmix attention mechanism was integrated into the original model architecture to boost feature extraction capability and detection accuracy. The improved GCA-YOLOv8n model was applied to apple ripeness detection experiments. ResultExperimental results showed that the GCA-YOLOv8n model achieved 2.0×106 parameters, 5.7×109 floating point operations, and a weight file size of 4.4 MB, representing reductions of 33.1%, 29.6%, and 30.2% respectively compared to YOLOv8n. The inference speed reached 130.8 frames per second, a 21.5% improvement over YOLOv8n. The mean average precision and F1 score were 89.2% and 82.5% respectively, demonstrating high detection accuracy and inference speed. ConclusionThe constructed GCA-YOLOv8n model significantly reduces model complexity and computational load while maintaining detection accuracy, achieving lightweight and efficient performance. The model demonstrates high and real-time detection capability and can operate stably on edge computing devices (including mobile devices), providing technical support for automated harvesting.
目标:针对传统苹果成熟度检测模型存在的体积过大、推理速度慢、检测精度偏低等问题展开优化。方法:本研究基于改进的YOLOv8n构建轻量化实时检测模型GCA-YOLOv8n。具体优化方案包括:采用C3Ghost模块替换原模型的C2f模块,以实现轻量化设计并提升推理速度;使用GhostConv模块替代原始卷积层,提升信息提取效率并降低卷积层冗余;将ACmix注意力机制融入原模型架构,增强特征提取能力与检测精度。随后将改进后的GCA-YOLOv8n模型应用于苹果成熟度检测实验。结果:实验结果表明,GCA-YOLOv8n模型的参数量为2.0×10⁶,浮点运算量为5.7×10⁹,权重文件大小为4.4 MB,相较于原始YOLOv8n分别降低了33.1%、29.6%与30.2%;其推理速度达到130.8帧/秒,较YOLOv8n提升21.5%;平均精度均值(mean average precision, mAP)与F1分数分别为89.2%与82.5%,展现出优异的检测精度与推理速度。结论:本研究构建的GCA-YOLOv8n模型在维持检测精度的同时,显著降低了模型复杂度与计算负载,实现了轻量化与高效化的性能。该模型具备优异的实时检测能力,可在边缘计算设备(包括移动设备)上稳定运行,为自动化采收提供了技术支撑。



