# The Development of a Prototype Solution for Detecting Wear and Tear in Pedestrian Crossings
### Threshold Values  
As previously stated, it is crucial to determine appropriate threshold values to achieve the desired outcomes. In this way, 15 images were randomly selected from the dataset and included in a questionnaire. The objective of this task was to have several participants rate the condition of each of the crosswalks according to their sensitivity. This step was essential in overcoming a difficulty encountered in identifying a pattern that would allow the condition of a crosswalk to be classified. The data collected were instrumental in defining a pattern that was subsequently applied to the other images in the dataset. Figure 5 illustrates an example of one of the questions included in the questionnaire. To date, the questionnaire has been answered by 48 participants, and some of the results are shown in Figure 6.  
Figure 4: Use of Adaptive Threshold to determine degradation status: (**a**) Outcome for a crosswalk exhibiting signs of wear; (**b**) Outcome for a crosswalk without signs of wear; (**c**) Outcome for a crosswalk exhibiting a considerable degree of wear.  
As previously stated, the process of classifying the state of degradation of crosswalks involved identifying patterns in images containing exclusively crosswalks. The use of Adaptive Threshold methods [7] enabled the calculation of the white area corresponding to the crosswalk stripes, which is essential for extracting the patterns needed to determine the state of degradation of crosswalks in other images. These patterns are detailed in Table 1 and can be used to determine the state of degradation of crosswalks.  
The initial approach to detecting and classifying the wear and tear of crosswalks was to utilize a YOLOv4-tiny model to identify crosswalks. Subsequently, adaptive thresholding methods were employed to ascertain the state of degradation of the crosswalks identified. During the implementation of this approach, certain issues were identified, particularly when the crosswalk exhibited a high degree of wear. This made it challenging to discern the boundaries of the stripes. One potential solution to this issue is to enhance the intensity of the white pixels in the image, thereby rendering them more conspicuous and facilitating their utilization in the area calculation. This approach is illustrated in Figure 7.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Intervals** & **State of Degradation** \\ \hline \(<\)30 & No wear \\ [30; 50] & Moderate wear \\ \(>\)50 & Severe wear \\ \hline \hline \end{tabular}
\end{table}
Table 1: Wear interval calculated using Adaptive Threshold.  
Figure 5: Example of a question asked on the form.  
Figure 6: Example of the results obtained in the questionnaire.  
Although this solution marginally enhanced the outcome, it did not attain the desired level of satisfaction. Conversely, as will be demonstrated in the performance evaluation in Section 2.3, the impact of shadows cast on the crosswalks impeded the ability to accurately identify and categorize them. Given these constraints and the distinctive application of the Adaptive Threshold technique in classifying the state of deterioration of crosswalks, a second approach was implemented, utilizing the YOLOv4-tiny model. The following section will describe the techniques used in this second approach, as well as the approach itself.