基于改进YOLOv5s的木材表面缺陷检测模型
Detection Model of Wood Surface Defects Based on Improved YOLOv5s
- 2023年37卷第2期 页码:8-15
DOI: 10.12326/j.2096-9694.2022163
扫 描 看 全 文

1.四川轻化工大学自动化与信息工程学院
2.人工智能四川省重点实验室,四川宜宾 644000
扫 描 看 全 文
朱豪,周顺勇,曾雅兰等.基于改进YOLOv5s的木材表面缺陷检测模型[J].木材科学与技术,2023,37(02):8-15.
ZHU Hao,ZHOU Shunyong,ZENG Yalan,et al.Detection Model of Wood Surface Defects Based on Improved YOLOv5s[J].Chinese Journal of Wood Science and Technology,2023,37(02):8-15.
针对木材表面缺陷的复杂多样性和特征提取困难,提出一种基于改进YOLOv5s的木材表面缺陷(活节、死节、有裂缝节子和裂缝)检测模型。首先,在Backbone网络引入坐标注意力机制(coordinate attention,CA)增强每个通道之间的信息交互,然后采用混合空间金字塔池化(hybrid spatial pyramid pooling-fast,HSPPF)结构减少信息损失,再使用GSConv卷积减少参数量,用改进的曲线高效交叉联合(curve efficient intersection over union,CEIoU)作为训练时模型的损失函数,提升木材缺陷检测的准确性。试验结果表明,改进模型能够有效检测出木材表面缺陷,模型的平均精度均值(mean average precision,mAP)为84.4%,比未改进之前提高了2%,检测速度达到73.9 FPS,在模型参数量方面明显减少,同时优于其他主流模型,能够满足木材表面缺陷检测的要求。
To improve the identification of complexed features of wood surface defects and detection efficiency, a detection model of wood surface defects based on YOLOv5s was proposed. First, the coordinate attention mechanism (CA) was introduced into the Backbone network to enhance the information interaction between each channel, then, the structure of hybrid spatial pyramid pooling-fast (HSPPF) was used to reduce information loss, next, the GSConv volume was used to reduce the number of parameters, and the modified curve efficient intersection over union (CEIoU) was used as the loss function of the model during training to improve the accuracy of wood defect detection. The experimental results show that the improved model can detect wood surface defects effectively. The mean average precision (mAP) of the model was 84.4%, which was 2% higher than unimproved methods, and the detection speed reaches 73.9 FPS. It is also superior to other mainstream models, and achieves a significant reduction in the number of model parameters, which can meet the requirements of wood surface defect detection.
HS-YOLOv5s木材表面缺陷检测坐标注意力机制(CA)混合空间金字塔池化(HSPPF)曲线高效交叉联合(CEIoU)
HS-YOLOv5swood surface defect detectioncoordinate attention(CA)hybrid spatial pyramid pooling-fast(HSPPE)curve efficient intersection over union(CEIoU)
丁安宁, 贺春光, 多化琼, 等. 基于数字图像的木材缺陷识别研究进展[J].木材科学与技术, 2022, 36(1):9-16.
DING A N, HE C G, DUO H Q,et al. Research review of wood defect recognition based on digital images[J]. Chinese Journal of Wood Science and Technology, 2022, 36(1):9-16.
XIE Y H, WANG J C. Study on the identification of the wood surface defects based on texture features[J]. Optik - International Journal for Light and Electron Optics, 2015, 126(19): 2231-2235.
王金聪, 宋文龙, 张彭涛. 应用改进分水岭算法对木材表面缺陷图像分割试验[J]. 东北林业大学学报, 2018, 46(10): 93-97.
WANG J C, SONG W L, ZHANG P T. Image segmentation of wood surface defects with improved watershed algorithm[J]. Journal of Northeast Forestry University, 2018, 46(10): 93-97.
SONG W W, CHEN T Y, GAI Z H, et al. Wood materials defects detection using image block percentile color histogram and eigenvector texture feature[A]//Atlantis Press, 2015: 779-783.
REN S Q, HE K M, Girshick R, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149.
LIU W, Anguelov D, Erhan D, et al. SSD: single shot MultiBox detector[M]//Computer Vision - ECCV 2016. Cham: Springer International Publishing, 2016: 21-37.
Redmon J, Divvala S, Girshick R, et al. You only look once: unified, real-time object detection[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). June 27-30, 2016, Las Vegas, NV, USA. IEEE, 2016: 779-788.
萧嘉奕, 马艳, 周竹, 等. 基于Faster R-CNN模型的木材表面节子缺陷检测[J]. 木材工业, 2020, 34(2): 45-48.
XIAO J Y, MA Y, ZHOU Z, et al. Detection of timber surface knots based on faster R-CNN[J]. China Wood Industry, 2020, 34(2): 45-48.
SHI J H, LI Z Y, ZHU T T, et al. Defect detection of industry wood veneer based on NAS and multi-channel mask R-CNN[J]. Sensors (Basel, Switzerland), 2020, 20(16): 4398.
HE K, Gkioxari G, Dollár P, et al. Mask R-CNN[EB/OL]. 2017: arXiv: 1703.06870. https://arxiv.org/abs/1703.06870https://arxiv.org/abs/1703.06870.
WANG B G, YANG C M, DING Y C, et al. Detection of wood surface defects based on improved YOLOv3 algorithm[J]. BioResources, 2021, 16(4): 6766-6780.
Redmon J, Farhadi A. YOLOv3: an incremental improvement[EB/OL]. 2018: arXiv: 1804.02767. https://arxiv.org/abs/1804.02767https://arxiv.org/abs/1804.02767.
HOU Q, ZHOU D, FENG J. Coordinate attention for efficient mobile network design[EB/OL]. 2021: arXiv: 2103.02907. https://arxiv.org/abs/2103.02907https://arxiv.org/abs/2103.02907.
LI H, LI J, WEI H, et al. Slim-neck by GSConv: a better design paradigm of detector architectures for autonomous vehicles[EB/OL]. 2022: arXiv: 2206.02424. https://arxiv.org/abs/2206.02424https://arxiv.org/abs/2206.02424.
YUE X, WANG Q, HE L, et al. Research on tiny target detection technology of fabric defects based on improved YOLO[J]. Applied Sciences, 2022, 12(13): 6823.
ZHENG Z H, WANG P, REN D W, et al. Enhancing geometric factors in model learning and inference for object detection and instance segmentation[J]. IEEE Transactions on Cybernetics, 2022, 52(8): 8574-8586.
ZHANG Y F, REN W Q, ZHANG Z, et al. Focal and efficient IOU loss for accurate bounding box regression[J]. Neurocomputing, 2022, 506(C): 146-157.
Kodytek P, Bodzas A, Bilik P. A large-scale image dataset of wood surface defects for automated vision-based quality control processes[J]. F1000Research, 2021, 10: 581.
相关文章
相关作者
相关机构
京公网安备11010802024621
微信公众号