## 3 Methodology
### Pedestrian Feature Modules
#### 3.3.1 Pedestrian Interference State Feature Module
We classify the behavior of the resulting skeletal points based on an ST-GCN and improve the reliability of the pedestrian interaction judgment by combining the resulting pedestrian action type features. As shown in Figure 5, first, parameters such as the 2D coordinates of the pedestrian skeletal points obtained from OpenPose are normalized, and then the temporal and spatial dimensions are transformed by the ST-GCN unit, alternately using a GCN and a temporal convolutional network (TCN). Finally, average pooling, a fully connected layer, and a softmax layer are used to achieve the action classification of the pedestrian actions. In addition, we use the attention mechanism (ATT) module used in the Yan model [25], considering the different levels of importance of different torso positions in judging the actions of  
Figure 4: Schematic diagram of pedestrian head turning angle, shoulder turning angle, and torso forward tilt angle. (**a**) Projection diagrams of points 2 and 5 and points 15 and 16 in the XOZ plane when the pedestrian turns their head and shoulders between turns, respectively, and (**b**) shows the projection diagrams of points 1 and 8 in the YOZ plane when the pedestrian torso tilts forward; “1” indicates the neck point, “8” indicates the midpoint of the left hip and right hip line, “2” indicates the right shoulder point, “5” denotes the left shoulder point, “15” denotes the right eye point, and “16” denotes the left eye point. We set the pedestrian’s forward tilting direction as the Z-axis, the direction of the pedestrian height as the Y-axis, and the direction of the pedestrian parallel to the camera lens as the X-axis. The head and shoulders turning to the left was defined as the positive direction. pedestrians when crossing the street [41]. To facilitate subsequent LSTM calculations, we use one-hot encoding to label the behavior types of pedestrians crossing the street at time period \(t\), where pedestrian \(i\) shows crossing behavior \(act_{t}^{i}\) during time period \(t\)[42]. Of these, eight common behaviors were selected in our study: talking on phone, playing with a cell phone, greeting, walking, running, holding hands, eating/drinking, and smoking. Classification of pedestrian interaction features  
This part finally uses a fusion layer \(\varphi(\cdot)\) by combining the above features \(d_{t}^{i},\theta_{t}^{i},\alpha_{t}^{i},\beta_{t}^{i},act_{t}^{i}\), the pedestrian interaction feature \(\mathbf{X}_{t}\) can be obtained as follows:  
\[ \begin{array}{ll}\mathbf{X}_{t}&=\varphi(d_{t}^{i},\theta_{t}^{i},\alpha_{t} ^{i},\beta_{t}^{i},act_{t}^{i})\\ &=d_{t}^{i}\oplus\theta_{t}^{i}\oplus\alpha_{t}^{i}\oplus\beta_{t}^{i}\oplus act _{t}^{i}\end{array}  \tag{16}\]  
where the tandem state \(h_{t}\) consists of the pedestrian distance and azimuth angle of pedestrian \(i\), pedestrian head observation angle, pedestrian action type classification information, and time point t. The final interference state (0 or 1) is then obtained by taking the pedestrian interaction feature \(\mathbf{X}_{t}\) as the input and passing through an LSTM layer, fully connected layer, and softmax layer, as follows:  
\[ \begin{array}{ll}\overset{\wedge}{h}_{t}=\text{LSTM}(\overset{\wedge^{i}}{h _{t-1}},\mathbf{X}_{t};\mathbf{W}_{1})\end{array}  \tag{17}\]  
\[ \begin{array}{ll}z_{i}=\mathbf{W}_{2}\mathbf{X}_{t}+\mathbf{b}_{0}\\ \text{inter}_{t}^{i}&=\text{softmax}(z_{i})\\ &=\text{exp}(z_{i})\bigg{/}\sum\limits_{k=1}^{K}\text{exp}(z_{k})\end{array}  \tag{19}\]  
where \(\mathbf{W}_{1}\) and \(\mathbf{W}_{2}\) denote different weight matrices, and \(\mathbf{b}_{0}\) denotes the bias vector. In addition, when there is only one pedestrian in the image at time t, although the pedestrian is in a non-interference state with other pedestrians, if the pedestrian exhibits a behavior such as playing with a cell phone with their head down, they may still have a dangerous intention to cross the street due to the distraction.