# Stain Defect Classification by Gabor Filter and Dual-Stream Convolutional Neural Network
## 5 Experimental Result
### Class Activation Map According to the Number of Gabor Images  
The Grad CAM (Class Activation Map) method [32] was applied to visualize the detection area for CCM images. \(V_{Merge}\) of the Single-stream network in Figure 4, and \(V_{Gray}\) and \(V_{Gabor}\) of the Dual-stream network in Figure 5 were investigated and displayed. Figure 8 shows a single-stream result for the stain image of the CCM dataset, (a) is a stain image with stains on the left and right sides, (b) and (g) are the output vector according to the input image as a CAM image This is the output image. (b) is a single-stream output CAM image inputting only one gray-scale image, and it was classified as OK without detecting stains. It can be seen that the red points of the CAM image are distributed in the center. (c) is the output CAM image from inputting eight Gabor filter images into a single stream. It is classified as a stain, and it can be confirmed that the red point of the CAM image is visible around the stain. (d) is an output CAM image by inputting a gray-scale image and two selected Gabor filter images. It was classified as a stain, and red points were distributed around the stain. (e) is a single-stream CAM image input of a gray-scale image and four selected Gabor filter images. Stains present on the left side were detected. (f) is a CAM image input of a gray-scale image and six selected Gabor filter images. It was classified as a stain, and the red distribution of CAM confirmed a wide area so that the stain could be well detected. (g) is the CAM result when all eight gray-scale images and Gabor filter images are input as single-stream. By checking the stain on the left, you can confirm that it is classified as a stain. Figure 9 shows the dual-stream result of the stain image of the CCM dataset, (a) is the stain image with stains on the left and right, (b) to (i) are the output vector according to the input image to the CAM image This is the output image. (b) and (c) are dual-stream output CAM images of one gray-scale image, and two selected Gabor filters, (b) is a gray-scale image stream, and (c) is a CAM image resulting from a Gabor filter image stream. (b) and (c) were classified as stains. The red part in (b) does not exist around the stain. Still, the red part in (c) exists around the stain, so the Gabor filter stream detects the stain and can check that (d) and (e) are dual-stream output CAM images of one gray-scale image, and four selected Gabor filters, (d) is a gray-scale image stream, and (e) is a CAM image resulting  
Figure 8: CAM image result for CCM Stain image in a Single-stream Network. from a Gabor filter image stream. (d) and (e) were classified as stains, and it was confirmed that both the red part of (d) and the red part of (e) were marked toward the stain. (f) and (g) are dual-stream output CAM images of one gray-scale image and six selected Gabor filters, (f) is a gray-scale image stream, and (g) is a CAM image resulting from a Gabor filter image stream. (f) and (g) were classified as stains, and it can be confirmed that (f) detected the right stain and (g) detected the left stain. (h) and (i) are dual-stream output CAM images of one gray-scale image and eight Gabor filters, (h) is a gray-scale image stream, and (i) is a CAM image resulting from a Gabor filter image stream. (h) and (i) were classified as stains, and (i) detected the left stain compared to (h). Figure 10 shows the single-stream result for the OK image of the CCM dataset, and the defect located in the middle of (a) is a shadow and not a stain. (b) to (g) are images in which the output vector, according to the input image, is output as a CAM image. (b) is an output CAM image of a single-stream with only one gray-scale image input, and it can be confirmed that the red point was misclassified as a stain by looking at the shadow. (c) is the CAM image of the output vector obtained by inputting 8 Gabor filter images into a single stream. Although the red point in the CAM image was out of the shadow area, it was misclassified as a stain.