# A Method for Enhancing the Accuracy of Pet Breeds Identification Model in Complex Environments
## 4 Experiment and Analysis
### Ablation Experiments  
To validate the loss function employed to train PBI-EdgeNext and evaluate the effects of the various modules on the vanilla EdgeNeXt model, we apply ablation on the CPI dataset, utilizing the Sophia optimizer. The experimental setup and results are detailed in Table 3.  
On the CPI dataset, we respectively train the original EdgeNeXt model 100 epochs via cross-entropy loss function and Poly-1 loss function. The test results indicate that the model trained using the Poly-1 Loss function has shown significant improvement compared to using the cross-entropy loss function. For Top-1 accuracy, the EdgeNeXt model trained with the Poly-1 Loss function is 0.05 percentage points higher. The Top-5 accuracy is improved by 1.10 percentage points.  
We incorporate position encoding modules into stages 3 and 4 of the vanilla EdgeNeXt architecture and train the model using a cross-entropy loss function. Test results indicate that both Top-1 and Top-5 accuracies are enhanced relative to the baseline EdgeNeXt model, gaining 0.18 and 0.54 percentage points, respectively. When the model is trained using Poly-1 loss, there is a 0.63 percentage point improvement in the Top-1 accuracy and a 1.08 percentage point improvement in the Top-5 accuracy compared to training with cross-entropy loss.  
We then test the impact of the Octave convolutional block on the network model. Subsequently, we assess the influence of the Octave convolutional block on the network model. We integrate it into the original EdgeNeXt and conduct 100 training epochs each, using the cross-entropy loss function and PolyLoss on the CPI dataset, respectively. The results show that the inclusion of this module leads to slight enhancements in Top-1 accuracy, recall, and precision. When compared to the original EdgeNeXt model, the Top-1 accuracy is increased by 0.63 percentage points, and the Top-5 accuracy by 1.35 percentage points for the model trained with cross-entropy loss. Furthermore, the Top-1 accuracy rises an additional 1.17 percentage points for the PolyLoss-trained model compared to the cross-entropy loss-trained model.  
Finally, we test our solution by adding both the two PE modules and the Octave convolutional block to the model (i.e., using our PBI-EdgeNeXt model) while using PolyLoss  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Metrics**} & \multicolumn{6}{c}{**Datasets**} \\ \cline{2-7}  & \multicolumn{3}{c}{**Oxford-IIIT Pet**} & \multicolumn{3}{c}{**CPI**} \\ \cline{2-7}  & **ResNet** & **DenseNet** & **Swin Transformer** & **ResNet** & **DenseNet** & **Swin Transformer** \\ \hline Top-1 Acc & 79.10 & 89.10 & 85.32 & 79.46 & 89.19 & 86.58 \\ \hline Top-5 Acc & 95.41 & 98.02 & 96.22 & 93.87 & 97.93 & 96.13 \\ \hline mP & 79.90 & 89.38 & 85.56 & 79.81 & 89.37 & 86.92 \\ \hline mR & 79.10 & 89.10 & 85.32 & 79.46 & 89.19 & 86.58 \\ \hline mF\({}_{1}\) & 79.05 & 89.11 & 85.27 & 79.32 & 89.12 & 86.54 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of two datasets. It illustrates that models exhibit superior performance after fine-tuning on the CPI dataset compared to those fine-tuned on the vanilla Oxford-IIIT Pet dataset.  
for training. Among the eight experimental results, our solution demonstrates the highest recall rate for pet breeds identification, coupled with high precision. Additionally, the Top-1 accuracy of our model tops the charts across the eight datasets, showing an improvement of 1.89 percentage points compared to the vanilla EdgeNeXt model and 0.45 percentage points compared to using the cross-entropy loss function. This demonstrates the effectiveness of our solution in enhancing the EdgeNeXt algorithm.