Abstract
In recent years, deep learning has made significant progress in wood panel defect detection. However, challenges remain regarding detection accuracy, inference speed, and the difficulty of deploying models on embedded devices in industrial environments. This paper proposes YOLOv5-LW, a lightweight detection method incorporating attention mechanisms and a specialized feature fusion network. By reconstructing the backbone with ShuffleNetv2 and introducing a Multi-scale Bi-directional Feature Pyramid Network (MBiFPN), the model achieves a high accuracy rate of 92.8% while reducing parameters by 27.78% and computational volume by 41.25%. Experimental results demonstrate a 10.16% improvement in inference speed, making it highly suitable for real-time industrial applications.
Introduction
In the wood processing industry, identifying surface defects—such as dead knots, live knots, and cracks—is vital for quality control and waste reduction. While deep learning has revolutionized image recognition, standard models face a "deployment gap" in industrial settings. Modern models are often too computationally heavy for low-power embedded devices, and fine defects like thin cracks are easily missed by generalized lightweight networks. Furthermore, real-time assembly lines require extremely high inference speeds that many accurate models cannot sustain. YOLOv5-LW aims to bridge this gap by balancing efficiency with high-resolution perception.
Architectural Innovations
The researchers modified the standard YOLOv5 architecture to create YOLOv5-LW. Their approach rests on three architectural pillars designed to maintain performance while stripping away unnecessary computational weight.
1. The ShuffleNetv2-based Backbone
The standard heavy backbone was replaced with a reconstructed ShuffleNetv2 network. This utilizes "channel shuffling" and group convolutions to drastically reduce the number of parameters. To prevent accuracy loss from this downsizing, the authors introduced a Stem Block for better initial feature extraction and Spatial Pyramid Pooling Fast (SPPF) to maintain a global receptive field.
2. Efficient Channel Attention (ECA)
To help the model focus on critical defect information without adding significant overhead, Efficient Channel Attention (ECA) modules were embedded into the backbone. Unlike traditional attention mechanisms that use complex dimensionality reduction, ECA uses a simple 1D convolution to capture cross-channel interactions, improving the model's proficiency in localizing fine defects.
Multi-scale Bi-directional Feature Fusion
Standard networks often lose detail as information passes between layers. To combat this, the authors introduced the Multi-scale Bi-directional Feature Pyramid Network (MBiFPN) in the model's "Neck."
Unlike traditional Feature Pyramid Networks (FPN) or Path Aggregation Networks (PANet), MBiFPN removes nodes with only one input—which contribute little to feature representation—and adds cross-layer connections. This allows the model to fuse high-level semantic information with low-level structural details more effectively. By allowing information to flow both up and down the pyramid and skipping redundant nodes, the MBiFPN specifically boosts the model's ability to identify small, localized defects that standard FPNs might blur out.
Experimental Results
The study utilized a dataset of 5,098 augmented high-resolution wood surface images, covering classes such as dead knots, live knots, and cracks. The YOLOv5-LW model was compared against the original YOLOv5s and other classical models (YOLOv3, YOLOv4, Faster R-CNN, SSD):
- Accuracy: Achieved a mean Average Precision (mAP) of 92.8%.
- Efficiency: Reduced the number of parameters by 27.78% and compressed the total computational volume (FLOPs) by 41.25%.
- Speed: Improved inference speed by 10.16%, reaching 195 FPS (Frames Per Second).
- Fine Defect Detection: Specifically improved the detection accuracy of dead knots and cracks by 0.2% and 1.3% respectively compared to the baseline.
Conclusion
YOLOv5-LW demonstrates that significant efficiency gains can be achieved without sacrificing the precision required for industrial quality control. By combining a lightweight backbone with compensatory features like the Stem Block and ECA, and optimizing feature flow via MBiFPN, the model provides a robust solution for real-time defect detection. Future work will focus on deploying these algorithms onto physical embedded devices in real-world factory environments to further validate durability and practicality in harsh industrial conditions.
Summary updated