欢迎访问林业科学,今天是

林业科学 ›› 2026, Vol. 62 ›› Issue (7): 186-196.doi: 10.11707/j.1001-7488.LYKX20250554

• 研究论文 • 上一篇    

基于轻量化特征融合与空间重构的竹条表面缺陷检测算法

徐泽宇,李荣荣*()   

  1. 南京林业大学家居与工业设计学院 南京 210037
  • 收稿日期:2025-09-09 修回日期:2025-10-26 出版日期:2026-07-10 发布日期:2026-07-14
  • 通讯作者: 李荣荣 E-mail:rongrong.li@njfu.edu.cn
  • 基金资助:
    国家重点研发计划“基于数字化协同的林木产品智能制造关键技术”(2023YFD2201500)。

A Surface Defect Detection Algorithm for Bamboo Strips Based on Lightweight Feature Fusion and Spatial Reconstruction

Zeyu Xu,Rongrong Li*()   

  1. College of Furnishing and Industrial Design, Nanjing Forestry University Nanjing 210037
  • Received:2025-09-09 Revised:2025-10-26 Online:2026-07-10 Published:2026-07-14
  • Contact: Rongrong Li E-mail:rongrong.li@njfu.edu.cn

摘要:

目的: 针对现有竹条表面缺陷检测方法存在模型参数量大、小尺度缺陷检测效果差,难以兼顾工业场景高精度与高实时性需求的问题,提出轻量化端到端检测模型FCHM-DETR,以提升竹条表面缺陷检测的综合性能。方法: 基于RT-DETR网络,设计轻量化骨干Faster-CGLU,融合部分卷积与门控线性单元,在强化局部与全局特征融合能力的同时降低计算复杂度;构建空间特征重构金字塔网络CGRFPN,结合矩形自校准模块与动态插值融合机制优化多尺度特征融合效果,提升模型对缺陷的空间感知能力;引入Haar小波下采样器,通过频域特征重组实现特征图高效压缩,同时完整保留缺陷边缘、纹理突变等高频细节信息;提出最小点距离交并比损失函数MPDIoU,通过显式优化边界框对焦点距离约束,提升缺陷边界框回归精度与模型收敛效率。基于包含黑节、虫孔、霉变、裂缝、留黄、留青6类常见竹条表面缺陷数据集,开展消融试验与主流模型对比试验,验证各模块有效性与模型综合性能。结果: FCHM-DETR模型的mAP50达94.7%,较基准模型RT-DETR-r18提升3.7%,对虫孔、裂缝等小尺度、低对比度缺陷的检测性能提升显著;模型参数量与计算量较基准模型分别降低30.6%和35.6%,推理速度达355 FPS,可完全满足工业场景实时检测的帧率要求;与YOLOv10m、Faster R-CNN等主流缺陷检测模型相比,FCHM-DETR在检测精度、轻量化程度与推理速度指标上均实现了更优平衡,综合性能优势显著。结论: FCHM-DETR有效突破了现有竹条缺陷检测方法的核心技术瓶颈,实现了检测精度与工业部署适配性的协同提升,可为竹材加工行业提供端到端的自动化缺陷检测解决方案。

关键词: 深度学习, RT-DETR, 竹材加工, 缺陷检测, 特征融合, 模型轻量化

Abstract:

Objective: The existing bamboo strip surface defect detection methods on bamboo strips have problems such as large model parameters and poor performance in detecting small-scale defects, making it difficult to balance the dual requirements of high-precision and high real-time requirements in industrial scenarios. To address the problems, this paper proposes FCHM-DETR, a lightweight end-to-end detection model, for improving the comprehensive performance of bamboo strip surface defect detection. Method: Based on the RT-DETR network, a lightweight backbone Faster-CGLU was designed by integrating part convolutional and gated linear units (CGLU) to enhance the fusion capability of local and global features while reducing computational complexity. A spatial feature reconstruction pyramid network CGRFPN was constructed, which was combined with rectangular a self calibration module (RCM) and a dynamic interpolation fusion (DIF) mechanism to optimize the multi-scale feature fusion effect and improve the model's spatial perception ability for defects. A Haar Wavelet Downsampler was introduced to achieve efficient compression of feature maps through frequency-domain feature recombination, while fully retaining high-frequency detail information such as defect edges and texture mutations. In addition, we proposed an MPDIoU loss function, which improved the regression accuracy of defect bounding boxes and the convergence efficiency of the model by explicitly optimizing the distance constraints of bounding box diagonal corner points. Ablation experiments and comparative experiments with mainstream models were carried out on a dataset covering six common types of bamboo strip surface defects, including black knot, wormhole, mildew, crack, residual bamboo yellow and residual bamboo green, to verify the effectiveness of each module and the comprehensive performance of the proposed model. Result: The FCHM-DETR model achieved a mAP50 of 94.7%, which was 3.7% points higher than that of the baseline model RT-DETR-r18, with a significant performance improvement in detecting small-scale, low-contrast defects such as wormholes and cracks. Meanwhile, the parameter count and FLOPs of the model were reduced by 30.6% and 35.6% respectively compared with the baseline, and its inference speed reached 355 FPS, which can fully meet the frame rate requirements of real-time detection in industrial scenarios. Compared with mainstream defect detection models including YOLOv10m and Faster R-CNN, FCHM-DETR achieved a superior balance among three core dimensions of detection accuracy, lightweight level and inference speed, with outstanding comprehensive performance advantages. Conclusion: FCHM-DETR effectively breaks through the core technical bottlenecks of existing bamboo strip defect detection methods, and realizes the synergistic improvement of detection accuracy and industrial deployment adaptability. It can provide an end-to-end automated defect detection solution for the bamboo processing industry.

Key words: deep learning, RT-DETR, bamboo processing, defect detection, feature fusion, model lightweighting

中图分类号: