## 3 Testing and Validation  
To meet the challenge of detecting and counting different types of users of cycling and hiking trails using computer vision techniques, a dataset was initially created [8]. The performance tests carried out on the YOLOv3-Tiny CNN model applied to that dataset led to the conclusion that it was necessary to increase the number of images identifying the motorcycle and bicycle classes in order to improve YOLOv3-Tiny's accuracy. The new version of the dataset is available in [77]. This task, described in the previous section, improved YOLOv3-Tiny's classification accuracy, as shown in Figure 36. In the previous version of the dataset, these two users, who use a bicycle, were wrongly classified as persons instead of bicycles. The tests carried out with the previous version of the dataset also revealed some flaws in the classification of the motorcycle class. Some of the detections were sometimes classified as persons. As can be seen in Figure 37, with the new version of the dataset, this type of user is now correctly classified with a very high degree of certainty. Figure 36: Example of detection with YOLOv3-Tiny model trained with improved dataset. Figure 35: Filtering by time period in a sensor node. To conduct a set of tests to validate and prove the concept of the proposed prototype described in the previous section, a stake was driven into the ground to simulate the ideal height for positioning the hardware. The sensor node was then attached to the stake with plastic clamps and powered by a portable battery, as can be seen in Figure 38. The sensor node was thus pointed toward the length of the route shown in Figure 39. It is assumed that when the sensor nodes are installed on the trail, their GPS coordinates are recorded in the central database. Figure 37: Second example of detection with YOLOv3-Tiny model trained with improved dataset. Figure 38: Positioning the sensor node on the ground. Figure 39: Part of the trail captured by the sensor node. Once the sensor node was attached, the tests began. For demonstration purposes, an access point and an auxiliary smartphone were used to establish a remote connection via SSH with the sensor node. This connection, made using the Terminus application [78], was used to check the results of different types of users' detection and classification. Figure 40 shows that this auxiliary smartphone is already connected via SSH and ready to run the detection and classification script on the sensor node. The command shown in Figure 40 executes the script \"object_tracker_databaseTest.py\". It uses the YOLOv3-Tiny model for detection, with pre-trained weights located in the \"./checkpoints/yolov3-tiny-416-V3\" directory. These weights are already adjusted with the new version of the dataset. The \"--score 0.70\" parameter defines the minimum confidence threshold to consider a detection valid. The \"--info\" argument activates the display of detailed information on detections and classifications during execution. The \"--don_show\" parameter disables the real-time display of detections and ratings. Since the operating system does not have a graphic interface either, this was not possible. The result of the detections and classifications will be saved in a video in MP4 format, whose path and name are specified by \"--output./outputs/test-final-saw-position-2-threshold0-70-distance-0-25.mp4\". This parameter is only used for testing and validating the prototype. In addition, the \"--database\" parameter relates to the functionality of detections and classifications being recorded in the local database. After running the Python script to start detecting and classifying users, we began by testing the classification of the motorcycle class (Figure 41). Figure 41 shows that the YOLOv3-Tiny model correctly identifies the motorcycle class, with a certainty of 73%. Tests were then carried out to check the classification accuracy of the bicycle class. Figure 42 shows that the classification is perfect, with 100% certainty that the object belongs to the bicycle class.