# A Scalogram-Based CNN Approach for Audio Classification in Construction Sites
## 7 Experimental Results  
The proposed model has been trained on the considered dataset for 10 epochs by using 10% of the training set as the validation set (Python 3.10 source code can be downloaded from: [[https://github.com/mscarpinitii/CS-scalogram](https://github.com/mscarpinitii/CS-scalogram)]([https://github.com/mscarpinitii/CS-scalogram](https://github.com/mscarpinitii/CS-scalogram)), accessed on 20 November 2023). The training and validation losses obtained during the training phase are shown in Figure 3(a), while Figure 3(b) shows the corresponding training and validation accuracy. These figures demonstrate the effectiveness of the training, showing that the training procedure is quite stable after about seven epochs. Figure 3(b) also shows that, at convergence, the training accuracy is about 99.5%, while the validation one is about 99%. To evaluate the proposed approach, we have also used the overall accuracy, the per-class precision, the per-class recall, and the per-class F1-score, as well as their weighted averages [53], computed on the test set. Moreover, the confusion matrix is shown in Figure 5. The confusion matrix clearly shows that the proposed approach is able to provide very good results for the classification of real-world signals recorded in construction sites. In fact, most of the instances are in the main diagonal of the matrix. There is a little confusion between the compactor (IRCOM), which has been confused with the JD50D excavator and the concrete mixer, and the CAT320E excavator, which is, again, mainly confused with the JD50D excavator and the concrete mixer. This behavior is due to the fact that all of these pieces of equipment have similar engines. The results in terms of the precision, recall, and F1-score of the proposed approach are summarized in Table 3. In addition, this table confirms the conclusion drawn from the  
Figure 4: Training and validation loss (**a**) and accuracy (**b**) of the proposed approach. confusion matrix in Figure 5: the JD50D and Concrete Mixer classes have lower precision, while the compactor (IRCOM) and CAT320E excavator show lower recall. However, the F1-score is quite stable among all classes. The Hitachi 50U excavator performs the best in between the five considered classes. Despite this slight variability in performance, the weighted averages of the considered metrics are very good and settled at 0.989. The proposed approach was compared with similar state-of-the-art solutions. Specifically, we compared our approach to the one proposed by [PERSON] in [4], based on a CNN fed by the spectrograms with corresponding deltas (i.e., the difference of the feature among two consecutive time instants); the approach proposed by [PERSON] et al. in [31], based on a custom deep CNN (DCNN) fed by the spectrograms; and the approach proposed by [PERSON] et al. in [34], based on an ESN working on several spectral features and a majority voting between adjacent chunks. The results obtained by these state-of-the-art approaches in terms of precision, recall, F1-score, and their weighted averages are shown in Tables 4, 5, and 6, respectively. The results presented in these tables confirm that the approach proposed in this paper (see Table 3) performs better than the state of the art for all of the considered metrics. Figure 6 summarizes all of the considered metrics for these compared approaches. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Class** & **Precision** & **Recall** & **F1-Score** \\ \hline JD50D & 0.976 & 0.995 & 0.986 \\ IRCOM & 0.996 & 0.977 & 0.987 \\ Mixer & 0.979 & 0.998 & 0.988 \\ CAT320E & 0.997 & 0.983 & 0.989 \\ Hitachi50U & 0.997 & 0.994 & 0.996 \\ \hline All classes & 0.989 & 0.989 & 0.989 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Per-class performance of the proposed approach. Figure 5: Confusion matrix obtained by the proposed approach.