# Steel Surface Defect Diagnostics Using Deep Convolutional Neural Network and Class Activation Map
## 4 Experimental Results and Discussion
### Performance of Steel Surface Defect Classification
It is observed that the testing accuracy of CNN is 99.44% and the F1-score is nearly close to 1.00, especially showing approximately 8% improved accuracy over the traditional ones. Herein, a randomly split testing set has 360 images, which are 20% of the whole data set. We compare our proposed model with several previous works that propose steel surface defect diagnostics using the same data set (see Table 4). Some of them have used machine learning-based approaches and manual feature extraction, called the adjacent evaluation completed local binary patterns (AECLBPs) [8] and a combination of multiple extractor techniques [16]. Other approaches such as [12; 17] have utilized CNN as the way of end-to-end learning framework. Both machine learning-based studies have shown unfeasible results in terms of accuracy at 98.93% and 96.39%, respectively. Meanwhile, it is evidenced that our proposed CNN architectural model achieves more improved testing accuracy of 99.44%, compared to other deep learning-based algorithms, i.e., CNN [12; 17]. We are also interested to observe the interpretability of deep learning-based methods, where the class activation maps (CAMs) can be drawn out from the proposed CNN diagnostics model. To analyze the localized regions for decision-making, the attention maps are described in Figure 7. Each pair of figures presents an original image of steel surface defect and a localization map in a particular class, retrieved from our proposed model. Depending upon the category, it is observed that each attention map differently localizes in its certain way, while more attention goes from blue to red region, the more it emphasizes. It is also found that there are two main types of attention, i.e., global and local attention. For example, classes that have locally affected parts, i.e., patches, inclusion, and scratches, tend to activate sub-regional features such as spots and stripes. On the other hand, for globally characterized categories, i.e., rolled-in-scale, pitted surface, and crazing, the map is more likely to be highlighted in a wide region, as they have global scattered patterns, e.g., speckles, bumps, and cracks. Consequently, the most salient part from the images for classification is appropriately described in the CAM, which enables interaction between human decision and black-box based deep learning approach. To sum up, by constructing the global average pooling layer in the proposed architecture, the class activation \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Classifier** & **Algorithm** & **Feature Extraction Method** & **Accuracy (\%)** \\ \hline SVM [8] & ML & GLCM & 88.06 & 0.87 \\  & & HOG & 78.61 & 0.77 \\  & & GLCM+HOG & 92.22 & 0.91 \\ Logistic regression & ML & GLCM & 90.83 & 0.90 \\  & & HOG & 80.28 & 0.79 \\  & & GLCM+HOG & 91.94 & 0.91 \\
**Proposed (CNN)** & **DL** & **Feature learning** & **99.44** & **0.99** \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Performance comparison between machine learning based classifiers and the proposed CNN model with respect to accuracy and F-1 score. \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Classifier** & **Algorithm** & **Feature Extraction Method** & **Accuracy (\%)** \\ \hline SVM [8] & ML & AECLBP & 98.93 \\ CNN [12] & DL & Feature learning & 99.05 \\ Ensemble of SVMs [16] & ML & ULBP+GLOM+HOG+Gabor & 96.39 \\  & & filter+Gray level histogram & \\ PLCNN [17] & DL & Feature learning & 90.7 \\
**Proposed (CNN)** & **DL** & **Feature learning** & **99.44** \\ \hline \hline \end{tabular}
\end{table} 
Table 4: A comparative analysis with several existing methods. map could be described for enhancing the interpretability of the proposed network, which lacks in the prior studies.