# Traffic Monitoring System Based on Deep Learning and Seismometer Data
## 5 Discussion  
This study achieved good performance in probabilistic vehicle detection, and it confirmed the effectiveness of long-term monitoring. The neural networks outperformed template matching in computational cost and in terms of accuracy and generalization. CNN, in particular, achieved state-of-the-art performance in analyzing new data.  
CNN was able to detect and identify these vehicles by their frequency components, even when their signals overlapped. For example, at the time of 16:33:43 in Figure 9, CNN determined a 40% probability for a truck and a 60% probability for a car, even though the truck's signal was stronger than that of the car. We attribute this ability to the convolutional filters in CNN which, unlike RNN and DNN, input extracted features to the dense layers. Although RNN had the highest recall, CNN had the highest precision. Because CNN detected the overlapped vehicles with a probability of less than 90% (Figures 8d and 9), these identifications were not counted as detections, but the recall score could be enhanced by decreasing the threshold probability to below 90%. However, CNN and other networks have failed to recognize the existence of overlapped vehicles within the same type. The current network's architectures were not designed to count multiple vehicles. This problem could be overcome by using more than one receiver.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Class** & **DNN** & **CNN** & **RNN** \\ \hline \multirow{3}{*}{Precision (\%)} & Big (bus, trucks) & 100 & 100 & 88.8 \\  & Medium (light car) & 75.8 & 97.9 & 81.3 \\  & Small (motorcycle) & 90.4 & 90.9 & 80 \\ \hline \multirow{3}{*}{Recall (\%)} & Big (bus, trucks) & 93.8 & 100 & 100 \\  & Medium (light car) & 95.9 & 95.2 & 97.9 \\  & Small (motorcycle) & 67.8 & 72.2 & 85.7 \\ \hline \multicolumn{5}{c}{Average Precision (Recall) (\%)} & 88.7 (85.8) & 96.2 (89.1) & 83.3 (94.5) \\ \hline \hline \end{tabular}
\end{table}
Table 4: Precision and recall of networks on a 15 min data record, including 16 large, 49 medium, and 28 small Vehicles.  
Figure 10: **(a)** The run time required by DNN (red), CNN (blue), and RNN (green) to process a seismic record 1024 h long (2.35 GB). **(b)** The memory usage required by the three networks to process the long seismic record, including the RAM usage and TensorFlow in the backend.  
The relatively poor performance of RNN may stem from the intrinsic conflict between the independence of vehicle events and the inclusion of the LSTM layer in RNN that detects sequences of events. The RNN tries to create a long memory for the sequence of vehicle classes, but the succession of vehicle events is essentially random.  
All networks were similar in their computational cost. However, CNN had the shortest running time for very long records. On average, CNN needed 5 min to interpret a 1-day record and 70 min to interpret a 1-month record. DNN had the lowest memory demand of the three models, using a maximum of 1.72 GB of the system RAM; however, memory usage was tolerable for the other two models (Figure 10). Theoretically, the cost of memory usage is constant at all levels of traffic because the neural network only needs to store the weights and biases [29]. Ultimately, the proposed system based on seismic signals has been proved as an alternative solution for vehicle classification with an accuracy of up to 97%, close to the previously adopted systems based on the automatic visual classification (90-99%) and the loop detector systems (99% accuracy). The systems we tested did not have high power requirements or high computational costs and were physically unobtrusive. More importantly, the traffic monitoring system based on seismic data was able to detect and classify vehicles reliably without violating the public's privacy.