# Deep Learning-Enhanced Spectrogram Analysis for
## 3 Methodology
### ResNet50-Based Deep Learning Model  
ResNet50, a deep convolutional neural network pre-trained on ImageNet, was fine-tuned for biomedical spectrogram classification. Unlike traditional feature-engineering-based classifiers, ResNet50 automatically extracts high-level spectral and spatial patterns from spectrograms [27]. To adapt the model to spectrogram classification, the first convolutional layers were frozen, whereas the later residual blocks were fine-tuned using the dataset. This allowed the model to retain general image-level features while learning domain-specific representations from the biomedical spectrograms.  
Figure 2: Proposed deep learning-based workflow for anatomical region classification. The pipeline includes signal acquisition, STFT-based spectrogram conversion, preprocessing with resizing and grayscale normalization, domain-specific augmentation, and classification using a fine-tuned ResNet50 model to identify eight anatomical regions.  
This transfer learning strategy enabled the model to retain low-level image features while learning domain-specific patterns in the spectrograms. The final classification layer was replaced with a fully connected dense layer comprising eight neurons with softmax activation corresponding to the eight anatomical regions. Fine-tuning was performed using the Adam optimizer with a learning rate of 0.0001 and a categorical cross-entropy loss.  
ResNet50 was selected owing to its strong feature extraction capabilities, optimized computational efficiency, and proven effectiveness in biomedical image classification tasks. Compared to deeper architectures such as EfficientNet or Vision Transformers, ResNet50 offers a balance between accuracy and computational cost, making it well-suited for spectrogram-based classification.  
The final fully connected layer was adjusted to provide eight anatomical classes to ensure alignment with the structure of the dataset. The architecture is shown in Figure 3.  
The pseudo-code for the training process is presented in Algorithm 1.  
Figure 3: Modified ResNet50 architecture used for anatomical region classification. The model receives grayscale spectrograms (128 \(\times\) 128) as input and extracts deep spatial and spectral features through convolutional layers. The final fully connected layer is adapted to output probabilities for eight anatomical regions.  
```
0: Preprocessed dataset with learning rate \(\eta\), batch size \(B\), and number of epochs \(N\).
1: Initialize ResNet50 with pre-trained weights
2: Replace the final layer to classify into 8 anatomical regions
3: Set optimizer as Adam with learning rate \(\eta\)
4: Set loss function as categorical cross-entropy
5:for each epoch \(n\in N\)do
6: Shuffle training data
7:for each mini-batch \(B\)do
8: Forward propagate input through ResNet50
9: Compute loss using categorical cross-entropy
10: Backpropagate gradients
11: Update model weights
12:endfor
13: Compute validation accuracy
14:if validation loss increases then
15: Apply early stopping
16:endif
17:endfor
18: Return trained model
```  
**Algorithm 1** Training Procedure for ResNet50 Model