Natural wood end surfaces exhibit irregular textures and defect features, making end surface recognition and localization a challenging problem. To enhance detection accuracy while reducing model parameters and improving computational efficiency for mobile deployment, this study proposes an improved end-to-end deep learning model tailored for log detection by enhancing the YOLO11 architecture. Firstly, the PP-LCNet backbone is adopted to replace the original YOLO11 backbone, effectively reducing the number of parameters, expanding the receptive field, and improving large target detection precision. Secondly, a parameter-free attention mechanism, SimAM, is integrated into the neck network to adaptively emphasize critical features and suppress redundant information, thereby enhancing small target recognition capabilities. Finally, the normalized Wasserstein distance (NWD) loss function is introduced, which is more suitable for measuring similarity between extremely small targets, further improves the accuracy and precision of wood end surface identification. Experimental results demonstrate that the improved model achieves higher end surface recognition accuracy compared to the baseline model, the improved model improves 2.65% and 5.29% on the mAP@0.5 and mAP@0.95 metrics, and FLOPs are decreased by 15.15%. It has good application value in the field of log volume measurement.
YOLO(you only look once)是目标检测领域的里程碑算法,其发展历程体现了效率与精度的平衡优化。2016年,YOLOv1首创单阶段检测思想,将检测转化为回归问题[10],实现45帧/s的实时检测,但定位精度和召回率较低。2017年,YOLOv2引入锚框机制,采用批归一化和高分辨率分类器,在保持速度的同时将mAP提升至76.8%。YOLOv3通过残差网络Darknet-53和多尺度预测,显著提升小物体检测能力,形成3个特征层的金字塔结构[11]。2020年的YOLOv5重构网络架构,采用Focus切片操作和自适应锚框计算,大幅提升训练效率和部署便利性[12]。YOLOv8(2023)引入可变形卷积和Transformer混合架构,支持分类分割等多任务,在COCO数据集达到53.1%mAP[13]。
采用3个指标来精确评价模型的性能,即平均精度均值(mean average precision,mAP)、召回率(Recall式中记为Recall)和精确率(Precision,式中记为Precision)来衡量模型在不同检测评价函数阈值下的平均精度。MAP是不同类别精度的平均值,定义为不同召回率下的平均精度。其计算方式为
使用梯度加权类激活映射(Gradient-weighted class activation mapping,Grad-CAM)生成模型的热力图,Grad-CAM通过梯度加权类激活映射,突出显示模型做预测时关注的图像区域,其原理是利用目标类别的梯度信息反向传播至特定卷积层,加权融合特征图,突出模型决策依据的区域。试验结果如图12所示。由图12可知,YOLO11n对小目标的关注度较低,且对背景的识别度不足。对比而言,本研究模型关注点集中于木材截面,对背景的抑制较好,且对小目标的关注度更高,而且模型注意力集中于木材截面的中心,这可以使预测边界框更为准确,增强模型的检测性能。
ZHAOY F, RENH E.Genetic algorithm and homomorphic filter in image processing of log surface[J].Journal of Northeast Forestry University,2014,42(2):129-132.
CHENG H, ZHANGQ, CHENM Q,et al.Rapid detection algorithms for log diameter classes based on binocular vision[J].Journal of Beijing Jiaotong University,2018,42(2):22-30.
LINY H, JINGL, WANGC Y,et al.Outline identification and verification of cross section of log based on arc edges[J].Journal of Fujian Agriculture and Forestry University (Natural Science Edition),2016,45(6):649-654.
LINY H, YANGZ C, ZHANGZ J.Outline extraction of logs cross section base-upon both image and graphics features[J].Journal of Fujian Agriculture and Forestry University (Natural Science Edition),2020,49(3):412-417.
YUP P, LINY H, LAIY F,et al.Dense log end face detection method using the hybrid of BiFPN and YOLOv5s[J].Journal of Forestry Engineering,2023,8(1):126-134.
JOSEPHN, JACOBS.YOLOv5 is here:State-of-the-art object detection at 140 FPS[EB/OL].[2020-06-10].
[22]
TERVENJ, CORDOVA-ESPARZAD.A comprehensive 17 review of Yolo:From Yolov1 to Yolov8 and beyond[J].arXiv preprint arXiv:2304.00501,2023
[23]
CUIC, GAOT, WEIS,et al.PP-LCNet:A lightweight CPU convolutional neural network[J].arXiv:2109. 15099,2021.
[24]
CHOLLETF.Xception:Deep learning with depthwise separable convolutions[C]//2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).July 21-26,2017,Honolulu,HI,USA.IEEE,2017:1800-1807.
[25]
HOWARDA, SANDLERM, CHENB,et al.Searching for MobileNetV3[C]//2019 IEEE/CVF International Conference on Computer Vision (ICCV).October 27-November 2,2019.Seoul,Korea.IEEE,2019:1643-1655.
YANGL, ZHANGR Y, LIL,et al.Simam:A simple,parameter-free attention module for convolutional neural networks[C]//International Conference on Machine Learning.PMLR,2021:11863-11874.
[28]
ZHOUX, JIANGL, GUANX J,et al.Infrared small target detection algorithm with complex background based on YOLO-NWD[C]//2022 4th International Conference on Image Processing and Machine Vision.March 25-27,2022.Hong Kong,China.ACM,2022:6-12.
DONGG, XIEW C, HUANGX L,et al.Review of small object detection algorithms based on deep learning[J].Computer Engineering and Applications,2023,59(11):16-27.
[32]
OUYANGD L, HES, ZHANGG Z,et al.Efficient multi-scale attention module with cross-spatial learning[C]//ICASSP 2023 - 2023 IEEE International Conference on Acoustics,Speech and Signal Processing (ICASSP).June 4-10,2023,Rhodes Island,Greece.IEEE,2023:1-5.
[33]
AZADR, NIGGEMEIERL, HÜTTEMANNM,et al.Beyond self-attention:Deformable large kernel attention for medical image segmentation[C]//2024 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV).January 3-8,2024,Waikoloa,HI,USA.IEEE,2024:1287-1297.