# Monovision End-to-End Dual-Lane Overtaking Network without Map Assistance
## 2 Overtaking Guide Net
### Overtake Feasibility Predictor  
The OFP utilized the overtaking phase parameter \(o_{p}\) to determine past and future vehicle behaviors and explored the feasibility of using this parameter as a replacement for RNNs to consider contextual information. This approach allowed us to reduce the model size and improve operational efficiency. Furthermore, our model focused on outputting the probability of being able to continue overtaking in the current state, rather than generating planned waypoints and control signals. Our end-to-end model was trained using a dataset collected from Carla. The overall framework consisted of an image encoding module, a vehicle information encoding module, a phase selector, and a \(GDCP\). Our optimization objectives were as follows:  
\[arg\min_{\theta}E_{(x,p)\sim D}[L(p,f_{\theta}(x))] \tag{5}\]  
where \(D=(x,p)\) is a dataset containing the information \(x\) available to the vehicle and the probability \(p\) that it can safely overtake in the current state, and \(f_{\theta}(x)\in[0,1]\), \(p\in[0,1]\). Under the premise of ensuring that the generation probability is as far below the prior probability as possible, the difference between the generation probability and the ground truth is minimized. Each piece of information is a bound group \(x_{t}=(i_{t},s_{t}),t\in[0,2o_{p}]\) and \(s_{t}=(\theta_{t},v_{t},o_{p_{t}})\). As depicted in Figure 1, this study used yolo [24] as the DAD (driving area detector) to focus on the features of the exercisable area. The image \(i\) that is preprocessed by the DAD undergoes feature extraction through \(Conv_{1}\), resulting in a feature vector \(j^{img}\). The overtaking stage information \(o_{p}\), along with the vehicle's heading s and speed, are input into \(MLP_{1}\), which generates a constraint feature, \(j^{state}\). The final encoded feature \(F\) is formed by the fusion of these vectors, shared among the next stages:  
\[F_{t}=MLP_{2}(Concat[j^{img}_{t},j^{state}_{t}]) \tag{6}\]  
The structure of the neural network is shown in Table 1. The safety of overtaking maneuvers may be substantial when the autonomous vehicle (AV) is still in the original lane and there are preceding vehicles. However, if there is a vehicle not far ahead after entering the opposite lane, the likelihood of a successful overtaking becomes almost zero. To mitigate the influence of similar image features on decision making, this study introduced the Phase Selector (PS) in the feature analysis stage after feature fusion. The selection of network branches is determined by incorporating the current overtaking phase parameter, guided by \(o_{p}\), to generate the probability of safe overtaking in the current phase, denoted as \(p_{t}\):  
\[p_{t}=\mathit{Sigmoid}[PS(o_{p_{t}},F_{t})] \tag{7}\]  
\[\mathit{Ctr}(t+1)=\left\{ \begin{array}{cc}\theta(t+1),&\frac{1}{n}\sum_{i=t- n}^{t}p_{t}\geq P\\ -\theta(t),&\frac{1}{n}\sum_{i=t-n}^{t}p_{t}<P\end{array} \right. \tag{8}\]  
where \(\mathit{Ctr}(t+1)\) represents the control signal to be executed by the vehicle in the next moment, and \(P\) and \(n\) are hyperparameters designed to address issues related to instability in the output probabilities of the probability generation module. When there is noise interference, the decision probability obtained from a certain piece of data may be lower than this threshold. If a vehicle that is overtaking in a safe environment conservatively returns to the main lane based on these data, the network will be too sensitive and it will be difficult for the vehicle to complete an overtaking maneuver. If \(n\) is too small, the error probabilities caused by recent noise in the received data could significantly impact the accuracy of current decisions, resulting in oscillations between overtaking and non-overtaking determinations. Conversely, if \"n\" is too large, the probabilities generated from past time instances could heavily influence current decisions, potentially causing the vehicle to miss the optimal overtaking or evasion timing.