# Surface-Defect-Detection **Repository Path**: drchengzhou_0/Surface-Defect-Detection ## Basic Information - **Project Name**: Surface-Defect-Detection - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-11-08 - **Last Updated**: 2021-11-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Surface Defect Detection: Dataset & Papers
🐎📈 Constantly summarizing open source data sets in the field of surface defect research is very important. Important critical papers from year 2017 have been collected and compiled, which can be viewed in the :open_file_folder: [Papers] folder. 🐋

At present, surface defect equipment based on machine vision has widely replaced artificial visual inspection in various industrial fields, including 3C, automobiles, home appliances, machinery manufacturing, semiconductors and electronics, chemical, pharmaceutical, aerospace, light industry and other industries. Traditional surface defect detection methods based on machine vision often use conventional image processing algorithms or artificially designed features plus classifiers. Generally speaking, imaging schemes are usually designed by using the different properties of the inspected surface or defects. A reasonable imaging scheme helps to obtain images with uniform illumination and clearly reflect the surface defects of the object. In recent years, many defect detection methods based on deep learning have also been widely used in various industrial scenarios.
Compared with the clear classification, detection and segmentation tasks in computer vision, the requirements for defect detection are very general. In fact, its requirements can be divided into three different levels: "what is the defect" (classification), "where is the defect" (positioning) And "How many defects are" (split).
## 1. Key Issues in Surface Defect Detection ### 1)Small Sample ProblemThe current deep learning methods are widely used in various computer vision tasks, and surface defect detection is generally regarded as its specific application in the industrial field. In traditional understanding, the reason why deep learning methods cannot be directly applied to surface defect detection is because in a real industrial environment, there are too few industrial defect samples that can be provided.
Compared with the more than 14 million sample data in the ImageNet dataset, the most critical problem faced in surface defect detection is small sample problem. In many real industrial scenarios, there are even only a few or dozens of defective images. In fact, for the small sample problem which is one of the key problems in industrial surface defect detection, there are currently 4 different solutions:
- Data Amplification and GenerationThe most commonly used defect image expansion method is to use multiple image processing operations such as mirroring, rotation, translation, distortion, filtering, and contrast adjustment on the original defect samples to obtain more samples. Another more common method is data synthesis, where individual defects are often fused and superimposed on normal (non-defective) samples to form defective samples.
- Network Pre-training and Transfer LearningGenerally speaking, using small samples to train deep learning networks can easily lead to overfitting, so methods based on pre-training networks or transfer learning are currently one of the most commonly used methods for samples.
- Reasonable Network Structure DesignThe need for samples can also be greatly reduced by designing a reasonable network structure. Based on the compressed sampling theorem to compress and expand small sample data, we use CNN to directly classify the compressed sampling data features. Compared with the original image input, compressing the input can greatly reduce the network's demand for samples. In addition, the surface defect detection method based on the twin network can also be regarded as a special network design, which can greatly reduce the sample requirement.
- Unsupervised or Semi-supervised Method In the unsupervised model, only normal samples are used for training, so there is no need for defective samples. The semi-supervised method can use unlabeled samples to solve the network training problem in the case of small samples. ### 2)Real-time ProblemThe defect detection methods based on deep learning include three main links in industrial applications: data annotation, model training, and model inference. Real-time in actual industrial applications pays more attention to model inference. At present, most defect detection methods are concentrated in the accuracy of classification or recognition, little attention is paid to the efficiency of model inference. There are many methods for accelerating the model, such as model weighting and model pruning. In addition, although the existing deep learning model uses GPU as a general-purpose computing unit(GPGPU), with the development of technology, it is believed that FPGA will become an attractive alternative.
## 2. Common Datasets for Industrial Surface Defect Detection ### 1)Steel Surface: NEU-CLS NEU-CLS can be used for classification and positioning tasks. - Official Link:http://faculty.neu.edu.cn/yunhyan/NEU_surface_defect_database.htmlThe surface defect dataset released by Northeastern University (NEU) collects six typical surface defects of hot-rolled steel strips, namely rolling scale (RS), plaque (Pa), cracking (Cr), pitting surface (PS), inclusions (In) and scratches (Sc). The dataset includes 1,800 grayscale images, six different types of typical surface defects each of which contains 300 samples. For defect detection tasks, the dataset provides annotations that indicate the category and location of the defect in each image. For each defect, the yellow box is the border indicating its location, and the green label is the category score.
A dataset of functional and defective solar cells extracted from EL images of solar modules.
- link:https://github.com/zae-bayern/elpv-dataset
Figure 1. PCB Inspection Dataset.
Figure 2. Cracks on the Bridge(left) and Cracks on the Road Surface.
- Bridge cracks. There are 2688 images of bridge crack without pixel-level ground truth. From the authors "Liangfu Li, Weifei Ma, Li Li, Xiaoxiao Gao". Files can be reached by visiting https://github.com/Charmve/Surface-Defect-Detection/tree/master/Bridge_Crack_Image. - Crack on road surface. From Shi Yong, and Cui Limeng and Qi Zhiquan and Meng Fan and Chen Zhensong. Original dataset can be reached at https://github.com/Charmve/Surface-Defect-Detection/tree/master/CrackForest. We extract the image files of the pixel level ground truth. ### 10)Magnetic Tile Dataset Magnetic tile dataset by githuber: abin24, which can be downloaded from [https://github.com/Charmve/Surface-Defect-Detection/tree/master/Magnetic-Tile-Defect](https://github.com/Charmve/Surface-Defect-Detection/tree/master/Magnetic-Tile-Defect), which was used in their paper "Surface defect saliency of magnetic tile", the paper can be reach by [here](https://link.springer.com/article/10.1007/s00371-018-1588-5) or [here](https://ieeexplore.ieee.org/document/8560423) Figure 3. An overview of our dataset.
This is also the datasets of the paper "Saliency of magnetic tile surface defects". The images of 6 common magnetic tile defects were collected, and their pixel level ground-truth were labeled. ### 11)RSDDs: Rail Surface Defect Datasets The RSDDs dataset contains two types of datasets: the first is a type I RSDDs dataset captured from the fast lane, which contains 67 challenging images. The second is a Type II RSDDs dataset captured from a normal/heavy transportation track, which contains 128 challenging images. Each image of the two data sets contains at least one defect, and the background is complex and noisy. These defects in the RSDDs dataset have been marked by professional human observers in the field of track surface inspection.
Figure 4. Example patches from each one of the 28 texture classes.
Short description - 28 texture classes, see Figure 4. - 160 unique texture patches per class. (Alternative dataset with 12 rotations per each original patch, 160*12=1920 texture patches per class). - Texture patch size: 576x576 pixels. - File format: Lossless compressed 8 bit PNG. - All patches are normalized with a mean value of 127 and a standard deviation of 40. - One directory per texture class. - Files are named as follows: ``blanket1-d-p011-r180.png``, where ``blanket1`` is the class name, ``d`` original image sample number (possible values are a, b, c, or d), ``p011`` is patch number 11, ``r180`` patch rotated 180 degrees. Offical Link: http://www.cb.uu.se/~gustaf/texture/You can see this repo now, we should be grateful to the people who originally open sourced the above data set. They have brought great help to our study and research work. The idea of collecting this data set originally came from reading an article on surface defect detection by SFXiang of "AI算法修炼营(AI_SuanFa)", which prompted me to organize a more comprehensive data set. The collection of papers comes from a CSDNer named "庆志的小徒弟". These papers are only until November 19, and I will continue to be improved after that. Hopefully, feel free to CONTRIBUTE.
Finally, I want to thank the open source contributors of the above data set again.
## Notification This work is originally ntributed by lots of great man for their paper work or industry application. You can only use this dataset for research purpose. If you have any questions or idea, please let me know :email: yidazhang1@gmail.com ## Citation Use this bibtex to cite this repository: ``` @misc{Surface Defect Detection, title={Surface Defect Detection: Dataset and Papers}, author={Charmve}, year={2020.09}, publisher={Github}, journal={GitHub repository}, howpublished={\url{https://github.com/Charmve/Surface-Defect-Detection}}, } ```