首页|基于改进YOLOv7-tiny的多光谱苹果表层缺陷检测

基于改进YOLOv7-tiny的多光谱苹果表层缺陷检测

扫码查看
针对苹果表层存在多种缺陷类型、对不同缺陷的检测方法不同的问题,提出一种基于改进YOLOv7-tiny的缺陷检测模型,结合相机采集的RGB+NIR多光谱图像对苹果表层多种缺陷进行了检测和分类.首先,为了提取更多有效的特征信息,提高对缺陷的定位能力,在主干网络中使用坐标注意力(CA)机制聚合坐标信息,同时在主干网络后添加上下文转换器(CoT)模块以增加全局感受野;其次,为了增强高效聚合网络的特征融合能力,将其与加权双向特征金字塔结合,调整结构中各分支的占比;最后,为了解决难易样本不均衡的问题,将损失函数更换为Focal-EIoU损失.改进后网络的平均精度均值(mAP)@0.5提升了1.2百分点,达到93.2%,识别速度为89.3 frame/s.研究结果表明,本文研究内容为苹果表层的缺陷检测提供了更加高效的方法,同时为苹果的分级提供了更加精确的依据.
Multispectral Apple Surface Defect Detection Based on Improved YOLOv7-tiny
A defect detection model based on improved YOLOv7-tiny is proposed herein to address the problem of different detection methods for different defects on apple surface.Combined with RGB+NIR multispectral images collected by a camera,various defects on the apple surface are detected and classified.First,to extract more effective feature information and improve the ability to locate defects,coordinate attention(CA)is used to aggregate coordinate information in the backbone network,and a contextual transformer(CoT)module is added behind the backbone network to increase the global receptive field.Second,it is combined with the weighted bidirectional feature pyramid to adjust the proportion of each branch in the structure to enhance the feature fusion ability of efficient layer aggregation networks.Finally,the loss function is replaced by Focal-EIoU loss to solve the problem of unbalanced samples.The mean average precision(mAP)@0.5 of the improved network increases by 1.2 percentage points to 93.2%,and the recognition speed is 89.3 frames/s.The research content of this paper provides a more efficient method for apple surface defect detection and a more accurate basis for apple grading.

defect detectionapple surfacemulti-spectral imagedeep learningYOLOv7-tinyattention mechanism

化春键、孙明春、蒋毅、俞建峰、陈莹

展开 >

江南大学机械工程学院,江苏 无锡 214122

江苏省食品先进制造装备技术重点实验室,江苏 无锡 214122

江南大学物联网工程学院,江苏 无锡 214122

缺陷检测 苹果表层 多光谱图像 深度学习 YOLOv7-tiny 注意力机制

国家自然科学基金

62173160

2024

激光与光电子学进展
中国科学院上海光学精密机械研究所

激光与光电子学进展

CSTPCD北大核心
影响因子:1.153
ISSN:1006-4125
年,卷(期):2024.61(10)
  • 22