## 3 Proposed TSR Methodology
### Traffic Sign Classification (TSC) Step
#### 3.2.2 TSC Models and Architectures
In fact, a good fit is identified by a training and validation loss that decreases to a point of stability and a training and validation accuracy that increases until stability. The application of the TSC_MA achieves a weighted average of 99%, as shown in Table 10. This score is more significant than that found in previous research. It is commonly observed that incorporating an attention mechanism into the TSC model can improve its performance compared to one without one. In addition, the five-fold cross-validation technique is also performed on the GTSRB dataset in order to further evaluate our TSC_MA. Figure 11: Obtained accuracy and loss curves after 70 epochs (TSC_MA). Figure 12: Obtained accuracy and loss curves after 70 epochs (TSC_MA). \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**Precision**} & \multicolumn{2}{c}{**Recall**} & \multicolumn{2}{c}{**F1 Score**} \\ \hline
**Weighted avg (\%)** & 98 & 98 & 98 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: TSC_M weighted avg rates trained for 70 epochs. In fact, the dataset is divided into five subsets, where each subset is used once as the testing set and the remaining four subsets are combined to form the training set. This process is repeated five times, with each subset being used as the testing set once, and the average performance across all iterations is calculated. In each iteration, we can compute various performance measures, such as accuracy and AUC. Based on lists of accuracies and AUCs obtained by the application of five-fold cross-validation, it appears that the model being evaluated is performing very well, with consistently high accuracies and AUCs across multiple trials. In fact, the mean accuracy of the model is 0.994 with a standard deviation of 0.001. This means that the model can correctly predict the class of 99.4% of the samples on average. Additionally, the mean AUC (area under the ROC curve) of the model is 0.999 with a standard deviation of 0.000. An AUC of 0.999 means that the model has a perfect ability to distinguish between the positive and negative classes, which is a very good performance. Overall, the TSC_MA model is highly accurate and consistently performs well across multiple trials. The mean accuracy and AUC are very high, with negligible standard deviation, indicating a very reliable and robust model. The confusion matrix is also a valuable tool used for evaluating the performance of the TSC_MA algorithm. In fact, a confusion matrix for 43 classes would be a 43 \(\times\) 43 matrix that shows the number of correctly and incorrectly classified instances for each class, as shown in Figure 13. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Precision** & **Recall** & **F1 Score** \\ \hline
**Weighted avg (\%)** & 99 & 99 & 99 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: TSC_MA model weighted avg rates trained for 70 epochs. Figure 13: Confusion matrix of the proposed TSC_MA. Various evaluation metrics can be calculated using the values in the confusion matrix, such as accuracy, precision, recall, F1-score, etc. In fact, we counted the number of classes with the same F1 score together, and the obtained results were: 100% for fourteen classes, 99% for sixteen classes, 98% for twelve classes, and 97% for one class;  
5. Classification step's performance evaluation  
In order to validate the robustness of our proposed model, the TSC_MA is trained, validated, and tested on the BTSCB, which comprises more than 7000 traffic sign images of 62 different classes. It gives an image of a road scene that is close to real-time weather conditions and is influenced by the cluttered environment that enables the system to afford an adequate result in real-time. In fact, the TSC_MA was trained for 70 epochs. Training, validation, and testing accuracy rates reach, respectively, 99.35%, 99.31%, and 99.27%. These results, as shown in Table 11, are considered interesting in addition to those found previously with the GTSRB dataset, which confirms the robustness of our developed TSR system.