摘要
针对夜间场景下苹果识别率低、实时性差的问题,提出一种融合图像增强和迁移学习的YOLOv8n夜间苹果检测方法。首先,在YOLOv8n前端嵌入Zero-DCE模块增强夜间图像,更清晰地呈现苹果的轮廓和细节,降低夜间苹果图像的识别难度;其次,使用SPD-Conv进行下采样,增强模型细粒度特征的提取能力;在此基础上,针对夜间苹果数据集样本量少的问题,采用迁移学习训练策略,选取含有苹果类别的MSCOCO数据集作为源域数据集,对于夜间场景下的目标域数据集,利用Zero-DCE增加其与日间苹果图像的相似度并在源域模型上微调目标域模型。基于上述方法,在夜间苹果图像数据集上进行了试验,结果显示,所提方法的模型精确率P为97.0%、召回率R为93.4%、平均精度均值mAP@0.5:0.95为74.6%,较YOLOv8n原始模型分别提升2.3、1.9和4.3百分点,同时该模型的推理速度为22帧/s,可以满足实时性要求。消融试验显示,图像增强与迁移学习结合使用的效果超过两者单独使用时的效果之和。研究表明,改进后的模型在处理重叠、遮挡、绿果和光线过暗等复杂情形时都比原始模型表现更优,具有良好的鲁棒性。
This paper proposed a method for detecting apple at night based on YOLOv8n with fusion of image enhancement and transfer learning to address the issues of low recognition rate and poor real-time performance of apples in nighttime scenarios.Firstly,embedding a Zero-DCE module in the front-end of YOLOv8n enhanced images of apple at night,presented the contours and details of apples more clearly,and reduced the difficulty of recognizing images of apple at night.Secondly,using SPD-Conv for downsampling enhanced the ability of the model to extract fine-grained features.On this basis,transfer learning training strategy was used to solve the problem of small sample size in the dataset of apple at night.The MS COCO dataset containing categories of apple was selected as the source domain dataset.In term of the target domain dataset in nighttime scenarios,Zero-DCE was used to increase its similarity with images of apple during the day and finely tune the model of target domain on the model of source domain.Experi⁃ments were conducted on the image dataset of apple at night based on the method above.The results showed that the model accuracy P,a recall R,and an average accuracy mean mAP@0.5:0.95 of method proposed was 97.0%,93.4%and 74.6%,being 2.3,1.9,and 4.3 percentages higher than that of the YO⁃LOv8n original model.The inference speed of this model was 22 frames/s,meeting requirements of realtime detection.The results of the ablation experiment showed that the combined effect of image enhance⁃ment and transfer learning exceeded the sum of the effects when applied separately.The improved model performed better than the original model in dealing with complex situations including overlap,occlusion,green fruits,and dim lighting,and had good robustness.
作者
仝召茂
陈学海
马志艳
杨光友
张灿
TONG Zhaomao;CHEN Xuehai;MA Zhiyan;YANG Guangyou;ZHANG Can(Institute of Agricultural Machinery,Hubei University of Technology,Wuhan 430068,China;Hubei Engineering Research Center for Intellectualization of Agricultural Equipment,Wuhan 430068,China)
出处
《华中农业大学学报》
CAS
CSCD
北大核心
2024年第5期1-9,共9页
Journal of Huazhong Agricultural University
基金
湖北省科技创新人才计划项目(2023DJC088)
湖北省农机装备补短板核心技术应用攻关项目(HBSNYT202208)。