Abstract
As a data-driven method, the performance of deep convolutional neural networks (CNN) relies heavily on training data. The prediction results of traditional networks give a bias toward larger classes, which tend to be the background in the semantic segmentation task. This becomes a major problem for fault detection, where the targets appear very small on the images and vary in both types and sizes. In this paper, we propose a new network architecture, DefectNet, that offers multi-class defect detection on highly-imbalanced datasets. DefectNet consists of two parallel paths: a fully convolutional network and a dilated convolutional network to detect large and small objects respectively. We propose a hybrid loss maximizing the usefulness of a dice loss and a cross-entropy loss, and we also employ the leaky rectified linear unit (ReLU) to deal with the rare occurrence of some targets in training batches. The prediction results show that our DefectNet outperforms state-of-the-art networks for detecting multi-class defects with an average accuracy improvement of approximately 10% on a wind turbine dataset.
Introduction: The "Needle in a Haystack" Problem
In industrial inspection, identifying defects is often a "needle in a haystack" challenge. For wind turbine blades, the background (the blade surface and the sky) typically accounts for over 99% of the pixels. Critical defects like surface voids or scratches may occupy only a few dozen pixels. Standard CNNs struggle with this extreme class imbalance for two primary reasons:
- Class Bias: Traditional loss functions gravitate toward the majority class to minimize error, often ignoring tiny defects entirely.
- Resolution Loss: Standard pooling layers reduce spatial resolution. For minute defects, aggressive downsampling can effectively erase the object from the network's feature maps.
Methods: The DefectNet Architecture
To address these challenges, the authors introduced DefectNet, a dual-path CNN designed to handle varying scales and extreme imbalance simultaneously.
Dual-Path Strategy
- Path 1 (FCN): A Fully Convolutional Network based on VGG-19 with skip layers, optimized for medium-to-large objects.
- Path 2 (Dilated Path): Uses dilated (atrous) convolutions to increase the receptive field without losing spatial resolution. This path employs a sequence of increasing and decreasing dilation factors to capture both global context and fine-grained local details.
Hybrid Loss and Activation
The model utilizes a Hybrid Loss Function combining Weighted Cross Entropy (WCE) and Generalized Dice Loss (GDL). While researchers often weight classes by inverse frequency ($1/f_c$), the authors found this over-weights noisy classes and instead proposed a square root weighting ($1/\sqrt{f_c}$) for better stability. Additionally, Leaky ReLU is used to prevent the "dying ReLU" problem, ensuring that neurons continue to update even when rare classes are infrequent in training batches.
Experimental Setup
The model was benchmarked on a custom Wind Turbine Blade Dataset containing 2,188 high-resolution images across 9 categories, including Erosion, Scratches, and Surface Voids. The dataset is highly imbalanced; for instance, "Erosion" is common, while "Chipped Paint" is extremely rare. For training, images were sliced into 61,250 overlapping 400×400 patches.
Key Results
DefectNet was compared against established architectures like UNet and DeepLabv3+. As shown in the performance table, DefectNet with the hybrid loss function achieved the highest average accuracy across all defect types.
- Overall Performance: DefectNet ($L_{hybrid}$) achieved an average accuracy of 79.71%, significantly outperforming DeepLabv3+ (73.22%) and standard FCN (35.53%).
- Rare Class Detection: It showed massive improvements in difficult categories like "Repairs" (90.10% vs. 20.30% for FCN) and "Scratches" (84.04% vs. 21.09% for FCN).
- Consistency: The model demonstrated lower variance in accuracy across different defect types, indicating it is less biased toward the "easier" majority classes.
Conclusion
DefectNet provides a robust solution for multi-class defect detection in highly imbalanced industrial datasets. While it carries a slightly higher computational cost (~62.8ms per patch), its ability to consistently identify rare and small-scale defects makes it a superior choice for critical infrastructure inspection. Future work will focus on reducing false positives and exploring applications in medical imaging and hazard monitoring.
Summary updated