# Detection of Defects on Metal Surfaces Based on Deep Learning
## 3 Experimental Results  
### Image Processing Techniques  
For the experiments, the surface defect data of hot-rolled steel strips from the NEU (Northeastern University) database were used. The NEU dataset consists of surface defect images belonging to six different classes. The defect classes are defined as crazing, inclusion, patch, pitted surface, rolled-in scale, and scratch. Each defect class contains 300 images, resulting in a total of 1800 images of defective metal surfaces. The images have a resolution of 200 \(\times\) 200 pixels. The images of the defect classes in the NEU dataset are shown in Figure 2.  
At this stage of the study, the MobileNetV2 architecture was trained using different image processing techniques. As shown in Table 1, various combinations of image processing techniques were employed. The aim here is to determine the most accurate combination.  
For the technique referred to as GCPOM, the following steps were applied sequentially: adding Gaussian noise, CLAHE histogram equalization, feature extraction and dimensionality reduction using PCA, binarizing the image with Otsu thresholding, and highlighting defects through morphological operations. In the MGH technique, morphological operations, Gaussian noise addition, and HOG transformation were performed sequentially. For the PKO technique, PCA, kernel-based processing, and Otsu thresholding  
Figure 2: The images of the defect classes in the NEU dataset.  
were utilized. In the O technique, only Otsu thresholding was applied. In the MO technique, morphological operations and Otsu thresholding were applied consecutively. In the MGO technique, morphological operations, Gaussian noise addition, and Otsu thresholding were used sequentially.  
As seen in Table 1, the highest accuracy value was achieved using the MGPO image processing techniques. This is due to the appropriate combination of methods and the complementary nature of the image-processing steps.  
With morphological operations, small noise around the defects was cleaned. The Gaussian noise addition step introduced artificial noise to the images, enhancing the model's generalization capability. PCA was utilized to extract features from the images, reduce dimensionality, and compress essential information.  
In the final step, the image was binarized automatically using Otsu thresholding, making the defective areas more distinct. This approach effectively highlighted defects independent of the background, leading to the highest accuracy achieved.  
The images were re-saved following the processes specified in the study (MGPO). A new dataset was created as a result of the proposed method, consisting of the same six classes. As shown in Table 2, the total size of the images has been reduced compared to the NEU dataset. The new dataset contains 1800 images of six different classes, each with a resolution of 200 \(\times\) 200 pixels.  
In this study, the Grayscale NEU dataset and the MGPO dataset were used for training the MobileNetV2 model, and the two trained models were compared; 80% of the datasets were used for training and 20% for testing. As a result of the study, it was observed that the experimental results aligned with the objectives of the study.