## 2 Data Collection  
The data used in this paper comes from traffic volume data near several primary and secondary schools in Pudong New Area, Shanghai. The experimental equipment includes DV cameras that capture real-time video data of several road sections near these schools, totaling 4 h:12 m of video. The videos cover traffic conditions and road types at six locations during various dates and times, including school arrival and departure periods. As shown in Figure 1, Figure 1A,B have no pedestrian crossings but include parking spaces; Figure 1C-E feature both pedestrian crossings and parking spaces, and Figure 1F has a pedestrian crossing without parking spaces. In addition, the red lines marked in Figure 1 indicate the positions where the road width and length are measured, providing additional context for the physical dimensions of the road sections. Table 1 records detailed information about the data collection times, locations, and durations, including the number of samples collected at each site. Ultimately, the dataset was organized into 167 samples. The video recordings capture pedestrian positions, speeds, traffic volume, directions, and times. Using the time-distance method, the average speed of vehicles is calculated by measuring the time taken for vehicles to travel between two points with a known distance while also recording vehicle direction, position, and other features. After preprocessing operations, the video data were finally organized into a CSV format dataset. During preprocessing, the dataset was constructed with 12 features and one label. The features include variables related to vehicle encounters, pedestrian companionship, traffic volume, and speed. The label represents whether pedestrians exhibit avoidance behavior, coded as 1 for avoidance and 0 for non-avoidance. Definitions, data types, and measurement units for each variable are detailed in Table 2. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Site** & **Width** & **Length** & **Observation Time** & **Duration** & **School** & **Sidewalk** & **Sidewalk** & **Total/Avoidance** \\ \hline A & 7.5 m & 27.5 m & 23 October 2023, 7:30-8:05 & 35 min & Primary & N & - & 30/11 \\ B & 5 m & 31.5 m & 24 October 2023, 17:00-17:30 & 30 min & Primary & N & - & 21/13 \\ C & 5 m & 31.8 m & 16 October 2023, 16:30-17:20 & 50 min & Middle & Y & 3 & 32/17 \\ D & 4.5 m & 30.7 m & 23 October 2023, 17:00–17:10 & 10 min & Middle & Y & 1 & 37/21 \\ E & 4.5 m & 35 m & 14 April 2023, 17:30–17:55 & 25 min & Middle & Y & 1 & 22/19 \\ F & 5 m & 15 m & 14 April 2023, 7:50–8:00 & 10 min & Middle & Y & 1 & 25/15 \\ \hline \end{tabular}
\end{table} 
Table 1: Detailed Information of Video Data. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Symbol** & **Explanation** & **Data Type and Units** \\ \hline S & Whether a vehicle traveling in the same & \\  & direction is encountered (0: no, 1: yes) & \\ SS & Whether the encountered same-direction & \\  & & vehicle is a car (0: no, 1: yes) & \\ STV & Same-direction traffic volume & & Continuous \\ SM & Whether the encountered same-direction & (vehicles per second) \\  & & vehicle is an electric bicycle (0: no, 1: yes) & \\  & & Whether a vehicle traveling in the & \\ O & opposite direction is encountered & & Binary \\  & & (0: no, 1: yes) & \\  & & Whether the encountered & \\ OS & opposite-direction vehicle is a car & & Binary \\  & & (0: no, 1: yes) & \\ OTV & Opposite-direction traffic volume & & Continuous \\  & & & Whether the encountered & \\ OM & opposite-direction vehicle is an electric & & Binary \\  & & bicycle (0: no, 1: yes) & \\ P & Whether pedestrians are walking together & & \\  & & (0: no, 1: yes) & \\  & & Same-direction speed (recorded as the \\ SV & maximum speed among vehicles in & & Continuous (m/s) \\  & & that direction) & \\  & & Opposite-direction speed (recorded as the \\ OV & maximum speed among vehicles in & & Continuous (m/s) \\  & & that direction) & \\ W & & Road width & Continuous (meters) \\ \hline \hline \end{tabular}
\end{table}