## 3 Vehicle Pose Estimation Method
### Mi\(-\)Cnn
ROI pooling discretizes features of candidate regions generated by the Region Proposal Network (RPN) into a fixed size and maps them to a shared task layer MT using 3 \(\times\) 3 kernels. The column vector (1024) scaled from MT is used to calculate the bounding box coordinates \(B_{i}\), point visibility \(V_{i}\), and initialization yaw angle \(I_{i}\) of the frontal vehicle. \(I_{i}\in(0,1)\) represents the applicable range of the width\(-\)ranging model, in which \(I_{i}\) = 0 indicates that the frontal vehicle is completely flush with the host and \(I_{i}\) = 1 indicates it is changing lanes or turning. The point location task first calculates the primary coordinates of the ten edge points \(P_{i}^{1}=(L_{j}^{1},R_{j}^{1})_{j\in\{1,2,3\}}\) through a series of 3 \(\times\) 3 convolutions, a 1024 full\(-\)connection layer, and a regression layer. Then, these coordinates and MT are spliced together to be input for the next prediction. In this paper, the convolutional neural network MI\(-\)CNN contains five loss functions that need to be optimized, namely \(L_{rput}\), \(L_{dec}\), \(L_{points}\), \(L_{lic}\), and \(L_{dec}\), which are loss functions of the RPN network and vehicle detection task. Respectively, the calculation process is the same as [1], and \(L_{point}\) is the loss function of the edge point position task. Figure 5: Structure of vehicle detection and edge point location algorithm. Each frames represents each layer of the network. The green is the points visibility. The blue is the incline scale. The yellow is the 2D box regression. Given that the precision of forthcoming vehicle distance measurements is intricately linked to the horizontal pixel separation between the left and right edge points located within the same layer, this study shifts its emphasis. Instead of singularly refining the position of individual edge points, this paper adopts a fresh approach: prioritizing the minimization of ranging errors directly. Through joint optimization, the adjacent left and right points within the same layer are regarded as an integrated unit. Suppose the true coordinates \(P\) of layer \(i\) are \(P_{i}=\{x_{1},y_{1},x_{2},y_{2}\}\) and the 2D bounding box is \(\{x,y,w,h\}\); then, its normalized coordinates are:  
\[\overline{P_{i}}=\left\{\frac{x_{1}-x}{w},\frac{y_{1}-y}{h},\frac{x_{2}-x}{w}, \frac{y_{2}-y}{h}\right\} \tag{4}\]  
where \(P_{*}^{t}\) represents the normalized coordinates of the edge points. Let \(\phi^{t}\) indicate the mapping function of the convolutional network in iteration \(t\), \(T\) be the shared feature map, and \(P_{*}^{t-1}\) be the normalized coordinates of the edge points from the previous prediction; then, the prediction output of the positioning branch network in iteration \(t\) is:  
\[P_{*}^{t}=\phi^{t}\Big{(}T,P_{*}^{t-1}\Big{)},\;t\geq 2 \tag{5}\]  
The loss function \(L_{points}\) of this layer can be calculated as follows:  
\[L_{points}=\lambda_{points}B(R(\overline{P_{i}}-P_{*}^{t})+\frac{\Delta x}{w} +\frac{\Delta y}{h}) \tag{6}\]  
where \(\lambda\) represents the equilibrium coefficient of the point positioning loss function, \(B\) indicates whether the current region contains the target vehicle, \(R\) represents the robust \(L1\) loss function in [11], and \(\Delta x\) and \(\Delta y\) denote, respectively, the width and longitudinal distance error corresponding to one point pair. \(L_{vis}\) is the visibility judgment loss function. Given the true visibility vector \(\overline{V}\) (corresponding to ten edge points in the target area) and the network prediction vector \(V_{*}\), the loss function can be calculated as follows:  
\[L_{vis}=\lambda_{vis}B(P(\overline{V},V_{*})) \tag{7}\]  
where \(\lambda_{vis}\) represents the equilibrium coefficient of the visibility judgment loss function and \(P\) is the standard softmax loss function. \(L_{lic}\) is the loss function for predicting the frontal vehicle's yaw angle, which will set \(I_{i}\) to 0 when the frontal target is parallel to the host.