# A Multi-Scale Feature Extraction Algorithm for Chinese Herbal Medicine Image Classification
## 5 Experiments and Results Analysis
### Ablation Experiment Analysis  
Ablation experiments were conducted on both the CHMD1 and CHMD2 datasets to systematically evaluate the effectiveness of the multi-scale representation module. By comparing the performance differences between models with and without the multi-scale representation module, the contribution of this module was validated. Specifically, two experimental setups were designed: without the multi-scale representation module and with the multi-scale representation module. The results are presented in Table 4. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Dataset** & **Method** & **Accuracy** & **Precision** & **Recall** & **F1** \\ \hline \multirow{2}{*}{CHMD1} & Without Multi-scale Representation Module & 76.41\% & 72.72\% & 70.16\% & 70.44\% \\  & **With Multi-scale Representation Module (ours)** & **86.22\%** & **83.80\%** & **83.81\%** & **83.26\%** \\ \hline \multirow{2}{*}{CHMD2} & Without Multi-scale Representation Module & 77.08\% & 77.74\% & 74.28\% & 75.08\% \\  & **With Multi-scale Representation Module (ours)** & **89.22\%** & **88.85\%** & **87.87\%** & **88.16\%** \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparative experiments with and without the multi-scale representation module on CHMD1 and CHMD2. Figure 7: Comparative experimental results of MSPyraNet on CHMD2. The experimental results reveal that the introduction of the multi-scale representation module significantly enhances the model's performance on both datasets. Specifically, on the CHMD1 dataset, the model's accuracy, precision, recall, and F1 score improved by 9.81%, 11.08%, 13.65%, and 12.82%, respectively. On the CHMD2 dataset, the corresponding metrics improved by 12.14%, 11.11%, 13.59%, and 13.08%. These results robustly confirm the importance of the multi-scale representation module in the task of Chinese herbal medicine image classification. Notably, the MSPyraNet model exhibited superior performance on the more complex CHMD2 dataset. As shown in Table 3, MSPyraNet's accuracy, precision, recall, and F1 score on CHMD2 improved by 3%, 5.05%, 4.06%, and 4.9%, respectively, compared to CHMD1. This indicates that the model possesses stronger adaptability and robustness in handling complex Chinese herbal medicine classification tasks. To validate the suitability of smaller convolutional sizes for feature extraction in scenarios where Chinese herbal medicines are stacked, we conducted experiments on CHMD2 using existing multi-scale fusion pyramid structures [27] with varying convolutional sizes. The results are presented in Table 5.  
From Table 4, it is evident that adjusting the convolutional sizes in consideration of the characteristics of Chinese herbal medicines led to a significant improvement in model performance. MSPyraNet achieved improvements of 10.12%, 9.77%, 12.2%, and 11.66% in accuracy, precision, recall, and F1 score, respectively. This demonstrates that the multi-scale representation module in MSPyraNet is particularly well suited for Chinese herbal medicine image classification tasks. To verify the importance of each convolutional unit in the multi-scale representation module, we conducted ablation experiments on CHMD2 by removing one convolutional unit at a time. The experimental results are shown in Table 6.  
The experimental results indicate that removing any single convolutional unit from the Multi-scale Representation Module leads to a decline in model performance. Among them, the removal of the 3 \(\times\) 3 convolution has the most significant impact, with accuracy, precision, recall, and F1-score dropping to 82.99%, 82.96%, 80.86%, and 81.42%, respectively.