## 3 Recognizing the Wear State of Milling Cutters under Variable Conditions Based on Optimized SDP
### A Residual Network with an Integrated Attention Mechanism  
In the milling process, the vibration signals from the three-axis direction merged into a visualized DDP image serve as the input for constructing a milling cutter wear state identification model. The significant representational learning capability of a convolutional neural network (CNN) in image recognition can be utilized. CNN abstracts information in layers, and as the network deepens, so does the level of abstraction. Compared to shallow convolutional neural networks, deeper networks can extract higher-dimensional feature information from images. As the network deepens, the expressions each layer needs to learn are relatively simpler, thereby optimizing model performance. However, training such models might encounter issues of gradient vanishing or exploding. The residual network (ResNet) introduces residual connections into CNN, thereby simplifying the network learning process and effectively solving the issues of gradient disappearance, explosion, and network degradation caused by increased depth. ResNet consists of multiple residual blocks, each containing convolutional layers,  
In CBAM, the channel attention module (CAM) aggregates spatial information of the feature map \(\mathbf{F}\) through global average pooling and global maximum pooling operations, followed by element-wise summation after entering a multi-layer perceptron (MLP), resulting in channel attention \(\mathbf{M}_{\text{c}}\), expressed as:  
\[ \begin{array}{ll}\mathbf{M}_{\text{c}}(\mathbf{F})&=\sigma(MLP(AvgPool(\mathbf{F}))+MLP( MaxPool(\mathbf{F})))\\ &=\sigma\Big{(}\mathbf{W}_{1}\Big{(}\mathbf{W}_{0}\Big{(}\mathbf{F}_{\text{avg}}^{\text{c}} \Big{)}\Big{)}+\mathbf{W}_{1}(\mathbf{W}_{0}(\mathbf{F}_{\text{max}}^{\text{c}}))\Big{)}, \end{array}  \tag{5}\]  
where \(\sigma\) is the Sigmoid function; \(\mathbf{F}_{\text{avg}}^{\text{c}}\) is the global average pooling feature; \(\mathbf{F}_{\text{max}}^{\text{c}}\) is the global maximum pooling feature; and \(\mathbf{W}_{0}\) and \(\mathbf{W}_{1}\) are the weights of the MLP, connected by the ReLU activation function between them. The spatial attention module (SAM) in CBAM generates an effective feature descriptor by concatenating the features obtained from average pooling and maximum pooling along the channel axis of the feature map \(\mathbf{F}\), followed by a convolution operation to obtain spatial attention \(\mathbf{M}_{\text{s}}\), expressed as:  
\[ \begin{array}{ll}\mathbf{M}_{\text{s}}(\mathbf{F})&=\sigma\big{(}f^{\gamma\times 7}([ AvgPool(\mathbf{F});MaxPool(\mathbf{F})])\big{)}\\ &=\sigma\Big{(}f^{\gamma\times 7}\Big{(}\Big{[}\mathbf{F}_{\text{avg}}^{\text{s}}; \mathbf{F}_{\text{max}}^{\text{s}}\Big{]}\Big{)}\Big{)},\end{array}  \tag{6}\]  
where \(f^{\gamma\times 7}\) represents a convolution operation with a 7 \(\times\) 7 kernel; \(\sigma\) is the Sigmoid function; and \(\mathbf{F}_{\text{avg}}^{\text{s}}\) and \(\mathbf{F}_{\text{max}}^{\text{s}}\) are the average and maximum pooling features along the channel axis, respectively. To accurately and swiftly classify DDP images based on the actual needs of milling cutter wear state identification, using ResNet-50 as the backbone of the identification model maintains high processing efficiency while keeping the network depth. To further enhance the performance of the identification model, integrating the attention mechanism allows the fusion of CBAM and ResNet-50, suppressing ineffective features and strengthening the network's ability to discern important features. By taking the output \(F(\mathbf{x})\) of each residual block's non-skip connection in ResNet-50 as the input feature map for CBAM, the CBAM-ResNet-50 network is constructed, enhancing the milling cutter wear state feature extraction capability of the identification model from both channel and spatial perspectives.