## 4 Model Training and Results
### Model Adaptability over Test Images  
To test our model's capability for fine-grained image recognition, we used the Stanford test set, having 2530 challenging identical images. Vehicle recognition results can be seen in Figure 7. Table 3 demonstrates our models' inference speed and compares the result with other trained models. Our model has a slower inference speed as well as preprocessing  
Figure 6: Representation of all models’ training and validation losses after every epoch. time compared to other models because of the increased training parameters after including transformer encoder blocks. The normalized confusion matrix of the proposed model is presented in Figure 8, which was generated after obtaining the precision and recall scores for the test images. Predicted true positive and true negative values for all 208 sub-classes can be seen in the diagonal position, with the dark blue color indicating confidence of over 0.8 on the predicted class, whereas very few false positive and false negative predictions with light blue color indicating that confidence of below 0.4 was obtained. These false predictions occurred where the model became confused due to occlusion and low light. The precision-recall curve and the F1 confidence score curve for all the classes are produced using Equations (7) and (8) and can be visualized in Figure 9. Intuitively, it is evident that as the recall is increasing, the rate of change in accuracy is also increasing. The PR curves are established near the upper right corner, demonstrating the proposed model's efficiency in recall and accuracy. The substantial area under the PR curves suggests that our \begin{table}
\begin{tabular}{l c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multirow{2}{*}{**Pre-Process (ms)**} & \multirow{2}{*}{**Inference Speed (ms)**} & \multicolumn{2}{c}{**NMS/**Image (ms)**} & \multirow{2}{*}{**Image Size**} \\  & & & & \\ \hline Yolov51\_SGD & 0.3 & 15.5 & 0.6 & 640 \(\times\) 640 \\ Yolov51\_ADAM & 0.3 & 15.5 & 0.6 & 640 \(\times\) 640 \\ Yolov5x\_SGD & 0.3 & 28.7 & 0.7 & 640 \(\times\) 640 \\ Yolov5x\_ADAM & 0.4 & 28.4 & 0.7 & 640 \(\times\) 640 \\ Yolov5\_tr\_SGD & 0.8 & 39.2 & 0.9 & 640 \(\times\) 640 \\ Yolov51\_tr\_ADAM & 0.8 & 39.2 & 0.9 & 640 \(\times\) 640 \\ Yolov7 & 0.4 & 15.1 & 0.6 & 640 \(\times\) 640 \\ Yolov8 & 0.3 & 13.9 & 0.5 & 640 \(\times\) 640 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: All models’ inference speed comparison on the Stanford car test set. The latest Yolov7 and Yolov8 models with fewer training parameters have the edge of being lighter models that can detect at a minimum inference speed of 15.1 and 13.9 ms, respectively, but recognition accuracy is lower than that of our proposed model, which is moderately behind by 39.2 ms.  
Figure 7: Proposed models’ recognition results with similarly shaped vehicles but different brand models and make years. The model performed better when provided with similar vehicle shapes and colors at different viewing angles. approach works effectively. Furthermore, the smooth PR curves confirm that our model's accuracy and recall rate have a very stable relationship. The F1 curve for all classes started to flatten at a confidence score of 0.8, as shown in Figure 9b, which means that the bounding boxes under the confidence score of 0.8 are discarded later in validation. Figure 8: Proposed model confusion matrix based on the test set predictions. As can be seen in the figure, the diagonal values are the correctly predicted samples. Figure 9: PR curve and F1 confidence score curve from the proposed model’s test set recognition results. (**a**) represents the [EMAIL_ADDRESS] threshold for all classes where the average precision is 0.944. (**b**) represents the proposed model confidence score of 0.88 at the 0.581 threshold value. We compared the trained model's performance on a Stanford car test set. We passed 2530 images to all the models with the batch size of 10 and calculated the mAP scores through averaging the precision scores for each model using Equation (9).