Abstract: Surface inspection systems are an important application domain for computer vision, as they are used for defect detection and classification in the manufacturing industry. Existing systems use hand-crafted features which require extensive domain knowledge to create. Even though Convolutional neural networks (CNNs) have proven successful in many large-scale challenges, industrial inspection systems have yet barely realized their potential due to two significant challenges: real-time processing speed requirements and specialized narrow domain-specific datasets which are sometimes limited in size. In this paper, we propose CNN models that are specifically designed to handle capacity and real-time speed requirements of surface inspection systems. To train and evaluate our network models, we created a surface image dataset containing more than 22000 labeled images with many types of surface materials and achieved 98.0% accuracy in binary defect classification. To solve the class imbalance problem in our datasets, we introduce neural data augmentation methods which are also applicable to similar domains that suffer from the same problem. Our results show that deep learning based methods are feasible to be used in surface inspection systems and outperform traditional methods in accuracy and inference time by considerable margins.
The Challenge of Industrial Surface Inspection
In "web manufacturing"—the production of continuous flat materials like metal, paper, foil, or plastic film—surface inspection systems are critical for catching defects before products reach consumers. Traditionally, these systems have relied on hand-crafted feature extraction, which requires extensive domain expertise and struggles to adapt to new materials.
While CNNs have revolutionized general image classification, they have faced two massive hurdles in industrial settings:
- Extreme Speed Requirements: Manufacturing lines move incredibly fast (e.g., 10 meters per second). Inspection systems must process around 100 images per second. Standard deep CNNs (like ResNet or DenseNet) are often too slow for this real-time constraint.
- Severe Class Imbalance: In a well-functioning factory, defects are rare (occurring in ~0.1% of samples). This makes it difficult to collect enough labeled defect images to train a robust neural network without it overfitting to the "non-defect" majority class.
Custom Architectures for Real-Time Inference
To tackle the speed challenge, the authors designed custom CNNs from the ground up that prioritize inference speed over extreme depth. Instead of using off-the-shelf models, they developed architectures that minimize computational overhead.
- SurfNet (Main Model): A 10-layer network that uses parametric ReLUs (PReLU) and batch normalization. To maximize speed, it skips pooling layers entirely, relying instead on convolutional strides (stride = 2) for spatial downsampling. It also uses 1x1 convolutions to reduce dimensionality and apply residual skip connections.
- FastInf: An alternative model optimized for absolute minimum inference time. It achieves this by being shallow but very wide (1024 convolution channels).
- MultiVis: A model designed with three parallel lanes to process images at multiple scales simultaneously, mimicking the primate visual cortex.
Overcoming Data Scarcity with GANs
To solve the data scarcity and class imbalance problem, the authors utilized advanced neural data augmentation using Generative Adversarial Networks (GANs):
- pix2pix (Paired Translation): Used to generate synthetic defect images. Domain experts drew simple geometric label maps, and the network translated these into highly realistic, textured defect images.
- CycleGAN (Unpaired Translation): Used to generate non-defect background variations. By transferring styles between different material datasets, the model learned global material variations, making the classifier more robust to different surface types.
Experimental Results and Datasets
The models were evaluated on several datasets, including the public NEU dataset (steel defects) and a new, massive internal dataset called SurfMix. SurfMix contains over 40,000 images aggregated from 23 different industrial systems, covering materials such as steel, paper, foil, glass, and plastic.
Key performance metrics include:
- Blazing Fast Inference: SurfNet achieved an inference time of just 1.9ms per image on a GTX 1080 Ti. The FastInf model pushed this to a staggering 0.3ms per image.
- High Accuracy: SurfNet achieved 98.0% accuracy on the diverse SurfMix dataset and 99.5% Top-1 accuracy on the public NEU dataset.
- Efficiency: Compared to a standard DenseNet, SurfNet is almost 20 times faster with only a negligible 1% drop in test accuracy.
- Augmentation Boost: The GAN-based data augmentation successfully improved test accuracy by up to 3.2%, proving that synthetic images are highly effective for training in narrow domains.
Conclusion
This research demonstrates that deep learning-based methods are not only feasible but highly effective for real-time surface inspection. By designing specialized architectures like SurfNet and employing neural data augmentation to handle class imbalance, manufacturers can achieve state-of-the-art accuracy while meeting the strict latency requirements of high-speed production lines.
Summary updated