College of Computer and Control Engineering,Northeast Forestry University,Harbin 150040,China
Show less
文章历史+
Received
Accepted
Published
2025-05-19
Issue Date
2026-06-15
PDF (8294K)
摘要
针对木材表面缺陷检测中存在的多尺度缺陷、复杂背景干扰及小目标漏检等问题,基于YOLOV11n提出一种多尺度特征聚合的木材缺陷检测算法PADDL-YOLO(PADDL是由PMSFA(partial multi-scale feature aggregation)、ADown(average pooling down sampling)、DySample(dynamic upsampler)、DPB(dynamic position bias)与LSDECD(lightweight shared detail-enhanced convolutional detection)首字母拼写)。首先,通过设计部分多尺度特征聚合(partial multi-scale feature aggregation,PMSFA)模块增强多尺度缺陷特征提取能力;其次,采用平均池化下采样(average pooling down sampling,ADown)与动态上采样器(dynamic upsampler,DySample),减少信息丢失,同时降低计算复杂度,提升模型对小目标的检测能力;然后,在注意力机制中引入动态位置偏置(dynamic position bias,DPB)模块改进C2PSA模块,强化空间位置感知能力,有效提升缺陷定位精度。此外,设计轻量级细节增强检测头(lightweight shared detail-enhanced convolutional detection,LSDECD),通过细节增强卷积强化边缘特征的捕获能力。试验表明,PADDL-YOLO在木材缺陷检测任务中表现出色,其精确度为91.5%,召回率为91.4%,mAP@0.5为95.0%,较基准模型YOLOV11n分别提高5.2%、4.9%和3.8%。同时,模型参数量减少25.6%,计算效率显著提升,为高精度实时检测提供有效解决方案。
Abstract
Aiming at the problems of multi-scale defects, complex background interference and small target leakage in wood surface defect detection, a multiscale feature aggregation wood defect detection algorithm PADDL-YOLO is proposed based on YOLOV11n (PADDL is a multiscale feature aggregation algorithm consisting of PMSFA (partial multi-scale feature aggregation), ADown (average pooling down sampling), DySample (dynamic upsampler), DPB (dynamic position bias) and LSDECD (lightweight shared detail-enhanced convolutional detection)). First, a partial multi-scale feature aggregation (PMSFA) module is designed to enhance multiscale defect feature extraction. Second, the use of average pooling down sampling (ADown) with a dynamic upsampler (DySample) reduces information loss while reducing computational complexity and improves the model's ability to detect small targets. Then, the dynamic position bias (DPB) module is introduced into the attention mechanism to enhance the C2PSA module, strengthening spatial position awareness and significantly improving defect localization accuracy. Additionally, a lightweight shared detail-enhanced convolutional detection (LSDECD) is designed, employing detail-enhanced convolution to reinforce edge feature capture. Experiments demonstrate that PADDL-YOLO achieves outstanding performance in wood defect detection, with a precision of 91.5%, recall of 91.4%, and mAP@0.5 of 95.0%, representing improvements of 5.2%, 4.9%, and 3.8%, respectively, over the baseline model YOLOV11n. Meanwhile, the model's parameter count is reduced by 25.6%, and computational efficiency is significantly enhanced, providing an effective solution for high-precision real-time detection.
在C2PSA中Attention操作的计算复杂度为 O (n2),其中n是序列长度。对于长序列,这可能导致计算成本显著增加。由于Attention没有内置的位置信息处理能力,若输入序列中2个元素的位置交换,其计算的注意力权重和输出结果不会发生变化。
为解决这些问题,引入一个基于多层感知机(MLP)的模块,称为动态位置偏差(Dynamic position bias,DPB)[20]。DPB旨在为Transformer中的注意力机制提供动态生成的相对位置偏差(Relative position bias,RPB),解决RPB仅支持固定图像尺寸的限制。将DPB模块与PSABlock中Self-Attention结合,形成新的模块C2DPB,结构如图8所示。
RPB通过在注意力中添加偏差来指示嵌入的相对位置。在形式上,带有RPB的长短距离注意力(long short distance attention,LSDA,式中记为Attention)为
在本试验使用准确度(precision,P)、召回率(recall,R)、平均精度(average precision,AP,式中记为AP)、平均精度均值(mean average precision,mAP,式中记为mAP)、参数量(params)、计算量(FLOPs)共6个指标来评估模型的准确性和轻量性。其准确度、召回率、平均精度、平均精度均值计算公式为
HEC G, LIL F, GAOF,et al.Study on GSA-SVM wood veneer defect identification based on kernel principal component analysis[J].Forest Engineering,2023,39(2):91-99.
[4]
CHENY T, SUNC S, RENZ R,et al.Review of the current state of application of wood defect recognition technology[J].BioResources,2022,18(1):2288-2302.
[5]
CHUNT H, HASHIMU R, AHMADS,et al.A review of the automated timber defect identification approach[J].International Journal of Electrical and Computer Engineering (IJECE),2023,13(2):2156-2166.
[6]
HET, LIUY, XUC Y,et al.A fully convolutional neural network for wood defect location and identification[J].IEEE Access,2019,7:123453-123462.
[7]
GAOM Y, QID W, MUH B,et al.A transfer residual neural network based on ResNet-34 for detection of wood knot defects[J].Forests,2021,12(2):212.
[8]
URBONASA, RAUDONISV, MASKELIŪNASR,et al.Automated identification of wood veneer surface defects using faster region-based convolutional neural network with data augmentation and transfer learning[J].Applied Sciences,2019,9(22):4898.
ZHANGR, YANGH, WANGY S,et al.Deep learning-based lightweight system for detection of surface defects in timber[J].Journal of Forestry Engineering,2025,10(4):107-117.
JIANGX W, ZHAOX Q.Improved YOLOv7 algorithm for wood surface defect detection[J].Computer Engineering and Applications,2024,60(7):175-182.
[15]
WANGB, WANGR J, CHENY S,et al.FDD-YOLO:A novel detection model for detecting surface defects in wood[J].Forests,2025,16(2):308.
[16]
ZHENGY C, WANGM F, ZHANGB,et al.GBCD-YOLO:A high-precision and real-time lightweight model for wood defect detection[J].IEEE Access,2024,12:12853-12868.
[17]
ZHANGQ Y, LIUL P, YANGZ Y,et al.WLSD-YOLO:A model for detecting surface defects in wood lumber[J].IEEE Access,2024,12:65088-65098.
[18]
WANGR J, CHENY S, LIANGF L,et al.BPN-YOLO:A novel method for wood defect detection based on YOLOv7[J].Forests,2024,15(7):1096.
[19]
HANK, WANGY H, TIANQ,et al.GhostNet:More features from cheap operations[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).June 13-19,2020,Seattle,WA,USA.IEEE,2020:1580-1589.
[20]
CHENJ R, KAOS H, HEH,et al.Run,don’t walk:Chasing higher FLOPS for faster neural networks[C]//2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).June 17-24,2023,Vancouver,BC,Canada.IEEE,2023:12021-12031.
[21]
WANGC Y, YEHI H, MARK LIAOH Y.YOLOv9:Learning what you want to learn using programmable gradient information[M]//Computer Vision – ECCV 2024.Cham:Springer Nature Switzerland,2024:1-21.
[22]
LIUW Z, LUH, FUH T,et al.Learning to upsample by learning to sample[C]//2023 IEEE/CVF International Conference on Computer Vision (ICCV).October 1-6,2023,Paris,France.IEEE,2023:6027-6037.
[23]
KHANAMR, HUSSAINM.Yolov11:An overview of the key architectural enhancements[J].arXiv preprint arXiv:2024.
[24]
WANGW X, CHENW, QIUQ B,et al.CrossFormer++:A versatile vision transformer hinging on cross-scale attention[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2023,46(5):3123-3136.
[25]
CHENZ X, HEZ W, LUZ M.DEA-Net:Single image dehazing based on detail-enhanced convolution and content-guided attention[J].IEEE Transactions on Image Processing,2024,33:1002-1015.
[26]
KODYTEKP, BODZASA, BILIKP.A large-scale image dataset of wood surface defects for automated vision-based quality control processes[J].F1000Research,2021,10:581.
[27]
ZHUL, WANGX J, KEZ H,et al.BiFormer:Vision transformer with bi-level routing attention[C]//2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).June 17-24,2023,Vancouver,BC,Canada.IEEE,2023:10323-10333.
[28]
KHANB, MUMTAZA, ZAFARZ,et al.CGA-Net:Channel-wise gated attention network for improved super-resolution in remote sensing imagery[J].Machine Vision and Applications,2023,34(6):128.
[29]
XIAZ F, PANX R, SONGS J,et al.Vision transformer with deformable attention[C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).June 18-24,2022,New Orleans,LA,USA.IEEE,2022:4794-4803.
[30]
LIUH D, WANGL G, ZHANGY,et al.SaMam:Style-aware state space model for arbitrary image style transfer[C]//2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition Conference (CVPR).June 10-17,2025,Nashville,TN,USA.IEEE,2025:28468-28478.