基于改进YOLOv8n的花生荚果与果仁图像识别及精准计数

    Image recognition and accurate counting of peanut pods and kernels based on improved YOLOv8n model

    • 摘要:
      目的 花生Arachis hypogaea L.样本准确计数是考种过程中百粒质量和千粒质量测定的关键环节。针对实际测定中花生样本相互重叠易造成漏检等问题,通过改进YOLOv8n模型开展花生荚果与果仁图像精准识别与目标统计研究。
      方法 在原模型YOLOv8n主干网络中引入MLCA (Mixed local channel attention)注意力机制,减少背景噪声干扰,增强对重叠样本的检测能力,从而降低漏检率;在C2f模块中加入SCConv (Spatial and channel reconstruction convolution)模块,提高模型对重叠区域中不同花生边界特征的学习,突出单个花生荚果和果仁的真实边界;将检测头替换为LSCD (Lightweight shared convolutional detection),减少模型参数量,增强特征图之间的全局信息融合能力,优化特征图的提取与融合方式,提高模型检测速度。
      结果 改进的MSL-YOLOv8n模型包含3 383 663个参数,对花生荚果、果仁计数的平均精度均值(mAP50-95)分别为90.9%、91.7%,精确率为98.1%、99.8%,召回率为97.2%、99.7%,每秒帧数为245.8。与原模型相比,对花生荚果与果仁的mAP50-95提高了1.7和1.1个百分点,性能明显优于SSD、YOLOv10n等模型。
      结论 改进模型精确率高,实时处理速度快,具有较好的鲁棒性,可为花生考种过程中精准计数提供技术支撑。

       

      Abstract:
      Objective Accurate counting of peanut (Arachis hypogaea L.) samples is a crucial step in determining the 100-seed weight and 1 000-seed weight during seed testing. To tackle issues such as missed detections caused by peanut seed overlapping in practical measurements, this study aims to explore precise image recognition and target statistics of peanut pods and kernels using the improved YOLOv8n model.
      Method The MLCA (mixed local channel attention) attention mechanism was integrated into the backbone network of the original YOLOv8n model to reduce background noise interference, enhance the detection ability for overlapped peanut samples, and thereby reduce the missed detection rate. The SCConv (spatial and channel reconstruction convolution) module was added to the C2f module to strengthen the model learning different peanut boundary features in the overlapping areas and highlight the true boundaries of individual peanut pods and kernels. The detection head was replaced by the LSCD (lightweight shared convolutional detection) to reduce the model parameters, enhance the global information fusion ability between feature maps, optimize the extraction and fusion methods of feature maps, and improve the model detection speed.
      Result The improved MSL-YOLOv8n model contained 3 383 663 parameters, with the mean average precision (mAP50-95) of 90.9% and 91.7% for peanut pods and kernels counting, the precisions were 98.1% and 99.8%, and the recalls were 97.2% and 99.7%, respectively. The frames per second of the model were 245.8. Compared with the original model YOLOv8n, the mAP50-95 was improved by 1.7 and 1.1 percentage points, and the performance of the improved model was obviously better than those of SSD, YOLOv10n and other models.
      Conclusion The improved model has high accuracy, fast real-time processing speed, and strong robustness, and can provide technical support for accurate counting in the process of peanut seed testing.

       

    /

    返回文章
    返回