Tong Xingyu, Liang Zhihong, Qin Mingming, Liu Fangrong, Yang Jiayu, Xiao Hengjiang, Dai Wei
College of Big Data and Intelligent Engineering, Southwest Forestry University, Kunming, 650224, China.
Sci Rep. 2025 Jul 2;15(1):22860. doi: 10.1038/s41598-025-05479-y.
In wood defect detection, factors such as few-shot sample scarcity, diverse defect types, and complex background interference severely limit the model's recognition accuracy and generalization ability. To address the above issues, this paper proposes an improved Faster RCNN model based on a dual attention mechanism (DAM). The model integrates cross-attention and spatial attention modules to enhance the expression of key region features, suppresses texture noise interference; the improved Wood-Region Proposal Network (WRPs) module utilizes feature mean pooling and cross-layer fusion strategies to significantly improve the quality and robustness of candidate box generation; in addition, the Wood-Feature Reconstruction Head (WFRH) module effectively enhances the adaptability to new classes and few-shot defects through multi-branch classification and weighted fusion mechanisms. After synergistic optimization of all modules, the model demonstrates superior detection accuracy and category discrimination capability. Experimental results show that the proposed method achieves state-of-the-art performance on the PASCAL VOC and FSOD datasets, particularly in the identification of 17 types of wood defects, where AP50 and AP75 are improved by 25% and 7.9%, respectively, validating the significant advantages of the proposed DAM mechanism under few-shot and complex background conditions. The findings of this study provide practical technical references for intelligent and efficient few-shot detection in real-world wood quality inspection tasks.
在木材缺陷检测中,少样本稀缺、缺陷类型多样以及复杂背景干扰等因素严重限制了模型的识别精度和泛化能力。为解决上述问题,本文提出了一种基于双注意力机制(DAM)的改进型Faster RCNN模型。该模型集成了交叉注意力和空间注意力模块,以增强关键区域特征的表达,抑制纹理噪声干扰;改进后的木材区域提议网络(WRPs)模块采用特征均值池化和跨层融合策略,显著提高了候选框生成的质量和鲁棒性;此外,木材特征重构头(WFRH)模块通过多分支分类和加权融合机制,有效增强了对新类别和少样本缺陷的适应性。经过所有模块的协同优化,该模型展现出卓越的检测精度和类别区分能力。实验结果表明,所提方法在PASCAL VOC和FSOD数据集上取得了领先性能,尤其在17种木材缺陷的识别中,AP50和AP75分别提高了25%和7.9%,验证了所提DAM机制在少样本和复杂背景条件下的显著优势。本研究结果为实际木材质量检测任务中的智能高效少样本检测提供了实用的技术参考。