
Figure 1.
CBAM-ResNet50 Network Model

Figure 2.
CAM Attention Mechanism Diagram

Figure 3.
Curve between the number of iterations and the accuracy with or without transfer learning

Figure 4.
Curve between the number of iterations and the loss value with or without transfer learning
TABLE I.
Four CBAM Attention Mechanism Addition Schemes
| Programmer | Attention mechanism adding method |
|---|---|
| Option 1 | Add an attention mechanism after the first convolution layer |
| Option 2 | Two attention mechanisms are added after the first and last convolution layer |
| Option 3 | Add 1 attention mechanism after the last convolutional layer |
| Option 4 | Do not add attention mechanism |

Figure 5.
Performance comparison of CBAM-ResNet50 model with different addition modes of attention mechanism
TABLE II.
Performance comparison of CBAM-ResNet50 model under different activation functions
| Activation function | Classification accuracy (%) |
|---|---|
| AlphaDropout+SeLU | 90.58 |
| AlphaDropout+ReLU | 90.45 |
| ReLU | 89.16 |

Figure 6.
Confusion Matrix of Film Damage Classification Identification Results on CBAM-ResNet50
TABLE III.
Film Damage Classification and Identification Results of CBAM-ResNet50 Model
| Damage category | Accuracy (%) | Accuracy (%) | Recall (%) | F1 Fraction |
|---|---|---|---|---|
| Crack | 95.02 | 95.99 | 96.69 | 96.34 |
| Dewetting | 96.21 | 96.78 | 96.49 | |
| Particles | 93.98 | 91.90 | 92.93 | |
| Scratches | 88.01 | 85.98 | 86.98 |
TABLE IV.
Ablation experiments on a test set of self-made film damage images
| Original model | Transfer learning | CBAM Protocol 1 | CBAM Scheme 2 | CBAM Scheme 3 | CBAM Protocol 4 | AlphaDrop out +SeLU | AlphaDrop out+ReLU | Accuracy (%) |
|---|---|---|---|---|---|---|---|---|
| ✓ | 65 | |||||||
| ✓ | ✓ | 85.04 | ||||||
| ✓ | ✓ | 85.06 | ||||||
| ✓ | ✓ | 85.12 | ||||||
| ✓ | ✓ | 85.09 | ||||||
| ✓ | ✓ | 85.08 | ||||||
| ✓ | ✓ | 85.17 | ||||||
| ✓ | ✓ | 85.13 | ||||||
| ✓ | ✓ | ✓ | 85.69 | |||||
| ✓ | ✓ | ✓ | 89.16 | |||||
| ✓ | ✓ | ✓ | 86.45 | |||||
| ✓ | ✓ | ✓ | 85.04 | |||||
| ✓ | ✓ | ✓ | ✓ | 90.58 | ||||
| ✓ | ✓ | ✓ | ✓ | 90.45 |
TABLE V.
Film Damage Classification Performance of Different Models
| Model | Test Set Accuracy (%) | Training time (H) | Number of parameters |
|---|---|---|---|
| AlexNet | 63.28 | 57 | 57.02×106 |
| GoogLeNet | 60.59 | 42 | 46.88×106 |
| VGG16 | 70.02 | 135 | 130.38×106 |
| VGG19 | 67.19 | 142 | 139.59×106 |
| ResNet18 | 64.32 | 21 | 21.80×106 |
| ResNet50 | 65.01 | 25 | 25.56×106 |
| ResNet101 | 64.57 | 41 | 44.55×106 |
| CBAM-ResNet50 | 90.58 | 23 | 23.48×106 |

Figure 7.
Film Damage Classification Performance of Different Models

Figure 8.
Confusion Matrix of Steel Defect Classification Recognition Results on CBAM-ResNet50