update
133
main.tex
@ -119,7 +119,7 @@ In recent years, fueled by advancements in deep learning and the availability of
|
||||
\caption{}
|
||||
\end{subfigure}
|
||||
|
||||
\caption{Comparison of different anchor thresholds in sparse and dense scenarios. (a) Ground truth in a dense scenario. (b) Predictions with large NMS thresholds in a dense scenario. (c) Ground truth in a sparse scenario. (d) Predictions with small NMS threshold in a sparse scenario.}
|
||||
\caption{Comparison of different anchor thresholds in sparse and dense scenarios. (a) Ground truth in a dense scenario, where some lane instances are close with each others. (b) Predictions with large NMS thresholds in a dense scenario, where a lane prediction is mistakenly suppressed. (c) Ground truth in a sparse scenario, where the lane instance are far apart. (d) Predictions with small NMS threshold in a sparse scenario, where redundant prediction results fail to be removed.}
|
||||
\label{NMS setting}
|
||||
\end{figure}
|
||||
|
||||
@ -135,8 +135,6 @@ Drawing inspiration from object detection methods such as Yolos \cite{yolov10} a
|
||||
|
||||
Regrading the first issue, \cite{clrnet} introduced learned anchors, where the anchor parameters are optimized during training to adapt to the lane distributions (see Fig. \ref{anchor setting}(b)) in real dataset. Additionally, they employ cascade cross-layer anchor refinement to bring the anchors closer to the ground truth. However, the anchors are still numerous to cover the potential distributions of lanes. Moving further, \cite{adnet} proposes flexible anchors for each image by generating start points, rather than using a fixed set of anchors for all images. Nevertheless, the start points of lanes are subjective and lack clear visual evidence due to the global nature of lanes, which affects its performance. \cite{srlane} uses a local angle map to propose sketch anchors according to the direction of ground truth. This approach only considers the direction and neglects the accurate positioning of anchors, resulting in suboptimal performance without cascade anchor refinement. Overall, numerous anchors are unnecessary in sparse scenarios (where lane ground truths are sparse). The trend in newly proposed methods is to reduce the number of anchors and offer more flexible anchor configurations.
|
||||
|
||||
|
||||
|
||||
Regarding the second issue, nearly all anchor-based methods (including those mentioned above) require direct or indirect NMS post-processing to eliminate redundant predictions. Although it is necessary to eliminate redundant predictions, NMS remains a suboptimal solution. On the one hand, NMS is not deployment-friendly because it involves defining and calculating distances (e.g., Intersection over Union) between lane pairs. This is more challenging than bounding boxes in general object detection due to the complexity of lane geometry. On the other hand, NMS fails in some dense scenarios where the lane ground truths are closer together compared to sparse scenarios. A large distance threshold may result in false negatives, as some true positive predictions might be eliminated (as shown in Fig. \ref{NMS setting}(a)\&(b)) by mistake. Conversely, a small distance threshold may not eliminate redundant predictions effectively and can leave false positives (as shown in Fig. \ref{NMS setting}(c)\&(d)). Achieving an optimal trade-off in all scenarios by manually setting the distance threshold is challenging. The root cause of this problem is that the distance definition in NMS considers only geometric parameters while ignoring the semantic context in the image. Thus, when two predictions are “close” to each other, it is nearly impossible to determine whether one of them is redundant.
|
||||
|
||||
To address the two issues outlined above, we propose Polar R-CNN, a novel anchor-based method for lane detection. For the first issue, we introduce local and global heads based on the polar coordinate system to create anchors with more accurate locations and reduce the number of proposed anchors in sparse scenarios, as illustrated in Fig. \ref{anchor setting}(c). Compared to state-of-the-art previous work \cite{clrnet}\cite{clrernet} which uses 192 anchors, Polar R-CNN employs only 20 anchors to cover potential lane ground truths. For the second issue, we have revised Fast NMS to Graph-based Fast NMS and introduced a new heuristic graph neural network block (Polar GNN block) integrated into the NMS head. The Polar GNN block offers an interpretable structure, achieving nearly equivalent performance in sparse scenarios and superior performance in dense scenarios. We conducted experiments on five major benchmarks: TuSimple \cite{tusimple}, CULane \cite{scnn}, LLAMAS \cite{llamas}, CurveLanes \cite{curvelanes}, and DL-Rail \cite{dalnet}. Our proposed method demonstrates competitive performance compared to state-of-the-art methods.
|
||||
@ -162,11 +160,11 @@ The lane detection aims to detect lane instances in an image. In this section, w
|
||||
\begin{figure*}[ht]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]{thesis_figure/ovarall_architecture.png} % 替换为你的图片文件名
|
||||
\caption{The overall pipeline of Polar R-CNN. The architecture is simple and lightweight. The backbone (e.g. ResNet18) and FPN aims to extract feature of the image. And the Local polar head aims to proposed sparse line anchors. After pooling features sample along the line anchors, the global polar head give the final predictions. Triplet head is set in the Global polar Head, including an one-to-one classification head (O2O cls head), an one-to-many classification head (o2m cls head) and an one-to-many regression head (O2M reg Head). The one-to-one cls head aim to replace the NMS post-processing and select only one positive prediction sample for each ground truth from the redundant predictions from the o2m head.}
|
||||
\caption{The overall pipeline of Polar R-CNN. The architecture is simple and lightweight. The local polar head proposes sparse line anchors, and after pooling features along these anchors, the global polar head produces the final predictions. The global polar head includes a triplet head, which comprises a one-to-one classification head (O2O cls head), a one-to-many classification head (O2M cls head), and a one-to-many regression head (O2M reg head). The O2O classification head replaces NMS post-processing by selecting a single positive prediction sample for each ground truth from the redundant predictions generated by the O2M head.}
|
||||
\label{overall_architecture}
|
||||
\end{figure*}
|
||||
|
||||
\textbf{NMS-Free Object Detections}. Non-maximum suppression (NMS) is an important post-processing step in most general object detection methods. Detr \cite{detr} employs one-to-one label assignment to avoid redundant predictions without using NMS. Other NMS-free methods \cite{learnNMS} have also been proposed, addressing this issue from two aspects: model architecture and label assignment. Studies \cite{date} \cite{yolov10} suggest that one-to-one assignments are crucial for NMS-free predictions, but maintaining one-to-many assignments is still necessary to ensure effective feature learning of the model. Other works \cite{o3d} \cite{relationnet} consider the model’s expressive capacity to provide non-redundant predictions. However, few studies have analyzed the NMS-free paradigm for anchor-based lane detection methods as thoroughly as in general object detection. Most anchor-based lane detection methods still rely on NMS post-processing. In our work, besides label assignment, we extend the analysis to the detection head’s structure, focusing on achieving non-redundant (NMS-free) lane predictions.
|
||||
\textbf{NMS-Free Object Detections.}. Non-maximum suppression (NMS) is an important post-processing step in most general object detection methods. Detr \cite{detr} employs one-to-one label assignment to avoid redundant predictions without using NMS. Other NMS-free methods \cite{learnNMS} have also been proposed, addressing this issue from two aspects: model architecture and label assignment. Studies \cite{date} \cite{yolov10} suggest that one-to-one assignments are crucial for NMS-free predictions, but maintaining one-to-many assignments is still necessary to ensure effective feature learning of the model. Other works \cite{o3d} \cite{relationnet} consider the model’s expressive capacity to provide non-redundant predictions. However, few studies have analyzed the NMS-free paradigm for anchor-based lane detection methods as thoroughly as in general object detection. Most anchor-based lane detection methods still rely on NMS post-processing. In our work, besides label assignment, we extend the analysis to the detection head’s structure, focusing on achieving non-redundant (NMS-free) lane predictions.
|
||||
|
||||
In this work, we aim to address to two issues in anchor-based lane detection mentioned above, the sparse lane anchor setting and NMS-free predictions.
|
||||
|
||||
@ -210,12 +208,11 @@ The overall architecture of Polar R-CNN is illustrated in Fig. \ref{overall_arch
|
||||
|
||||
|
||||
|
||||
\subsection{Lane and Line Anchor Representation}
|
||||
\subsection{Lane and Lane Anchor Representation}
|
||||
|
||||
Lanes are characterized by their thin and elongated curved shapes. A suitable lane prior aids the model in extracting features, predicting locations, and modeling the shapes of lane curves with greater accuracy. Consistent with previous studies \cite{linecnn}\cite{laneatt}, our lane priors (also referred to as lane anchors) consists of straight lines. We sample a sequence of 2D points along each lane anchor, denoted as $ P\doteq \left\{ \left( x_1, y_1 \right) , \left( x_2, y_2 \right) , ....,\left( x_n, y_n \right) \right\} $, where N is the number of sampled points. The y-coordinates of these points are uniformly sampled from the vertical axis of the image, specifically $y_i=\frac{H}{N-1}*i$, where H is the image height. These y-coordinates are also sampled from the ground truth lane, and the model is tasked with regressing the x-coordinate offset from the line anchor to the lane instance ground truth. The primary distinction between Polar R-CNN and previous approaches lies in the description of the lane anchors, which will be detailed in the following sections.
|
||||
Lanes are characterized by their thin and elongated curved shapes. A suitable lane prior aids the model in extracting features, predicting locations, and modeling the shapes of lane curves with greater accuracy. Consistent with previous studies \cite{linecnn}\cite{laneatt}, our lane priors (also referred to as lane anchors) consists of straight lines. We sample a sequence of 2D points along each lane anchor, denoted as $ P\doteq \left\{ \left( x_1, y_1 \right) , \left( x_2, y_2 \right) , ....,\left( x_n, y_n \right) \right\} $, where N is the number of sampled points. The y-coordinates of these points are uniformly sampled from the vertical axis of the image, specifically $y_i=\frac{H}{N-1}*i$, where H is the image height. These y-coordinates are also sampled from the ground truth lane, and the model is tasked with regressing the x-coordinate offset from the lane anchor to the lane instance ground truth. The primary distinction between Polar R-CNN and previous approaches lies in the description of the lane anchors, which will be detailed in the following sections.
|
||||
|
||||
\textbf{Polar Coordinate system.} Since lane anchors are typically represented as straight lines, they can be described using straight line parameters. Previous approaches have used rays to describe 2D lane anchors, with the parameters including the coordinates of the starting point and the orientation/angle, denoted as $\left\{\theta, P_{xy}\right\}$, as shown in Fig. \ref{coord}(a). \cite{linecnn}\cite{laneatt} define the start points as lying on the three image boundaries. However, \cite{adnet} argue that this approach is problematic because the actual starting point of a lane could be located anywhere within the image. In our analysis, using a ray can lead to ambiguity in line representation because a line can have an infinite number of starting points, and the choice of the starting point for a lane is subjective. As illustrated in Fig. \ref{coord}(a), the yellow (the visual start point) and green (the point located on the image boundary) starting points with the same orientation $\theta$ describe the same line, and either could be used in different datasets \cite{scnn}\cite{vil100}. This ambiguity arises because a straight line has two degrees of freedom, whereas a ray has three (two for the start point and one for orientation). To resolve this issue , we propose using polar coordinates to describe a lane anchor with only two parameters: radius and angle, deoted as $\left\{\theta, r\right\}$, where $\theta \in \left[-\frac{\pi}{2}, \frac{\pi}{2}\right)$ and $r \in \left(-\infty, +\infty\right)$. This representation isillustrated in Fig. \ref{coord}(b).
|
||||
|
||||
\begin{figure}[t]
|
||||
\centering
|
||||
\def\subwidth{0.24\textwidth}
|
||||
@ -230,15 +227,12 @@ Lanes are characterized by their thin and elongated curved shapes. A suitable la
|
||||
\includegraphics[width=\imgwidth]{thesis_figure/coord/polar.png}
|
||||
\caption{}
|
||||
\end{subfigure}
|
||||
\caption{Different descriptions for anchor parameters. (a) Ray: start point and orientation. (b) Polar: radius and angle.}
|
||||
\caption{Different descriptions for anchor parameters: (a) Ray: defined by its start point and orientation. (b) Polar: defined by its radius and angle.}
|
||||
\label{coord}
|
||||
\end{figure}
|
||||
|
||||
We define two types of polar coordinate systems: the global coordinate system and the local coordinate system, with the origin points denoted as the global origin $\boldsymbol{c}^{g}$ and the local origin $\boldsymbol{c}^{l}$, respectively. For convenience, the global origin is positioned near the static vanishing point of the entire lane image dataset, while the local origins are set at lattice points within the image. As illustrated in Fig. \ref{coord}(b), only the radius parameters are affected by the choice of the origin point, while the angle/orientation parameters remain consistent.
|
||||
|
||||
\subsection{Local Polar Head}
|
||||
|
||||
\textbf{Anchor formulation in Local polar head}. Inspired by the region proposal network in Faster R-CNN \cite{fasterrcnn}, the local polar head (LPH) aims to propose flexible, high-quality anchors aorund the lane ground truths within an image. As Fig. \ref{lph} and Fig. \ref{overall_architecture} demonstrate, the highest level $P_{3} \in \mathbb{R}^{C_{f} \times H_{f} \times W_{f}}$ of FPN feature maps is selected as the input for the Local Polar Head (LPH). Following a downsampling operation, the feature map is then fed into two branches: the regression branch $\phi _{reg}^{lph}\left(\cdot \right)$ and the classification branch $\phi _{cls}^{lph}\left(\cdot \right)$.
|
||||
\textbf{Anchor formulation in local polar head.}. Inspired by the region proposal network in Faster R-CNN \cite{fasterrcnn}, the local polar head (LPH) aims to propose flexible, high-quality anchors aorund the lane ground truths within an image. As Fig. \ref{lph} and Fig. \ref{overall_architecture} demonstrate, the highest level $P_{3} \in \mathbb{R}^{C_{f} \times H_{f} \times W_{f}}$ of FPN feature maps is selected as the input for LPH. Following a downsampling operation, the feature map is then fed into two branches: the regression branch $\phi _{reg}^{lph}\left(\cdot \right)$ and the classification branch $\phi _{cls}^{lph}\left(\cdot \right)$.
|
||||
\begin{equation}
|
||||
\begin{aligned}
|
||||
&F_d\gets DS\left( P_{3} \right), \,F_d\in \mathbb{R} ^{C_f\times H^{l}\times W^{l}},\\
|
||||
@ -252,12 +246,12 @@ We define two types of polar coordinate systems: the global coordinate system an
|
||||
|
||||
\begin{figure}[t]
|
||||
\centering
|
||||
\includegraphics[width=0.45\textwidth]{thesis_figure/local_polar_head.png} % 替换为你的图片文件名
|
||||
\caption{The main architecture of our model.}
|
||||
\includegraphics[width=0.45\textwidth]{thesis_figure/local_polar_head.png}
|
||||
\caption{The main architecture of LPH.}
|
||||
\label{lph}
|
||||
\end{figure}
|
||||
|
||||
\textbf{Loss Function.} During the training phase, as illustrated in Fig. \ref{lphlabel}, the ground truth labels for the Local Polar Head (LPH) are constructed as follows. The radius ground truth is defined as the shortest distance from a grid point (local origin point) to the ground truth lane curve. The angle ground truth is defined as the orientation of the vector from the grid point to the nearest point on the curve. A grid point is designated as a positive sample if its radius label is less than a threshold $\tau_{L}$ ; otherwise, it is considered a negative sample.
|
||||
\textbf{Loss Function.} During the training phase, as illustrated in Fig. \ref{lphlabel}, the ground truth labels for LPH are constructed as follows. The radius ground truth is defined as the shortest distance from a grid point (local origin point) to the ground truth lane curve. The angle ground truth is defined as the orientation of the vector from the grid point to the nearest point on the curve. A grid point is designated as a positive sample if its radius label is less than a threshold $\tau_{L}$ ; otherwise, it is considered a negative sample.
|
||||
|
||||
Once the regression and classification labels are established, the LPH can be trained using the smooth-L1 loss $d\left(\cdot \right)$ for regression and the binary cross-entropy loss $BCE\left( \cdot , \cdot \right)$ for classification. The LPH loss function is defined as follows:
|
||||
\begin{equation}
|
||||
@ -268,12 +262,12 @@ Once the regression and classification labels are established, the LPH can be tr
|
||||
\label{loss_lph}
|
||||
\end{equation}
|
||||
|
||||
\textbf{Top-$K_{a}$ Anchor Selectoin}. During the training stage, all $H^{l}\times W^{l}$ anchors are considered as candidate anchors and fed into the R-CNN module. This approach helps the R-CNN module to learn from sufficient features of negative (background) anchor samples. In the evaluation stage, however, only the top-$K_{a}$ anchors with the highest confidence scores are selected and fed into the R-CNN module. This strategy is designed to filter out potential negative (background) anchors and reduce the computational complexity of the R-CNN module. By doing so, it maintains the adaptability and flexibility of anchor distribution while decreasing the total number of anchors. The following experiments will demonstrate the effectiveness of our top-$K_{a}$ anchor selection strategy.
|
||||
\textbf{Top-$K_{a}$ Anchor Selectoin.}. During the training stage, all $H^{l}\times W^{l}$ anchors are considered as candidate anchors and fed into the R-CNN module. This approach helps the R-CNN module to learn from sufficient features of negative (background) anchor samples. In the evaluation stage, however, only the top-$K_{a}$ anchors with the highest confidence scores are selected and fed into the R-CNN module. This strategy is designed to filter out potential negative (background) anchors and reduce the computational complexity of the R-CNN module. By doing so, it maintains the adaptability and flexibility of anchor distribution while decreasing the total number of anchors. The following experiments will demonstrate the effectiveness of our top-$K_{a}$ anchor selection strategy.
|
||||
|
||||
\begin{figure}[t]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]{thesis_figure/coord/localpolar.png}
|
||||
\caption{Label construction for local polar proposal module.}
|
||||
\caption{Label construction for LPH.}
|
||||
\label{lphlabel}
|
||||
\end{figure}
|
||||
|
||||
@ -298,7 +292,7 @@ Next, feature points are sampled on the lane anchor. The y-coordinates of these
|
||||
\begin{figure}[t]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]{thesis_figure/detection_head.png} % 替换为你的图片文件名
|
||||
\caption{The main architecture of global polar head}
|
||||
\caption{The main architecture of GPH.}
|
||||
\label{gph}
|
||||
\end{figure}
|
||||
|
||||
@ -317,6 +311,23 @@ where $\boldsymbol{w}_{L}^{s}\in \mathbb{R} ^{N_p}$ represents the learnable agg
|
||||
|
||||
\textbf{Triplet Head.} The triplet head comprises three distinct heads: the one-to-one classification (O2O cls) head, the one-to-many classification (O2M cls) head, and the one-to-many regression (O2M reg) head. In various studies \cite{laneatt}\cite{clrnet}\cite{adnet}\cite{srlane}, the detection head predominantly follows the one-to-many paradigm. During the training phase, multiple positive samples are assigned to a single ground truth. Consequently, during the evaluation stage, redundant detection results are often predicted for each instance. These redundancies are typically addressed using NMS, which eliminates duplicate results and retains the highest confidence detection for each groung truth. However, NMS relies on the definition of distance between detection results, and this calculation can be complex for curved lanes and other irregular geometric shapes. To achieve non-redundant detection results with a NMS-free paradigm, the one-to-one paradigm becomes crucial during training, as highlighted in \cite{o2o}. Nevertheless, merely adopting the one-to-one paradigm is insufficient; the structure of the detection head also plays a pivotal role in achieving NMS-free detection. This aspect will be further analyzed in the following sections.
|
||||
|
||||
\textbf{NMS vs NMS-free.} Let $\boldsymbol{F}^{roi}_{i}$ denotes the ROI features extracted from $i_{th}$ anchors and the three subheads using $\boldsymbol{F}^{roi}_{i}$ as input. For now, let us focus on the O2M classification (O2M cls) head and the O2M regression (O2M reg) head, which follow the old paradigm used in previous work and can serve as a baseline for the new one-to-one paradigm. To maintain simplicity and rigor, both the O2M cls head and the O2M reg head consist of two layers with activation functions, featuring a plain structure without any complex mechanisms such as attention or deformable convolution. as previously mentioned, merely replacing the one-to-many label assignment with one-to-one label assignment is insufficient for eliminating NMS post-processing. This is because anchors often exhibit significant overlap or are positioned very close to each other, as shown in Fig. \ref{anchor setting}(b)\&(c). Let the $\boldsymbol{F}^{roi}_{i}$ and $\boldsymbol{F}^{roi}_{j}$ represent the features from two overlapping (or very close) anchors, implying that $\boldsymbol{F}^{roi}_{i}$ and $\boldsymbol{F}^{roi}_{j}$ will be almost identical. Let $f_{plain}^{cls}$ denotes the neural structure used in O2M cls head and suppose it's trained with one-to-one label assignment. If $\boldsymbol{F}^{roi}_{i}$ is a positive sample and the $\boldsymbol{F}^{roi}_{j}$ is a negative sample, the ideal output should be as follows:
|
||||
\begin{equation}
|
||||
\begin{aligned}
|
||||
&\boldsymbol{F}_{i}^{roi}\approx \boldsymbol{F}_{j}^{roi},
|
||||
\\
|
||||
&f_{cls}^{plain}\left( \boldsymbol{F}_{i}^{roi} \right) \rightarrow 1,
|
||||
\\
|
||||
&f_{cls}^{plain}\left( \boldsymbol{F}_{i}^{roi} \right) \rightarrow 0.
|
||||
\end{aligned}
|
||||
\label{sharp fun}
|
||||
\end{equation}
|
||||
|
||||
The Eq. (\ref{sharp fun}) suggests that the property of $f_{cls}^{plain}$ need to be ``sharp'' enough to differentiate between two similar features. That is to say, the output of $f_{cls}^{plain}$ changes rapidly over short periods or distances, it implies that $f_{cls}^{plain}$ need to captures information with higher frequency. This issue is also discussed in \cite{o3d}. Capturing the high frequency with a plain structure is difficult because a naive MLP tends to capture information with lower frequency \cite{xu2022overview}. In the most extreme case, where $\boldsymbol{F}_{i}^{roi} = \boldsymbol{F}_{j}^{roi}$, it becomes impossible to distinguish the two anchors to positive and negative samples completely; in practice, both confidences converge to around 0.5. This problem arises from the limitations of the input format and the structure of the naive MLP, which restrict its expressive capability for information with higher frequency. Therefore, it is crucial to establish relationships between anchors and design a new model structure to effectively represent ``sharp'' information.
|
||||
|
||||
It is easy to see that the ``ideal'' one-to-one branch is equivalence to O2M cls branch with O2M regression and NMS post-processing. If the NMS could be replaced by some equivalent but learnable functions (e.g. a neural network with specific structure), the O2O head could be trained to handle the one-to-one assignment. However, the NMS involves sequential iteration and confidence sorting, which are challenging to reproduce with a neural network. Although previous works, such as RNN-based approaches \cite{stewart2016end}, utilize an iterative format, they are time-consuming and introduce additional complexity into the model training process due to their iterative nature. To eliminate the iteration process, we proposed a equivalent format of Fast NMS\cite{yolact}.
|
||||
|
||||
|
||||
\begin{algorithm}[t]
|
||||
\caption{The Algorithm of the Graph-based Fast NMS}
|
||||
\begin{algorithmic}[1] %这个1 表示每一行都显示数字
|
||||
@ -375,26 +386,10 @@ where $\boldsymbol{w}_{L}^{s}\in \mathbb{R} ^{N_p}$ represents the learnable agg
|
||||
\begin{figure}[t]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]{thesis_figure/gnn.png} % 替换为你的图片文件名
|
||||
\caption{The main architecture of gnn.}
|
||||
\caption{The main architecture of O2O classification head.}
|
||||
\label{gnn}
|
||||
\end{figure}
|
||||
|
||||
\textbf{NMS vs NMS-free.} Let $\boldsymbol{F}^{roi}_{i}$ denotes the ROI features extracted from $i_{th}$ anchors and the three subheads using $\boldsymbol{F}^{roi}_{i}$ as input. For now, let us focus on the O2M classification (O2M cls) head and the O2M regression (O2M reg) head, which follow the old paradigm used in previous work and can serve as a baseline for the new one-to-one paradigm. To maintain simplicity and rigor, both the O2M cls head and the O2M reg head consist of two layers with activation functions, featuring a plain structure without any complex mechanisms such as attention or deformable convolution. as previously mentioned, merely replacing the one-to-many label assignment with one-to-one label assignment is insufficient for eliminating NMS post-processing. This is because anchors often exhibit significant overlap or are positioned very close to each other, as shown in Fig. \ref{anchor setting}(b)\&(c). Let the $\boldsymbol{F}^{roi}_{i}$ and $\boldsymbol{F}^{roi}_{j}$ represent the features from two overlapping (or very close) anchors, implying that $\boldsymbol{F}^{roi}_{i}$ and $\boldsymbol{F}^{roi}_{j}$ will be almost identical. Let $f_{plain}^{cls}$ denotes the neural structure used in O2M cls head and suppose it's trained with one-to-one label assignment. If $\boldsymbol{F}^{roi}_{i}$ is a positive sample and the $\boldsymbol{F}^{roi}_{j}$ is a negative sample, the ideal output should be as follows:
|
||||
\begin{equation}
|
||||
\begin{aligned}
|
||||
&\boldsymbol{F}_{i}^{roi}\approx \boldsymbol{F}_{j}^{roi},
|
||||
\\
|
||||
&f_{cls}^{plain}\left( \boldsymbol{F}_{i}^{roi} \right) \rightarrow 1,
|
||||
\\
|
||||
&f_{cls}^{plain}\left( \boldsymbol{F}_{i}^{roi} \right) \rightarrow 0.
|
||||
\end{aligned}
|
||||
\label{sharp fun}
|
||||
\end{equation}
|
||||
|
||||
The Eq. (\ref{sharp fun}) suggests that the property of $f_{cls}^{plain}$ need to be ``sharp'' enough to differentiate between two similar features. That is to say, the output of $f_{cls}^{plain}$ changes rapidly over short periods or distances, it implies that $f_{cls}^{plain}$ need to captures information with higher frequency. This issue is also discussed in \cite{o3d}. Capturing the high frequency with a plain structure is difficult because a naive MLP tends to capture information with lower frequency \cite{xu2022overview}. In the most extreme case, where $\boldsymbol{F}_{i}^{roi} = \boldsymbol{F}_{j}^{roi}$, it becomes impossible to distinguish the two anchors to positive and negative samples completely; in practice, both confidences converge to around 0.5. This problem arises from the limitations of the input format and the structure of the naive MLP, which restrict its expressive capability for information with higher frequency. Therefore, it is crucial to establish relationships between anchors and design a new model structure to effectively represent ``sharp'' information.
|
||||
|
||||
It is easy to see that the ``ideal'' one-to-one branch is equivalence to O2M cls branch with O2M regression and NMS post-processing. If the NMS could be replaced by some equivalent but learnable functions (e.g. a neural network with specific structure), the O2O head could be trained to handle the one-to-one assignment. However, the NMS involves sequential iteration and confidence sorting, which are challenging to reproduce with a neural network. Although previous works, such as RNN-based approaches \cite{stewart2016end}, utilize an iterative format, they are time-consuming and introduce additional complexity into the model training process due to their iterative nature. To eliminate the iteration process, we proposed a equivalent format of Fast NMS\cite{yolact}.
|
||||
|
||||
The key rule of the NMS post-processing is as follows:
|
||||
Given a series of positive detections with redundancy, a detection result A is suppressed by another detection result B if and only if:
|
||||
|
||||
@ -443,15 +438,15 @@ The Eq. (\ref{node_layer}) serves as the implicit replacement for Eq. (\ref{al_1
|
||||
It should be noted that the O2O cls head depends on the predictons of O2M cls head as outlined in Eq. (\ref{al_1-1}). From a probablity percpective, the confidence output by O2M cls head, $s_{j}$, represents the probability that the $j_{th}$ detection is a positive sample. The confidence output by O2O cls head, $\tilde{s}_i$, denotes the conditional probablity that $i_{th}$ sample shouldn't be suppressed given the condition that the $i_{th}$ sample identified as a positive sample:
|
||||
\begin{equation}
|
||||
\begin{aligned}
|
||||
&s_j|_{j=1}^{N_A}\equiv P\left( a_j\,\,is\,\,pos \right), \,\,
|
||||
&s_j|_{j=1}^{N_a}\equiv P\left( a_j\,\,is\,\,pos \right), \,\,
|
||||
\\
|
||||
&\tilde{s}_i|_{i=1}^{N_{pos}}\equiv P\left( a_i\,\,is\,\,saved|a_i\,is\,\,pos \right).
|
||||
&\tilde{s}_i|_{i=1}^{N_{pos}}\equiv P\left( a_i\,\,is\,\,retained|a_i\,is\,\,pos \right).
|
||||
\end{aligned}
|
||||
\label{probablity}
|
||||
\end{equation}
|
||||
|
||||
|
||||
\textbf{Label assignment and Cost function} We use the label assignment (SimOTA) similar to previous works \cite{clrnet}\cite{clrernet}. However, to make the function more compact and consistent with general object detection works \cite{iouloss}\cite{giouloss}, we have redefined the lane IoU. As illustrated in Fig. \ref{glaneiou}, the newly-defined lane IoU, which we refer to as GLaneIoU, is redefined as follows:
|
||||
\textbf{Label assignment and Cost function.} We use the label assignment (SimOTA) similar to previous works \cite{clrnet}\cite{clrernet}. However, to make the function more compact and consistent with general object detection works \cite{iouloss}\cite{giouloss}, we have redefined the lane IoU. As illustrated in Fig. \ref{glaneiou}, the newly-defined lane IoU, which we refer to as GLaneIoU, is redefined as follows:
|
||||
\begin{figure}[t]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]{thesis_figure/GLaneIoU.png} % 替换为你的图片文件名
|
||||
@ -486,7 +481,7 @@ We then define the cost function between $i_{th}$ prediction and $j_{th}$ ground
|
||||
\end{equation}
|
||||
This cost function is more compact than those in previous works\cite{clrnet}\cite{adnet} and takes both location and confidence into account. For label assignment, SimOTA (with k=4) \cite{yolox} is used for the two O2M heads with one-to-many assignment, while the Hungarian \cite{detr} algorithm is employed for the O2O classification head for one-to-one assignment.
|
||||
|
||||
\textbf{Loss function} We use focal loss \cite{focal} for O2O cls head and O2M cls head:
|
||||
\textbf{Loss function.} We use focal loss \cite{focal} for O2O cls head and O2M cls head:
|
||||
\begin{equation}
|
||||
\begin{aligned}
|
||||
\mathcal{L} _{o2m}^{cls}&=\sum_{i\in \varOmega _{pos}^{o2m}}{\alpha _{o2m}\left( 1-s_i \right) ^{\gamma}\log \left( s_i \right)}\\&+\sum_{i\in \varOmega _{neg}^{o2m}}{\left( 1-\alpha _{o2m} \right) \left( s_i \right) ^{\gamma}\log \left( 1-s_i \right)},
|
||||
@ -509,7 +504,7 @@ only one sample with confidence larger than $C_{o2m}$ is chosed as the canditate
|
||||
\end{aligned}
|
||||
\end{equation}
|
||||
|
||||
We directly use the GLaneIoU loss, $\mathcal{L}_{GLaneIoU}$, to regression the offset of xs (with g=1) and Smooth-L1 loss for the regression of end points (namely the y axis of the start point and the end point), denoted as $\mathcal{L} _{end}$. In order to make model learn the global features, we proposed the auxloss illustrated in Fig. \ref{auxloss}:
|
||||
We directly use the GLaneIoU loss, $\mathcal{L}_{GLaneIoU}$, to regression the offset of xs (with g=1) and Smooth-L1 loss for the regression of end points (namely the y axis of the start point and the end point), denoted as $\mathcal{L} _{end}$. In order to make model learn the global features, we proposed the auxiliary loss illustrated in Fig. \ref{auxloss}:
|
||||
\begin{align}
|
||||
\mathcal{L}_{aux} &= \frac{1}{\left| \varOmega_{pos}^{o2m} \right| N_{seg}} \sum_{i \in \varOmega_{pos}^{o2o}} \sum_{m=j}^k \Bigg[ l \left( \theta_i - \hat{\theta}_{i}^{seg,m} \right) \\
|
||||
&\quad + l \left( r_{i}^{global} - \hat{r}_{i}^{seg,m} \right) \Bigg]
|
||||
@ -526,11 +521,11 @@ The overall loss function of Polar R-CNN is given as follows:
|
||||
\mathcal{L}_{overall} &=\mathcal{L} _{lph}^{cls}+w_{lph}^{reg}\mathcal{L} _{lph}^{reg}\\&+w_{o2m}^{cls}\mathcal{L} _{o2m}^{cls}+w_{o2o}^{cls}\mathcal{L} _{o2o}^{cls}+w_{rank}\mathcal{L} _{rank}\\&+w_{IoU}\mathcal{L} _{IoU}+w_{end}\mathcal{L} _{end}+w_{aux}\mathcal{L} _{aux}.
|
||||
\end{aligned}
|
||||
\end{equation}
|
||||
The first line in the loss function represents the loss for the local polar head, which includes both classification and regression components. The second line pertains to the losses associated with the two classification heads (O2M and O2O), while the third line represents the loss for the regression head within the triplet head. Each term in the equation is weighted by a factor to balance the contributions of each component to the gradient. The entire training process is end-to-end.
|
||||
The first line in the loss function represents the loss for LPH, which includes both classification and regression components. The second line pertains to the losses associated with the two classification heads (O2M and O2O), while the third line represents the loss for the regression head within the triplet head. Each term in the equation is weighted by a factor to balance the contributions of each component to the gradient. The entire training process is end-to-end.
|
||||
|
||||
\begin{table*}[htbp]
|
||||
\centering
|
||||
\caption{Dataset \& preprocess}
|
||||
\caption{Infos and hyperparameters for five datasets. For CULane, $*$ denotes the actual number of training samples used to train our model. Please note that labels for some validation/test sets are missing; therefore, we have selected different splits (test or validation set) for different datasets.}
|
||||
\begin{adjustbox}{width=\linewidth}
|
||||
\begin{tabular}{l|l|ccccc}
|
||||
\toprule
|
||||
@ -574,7 +569,7 @@ The first line in the loss function represents the loss for the local polar head
|
||||
\begin{figure}[t]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]{thesis_figure/auxloss.png} %
|
||||
\caption{Auxloss for segment parameter regression.}
|
||||
\caption{Auxiliary loss for segment parameter regression.}
|
||||
\label{auxloss}
|
||||
\end{figure}
|
||||
|
||||
@ -605,15 +600,15 @@ For Tusimple, the evaluation is formulated as follows:
|
||||
Accuracy=\frac{\sum{C_{clip}}}{\sum{S_{clip}}}.
|
||||
\end{aligned}
|
||||
\end{equation}
|
||||
where $C_{clip}$ and $S_{clip}$ represent the number of correct points (predicted points within 20 pixels of the ground truth) and the ground truth points, respectively. If the accuracy exceeds 85\%, the prediction is considered correct. TuSimples also report the False Positive Rate (FP=1-Precision) and False Negative Rate (FN=1-Recall) formular.
|
||||
where $C_{clip}$ and $S_{clip}$ represent the number of correct points (predicted points within 20 pixels of the ground truth) and the ground truth points, respectively. If the accuracy exceeds 85\%, the prediction is considered correct. TuSimples also report the False Positive Rate (FPR=1-Precision) and False Negative Rate (FNR=1-Recall) formular.
|
||||
|
||||
\subsection{Implement Detail}
|
||||
All input images are cropped and resized to $800\times320$. Similar to \cite{clrnet}, we apply random affine transformations and random horizontal flips. For the optimization process, we use the AdamW \cite{adam} optimizer with a learning rate warm-up and a cosine decay strategy. The initial learning rate is set to 0.006. The number of sampled points and regression points for each lane anchor are set to 36 and 72, respectively. We set different base semi-widths, denoted as $w_{b}^{assign}$, $w_{b}^{cost}$ and $w_{b}^{loss}$ for label assignment, cost function and loss function, respectively, as demonstrated in previous work\cite{clrernet}. Other parameters, such as batch size and loss weights for each dataset, are detailed in Table \ref{dataset_info}. Since some test/validation sets for the five datasets are not accessible, the test/validation sets used are also listed in Table \ref{dataset_info}. All the expoeriments are conducted on a single NVIDIA A100-40G GPU. To make our model simple, we only use CNN based backbone, namely ResNet\cite{resnet} and DLA34\cite{dla}.
|
||||
All input images are cropped and resized to $800\times320$. Similar to \cite{clrnet}, we apply random affine transformations and random horizontal flips. For the optimization process, we use the AdamW \cite{adam} optimizer with a learning rate warm-up and a cosine decay strategy. The initial learning rate is set to 0.006. The number of sampled points and regression points for each lane anchor are set to 36 and 72, respectively. The power coefficients of cost function, $\beta_{c}$ and $\beta_{r}$, are set to 1 and 6 respectively. We set different base semi-widths, denoted as $w_{b}^{assign}$, $w_{b}^{cost}$ and $w_{b}^{loss}$ for label assignment, cost function and loss function, respectively, as demonstrated in previous work\cite{clrernet}. Other parameters, such as batch size and loss weights for each dataset, are detailed in Table \ref{dataset_info}. Since some test/validation sets for the five datasets are not accessible, the test/validation sets used are also listed in Table \ref{dataset_info}. All the expoeriments are conducted on a single NVIDIA A100-40G GPU. To make our model simple, we only use CNN-based backbone, namely ResNet\cite{resnet} and DLA34\cite{dla}.
|
||||
|
||||
|
||||
\begin{table*}[htbp]
|
||||
\centering
|
||||
\caption{CULane Result compared with other methods}
|
||||
\caption{Comparision results on CULane test set with other methods.}
|
||||
\normalsize
|
||||
\begin{adjustbox}{width=\linewidth}
|
||||
\begin{tabular}{lrlllllllllll}
|
||||
@ -674,7 +669,7 @@ All input images are cropped and resized to $800\times320$. Similar to \cite{clr
|
||||
|
||||
\begin{table}[h]
|
||||
\centering
|
||||
\caption{TuSimple Result compared with other methods}
|
||||
\caption{Comparision results on TuSimple test set with other methods.}
|
||||
\begin{adjustbox}{width=\linewidth}
|
||||
\begin{tabular}{lrcccc}
|
||||
\toprule
|
||||
@ -699,7 +694,7 @@ All input images are cropped and resized to $800\times320$. Similar to \cite{clr
|
||||
|
||||
\begin{table}[h]
|
||||
\centering
|
||||
\caption{LLAMAS test results compared with other methods}
|
||||
\caption{Comparision results on LLAMAS test set with other methods.}
|
||||
\begin{adjustbox}{width=\linewidth}
|
||||
\begin{tabular}{lrcccc}
|
||||
\toprule
|
||||
@ -726,7 +721,7 @@ All input images are cropped and resized to $800\times320$. Similar to \cite{clr
|
||||
|
||||
\begin{table}[h]
|
||||
\centering
|
||||
\caption{DL-Rail test results compared with other methods}
|
||||
\caption{Comparision results on DL-Rail test set with other methods.}
|
||||
\begin{adjustbox}{width=\linewidth}
|
||||
\begin{tabular}{lrccc}
|
||||
\toprule
|
||||
@ -750,7 +745,7 @@ All input images are cropped and resized to $800\times320$. Similar to \cite{clr
|
||||
|
||||
\begin{table}[h]
|
||||
\centering
|
||||
\caption{CurveLanes validation results compared with other methods}
|
||||
\caption{Comparision results on CurveLanes validation set with other methods.}
|
||||
\begin{adjustbox}{width=\linewidth}
|
||||
\begin{tabular}{lrcccc}
|
||||
\toprule
|
||||
@ -775,17 +770,17 @@ All input images are cropped and resized to $800\times320$. Similar to \cite{clr
|
||||
\label{curvelanes result}
|
||||
\end{table}
|
||||
|
||||
\subsection{Comparison with the state-of-the-art results}
|
||||
\subsection{Comparison with the state-of-the-art method}
|
||||
The comparison results of our proposed model with other methods are shown in Tables \ref{culane result}, \ref{tusimple result}, \ref{llamas result}, \ref{dlrail result}, and \ref{curvelanes result}. We present results for two versions of our model: the NMS-based version, denoted as Polar R-CNN-NMS, and the NMS-free version, denoted as Polar R-CNN. The NMS-based version utilizes predictions obtained from the O2M head followed by NMS post-processing, while the NMS-free version derives predictions directly from the O2O classification head without NMS.
|
||||
|
||||
To ensure a fair comparison, we also include results for CLRerNet \cite{clrernet} on the CULane and CurveLanes datasets, as we use a similar training strategy and data split. As illustrated in the comparison results, our model demonstrates competitive performance across five datasets. Specifically, on the CULane, TuSimple, LLAMAS, and DL-Rail datasets (sparse scenarios), our model outperforms other anchor-based methods. Additionally, the performance of the NMS-free version is nearly identical to that of the NMS-based version, highlighting the effectiveness of the O2O head in eliminating redundant predictions. On the CurveLanes dataset, the NMS-free version achieves superior F1-measure and Recall compared to both NMS-based and segment\&grid-based methods.
|
||||
|
||||
We also compare the number of anchors and processing speed with other methods. Fig. \ref{anchor_num_method} illustrates the number of anchors used by several anchor-based methods on CULane. Our proposed model utilizes the fewest anchors (20) while achieving the highest F1-score on CULane. It remains competitive with state-of-the-art methods like CLRerNet, which uses 192 anchors and a cross-layer refinement strategy. Conversely, the sparse Laneformer, which also uses 20 anchors, does not achieve optimal performance. It is important to note that our model is designed with a simpler structure without additional refinement, indicating that the design of flexible anchors is crucial for performance in sparse scenarios. Furthermore, due to its simple structure and fewer anchors, our model exhibits lower latency compared to most methods, as shown in Fig. \ref{speed_method}. The combination of fast processing speed and a straightforward architecture makes our model highly deployable.
|
||||
We also compare the number of anchors and processing speed with other methods. Fig. \ref{anchor_num_method} illustrates the number of anchors used by several anchor-based methods on CULane. Our proposed model utilizes the fewest proposal anchors (20 anchors) while achieving the highest F1-score on CULane. It remains competitive with state-of-the-art methods like CLRerNet, which uses 192 anchors and a cross-layer refinement strategy. Conversely, the sparse Laneformer, which also uses 20 anchors, does not achieve optimal performance. It is important to note that our model is designed with a simpler structure without additional refinement, indicating that the design of flexible anchors is crucial for performance in sparse scenarios. Furthermore, due to its simple structure and fewer anchors, our model exhibits lower latency compared to most methods, as shown in Fig. \ref{speed_method}. The combination of fast processing speed and a straightforward architecture makes our model highly deployable.
|
||||
|
||||
\begin{figure}[t]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]{thesis_figure/anchor_num_method.png}
|
||||
\caption{Anchor Number and f1-score of different methods on CULane.}
|
||||
\caption{Anchor numbers vs F1@50 of different methods on CULane lane detection benchmark.}
|
||||
\label{anchor_num_method}
|
||||
\end{figure}
|
||||
|
||||
@ -793,7 +788,7 @@ We also compare the number of anchors and processing speed with other methods. F
|
||||
\begin{figure}[t]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]{thesis_figure/speed_method.png}
|
||||
\caption{Anchor Number and f1-score of different methods on CULane.}
|
||||
\caption{Latency vs F1@50 of different methods on CULane lane detection benchmark.}
|
||||
\label{speed_method}
|
||||
\end{figure}
|
||||
|
||||
@ -802,11 +797,11 @@ To validate and analyze the effectiveness and influence of different component o
|
||||
|
||||
\textbf{Ablation study on polar coordinate system and anchor number.} To assess the importance of local polar coordinates of anchors, we examine the contribution of each component (i.e., angle and radius) to model performance. As shown in Table \ref{aba_lph}, both angle and radius contribute to performance to varying degrees. Additionally, we conduct experiments with auxiliary loss using fixed anchors and Polar R-CNN. Fixed anchors refer to using anchor settings trained by CLRNet, as illustrated in Fig. \ref{anchor setting}(b). Model performance improves by 0.48% and 0.3% under the fixed anchor paradigm and proposal anchor paradigm, respectively.
|
||||
|
||||
We also explore the effect of different local polar map sizes on our model, as illustrated in Fig. \ref{anchor_num_testing}. The overall F1 measure improves with increasing local polar map size and tends to stabilize when the size is sufficiently large. Specifically, precision improves, while recall decreases. A larger polar map size includes more background anchors in the second stage (since we choose k=4 for SimOTA, with no more than four positive samples). Consequently, the model learns more negative samples, enhancing precision but reducing recall. Regarding the number of anchors chosen during the evaluation stage, recall and F1 measure show a significant increase in the early stages of anchor number expansion but stabilize in later stages. This suggests that eliminating some anchors does not significantly affect performance. Fig. \ref{cam} displays the heat map and top-$K_{a}$ selected anchors’ distribution in sparse scenarios. Brighter colors indicate a higher likelihood of anchors being foreground anchors. It is evident that most of the proposed anchors are clustered around the lane ground truth.
|
||||
We also explore the effect of different local polar map sizes on our model, as illustrated in Fig. \ref{anchor_num_testing}. The overall F1 measure improves with increasing the local polar map size and tends to stabilize when the size is sufficiently large. Specifically, precision improves, while recall decreases. A larger polar map size includes more background anchors in the second stage (since we choose k=4 for SimOTA, with no more than four positive samples for each ground truth). Consequently, the model learns more negative samples, enhancing precision but reducing recall. Regarding the number of anchors chosen during the evaluation stage, recall and F1 measure show a significant increase in the early stages of anchor number expansion but stabilize in later stages. This suggests that eliminating some anchors does not significantly affect performance. Fig. \ref{cam} displays the heat map and top-$K_{a}$ selected anchors’ distribution in sparse scenarios. Brighter colors indicate a higher likelihood of anchors being foreground anchors. It is evident that most of the proposed anchors are clustered around the lane ground truth.
|
||||
|
||||
\begin{table}[h]
|
||||
\centering
|
||||
\caption{Comparsion between different anchor strategies}
|
||||
\caption{Ablation study of anchor proposal strategies}
|
||||
\begin{adjustbox}{width=\linewidth}
|
||||
\begin{tabular}{c|ccc|cc}
|
||||
\toprule
|
||||
@ -843,7 +838,7 @@ We also explore the effect of different local polar map sizes on our model, as i
|
||||
\begin{subfigure}{\subwidth}
|
||||
\includegraphics[width=\imgwidth]{thesis_figure/anchor_num/anchor_num_testing.png}
|
||||
\end{subfigure}
|
||||
\caption{Anchor Number and f1-score of different methods on CULane.}
|
||||
\caption{F1@50 preformance of different polar map sizes and different top-$K_{a}$ anchor selections on CULane test set.}
|
||||
\label{anchor_num_testing}
|
||||
\end{figure*}
|
||||
|
||||
@ -872,19 +867,19 @@ We also explore the effect of different local polar map sizes on our model, as i
|
||||
\includegraphics[width=\imgwidth, height=\imgheight]{thesis_figure/heatmap/anchor2.jpg}
|
||||
\caption{}
|
||||
\end{subfigure}
|
||||
\caption{The heap map of the local polar map and the anchor selection during the evaluation stage.}
|
||||
\caption{The heap map of the local polar map and the final anchor selection during the evaluation stage.}
|
||||
\label{cam}
|
||||
\end{figure}
|
||||
|
||||
\textbf{Ablation study on NMS-free block in sparse scenarios.} We conduct several experiments on the CULane dataset to evaluate the performance of the NMS-free head in sparse scenarios. As shown in Table \ref{aba_NMSfree_block}, without using the GNN to establish relationships between anchors, Polar R-CNN fails to achieve a NMS-free paradigm, even with one-to-one assignment. Furthermore, the classification matrix (cls matrix) proves crucial, indicating that conditional probability is effective. Other components, such as the neighbor matrix (provided as a geometric prior) and rank loss, also contribute to the performance of the NMS-free block.
|
||||
|
||||
To compare the NMS-free paradigm with the traditional NMS paradigm, we perform experiments with the NMS-free block under both proposal and fixed anchor strategies. Table \ref{NMS vs NMS-free} presents the results of these experiments. Here, O2M-B refers to the O2M classification head, O2O-B refers to the O2O classification head with a plain structure, and O2O-G refers to the O2O classification head with our proposed GNN structure. To assess the ability to eliminate redundant predictions, NMS post-processing is applied to each head. The results show that NMS is necessary for the traditional O2M classification head. In the fixed anchor paradigm, although the O2O classification head with a plain structure effectively eliminates redundant predictions, it is less effective than the proposed GNN structure. In the proposal anchor paradigm, the O2O classification head with a plain structure fails to eliminate redundant predictions due to high anchor overlap and similar RoI features. Thus, GNN is essential for Polar R-CNN in the NMS-free paradigm. Both in the fixed and proposal anchor paradigms, the O2O classification head with the GNN structure successfully eliminates redundant predictions, indicating that our GNN-based O2O classification head can replace NMS post-processing in sparse scenarios without a loss in performance. This confirms our earlier theory that both structure and label assignment are crucial for a NMS-free paradigm.
|
||||
To compare the NMS-free paradigm with the traditional NMS paradigm, we perform experiments with the NMS-free block under both proposal and fixed anchor strategies. Table \ref{NMS vs NMS-free} presents the results of these experiments. Here, O2M-B refers to the O2M classification head, O2O-B refers to the O2O classification head with a plain structure, and O2O-G refers to the O2O classification head with Polar GNN block. To assess the ability to eliminate redundant predictions, NMS post-processing is applied to each head. The results show that NMS is necessary for the traditional O2M classification head. In the fixed anchor paradigm, although the O2O classification head with a plain structure effectively eliminates redundant predictions, it is less effective than the proposed Polar GNN block. In the proposal anchor paradigm, the O2O classification head with a plain structure fails to eliminate redundant predictions due to high anchor overlap and similar RoI features. Thus, the GNN structure is essential for Polar R-CNN in the NMS-free paradigm. Both in the fixed and proposal anchor paradigms, the O2O classification head with the GNN structure successfully eliminates redundant predictions, indicating that our GNN-based O2O classification head can replace NMS post-processing in sparse scenarios without a decrease in performance. This confirms our earlier theory that both structure and label assignment are crucial for a NMS-free paradigm.
|
||||
|
||||
We also explore the stop-gradient strategy for the O2O classification head. As shown in Table \ref{stop}, the gradient of the O2O classification head negatively impacts both the O2M classification head (with NMS post-processing) and the O2O classification head. This suggests that one-to-one assignment introduces critical bias into feature learning.
|
||||
|
||||
\begin{table}[h]
|
||||
\centering
|
||||
\caption{Ablation study on NMS-free block}
|
||||
\caption{Ablation study on Polar GNN block.}
|
||||
\begin{adjustbox}{width=\linewidth}
|
||||
\begin{tabular}{cccc|ccc}
|
||||
\toprule
|
||||
@ -908,7 +903,7 @@ We also explore the stop-gradient strategy for the O2O classification head. As s
|
||||
|
||||
\begin{table}[h]
|
||||
\centering
|
||||
\caption{The ablation study for NMS and NMS-free on CULane test set}
|
||||
\caption{The ablation study for NMS and NMS-free on CULane test set.}
|
||||
\begin{adjustbox}{width=\linewidth}
|
||||
\begin{tabular}{c|l|lll}
|
||||
\toprule
|
||||
@ -945,7 +940,7 @@ We also explore the stop-gradient strategy for the O2O classification head. As s
|
||||
|
||||
\begin{table}[h]
|
||||
\centering
|
||||
\caption{The ablation study for stop grad on CULane test set}
|
||||
\caption{The ablation study for the stop grad strategy on CULane test set.}
|
||||
\begin{adjustbox}{width=\linewidth}
|
||||
\begin{tabular}{c|c|lll}
|
||||
\toprule
|
||||
@ -955,7 +950,7 @@ We also explore the stop-gradient strategy for the O2O classification head. As s
|
||||
&O2M-B w/~ NMS &78.83&88.99&70.75\\
|
||||
&O2O-G w/o NMS &71.68\textcolor{darkgreen}{~(7.15$\downarrow$)}&72.56\textcolor{darkgreen}{~(16.43$\downarrow$)}&70.81\textcolor{red}{~(0.06$\uparrow$)}\\
|
||||
\midrule
|
||||
\multirow{2}*{Stop grad}
|
||||
\multirow{2}*{Stop Grad}
|
||||
&O2M-B w/~ NMS &80.81&88.53&74.33\\
|
||||
&O2O-G w/o NMS &80.81\textcolor{red}{~(0.00$\uparrow$)}&88.52\textcolor{darkgreen}{~(0.01$\downarrow$)}&74.33\textcolor{red}{~(0.00$\uparrow$)} \\
|
||||
\bottomrule
|
||||
@ -967,13 +962,13 @@ We also explore the stop-gradient strategy for the O2O classification head. As s
|
||||
|
||||
|
||||
|
||||
\textbf{Ablation study on NMS-free block in desse scenarios.} Despite demonstrating the feasibility of replacing NMS with the O2O classification head in sparse scenarios, the shortcomings of NMS in dense scenarios remain. To investigate the performance of the NMS-free block in dense scenarios, we conduct experiments on the CurveLanes dataset, as detailed in Table \ref{aba_NMS_dense}.
|
||||
\textbf{Ablation study on NMS-free block in dense scenarios.} Despite demonstrating the feasibility of replacing NMS with the O2O classification head in sparse scenarios, the shortcomings of NMS in dense scenarios remain. To investigate the performance of the NMS-free block in dense scenarios, we conduct experiments on the CurveLanes dataset, as detailed in Table \ref{aba_NMS_dense}.
|
||||
|
||||
In the traditional NMS post-processing \cite{clrernet}, the default IoU threshold is set to 50 pixels. However, this default setting may not always be optimal, especially in dense scenarios where some lane predictions might be erroneously eliminated. Lowering the IoU threshold increases recall but decreases precision. To find the most effective IoU threshold, we experimented with various values and found that a threshold of 15 pixels achieves the best trade-off, resulting in an F1-score of 86.81\%. In contrast, the NMS-free paradigm with the GNN-based O2O classification head achieves an overall F1-score of 87.29\%, which is 0.48\% higher than the optimal threshold setting in the NMS paradigm. Additionally, both precision and recall are improved under the NMS-free approach. This indicates that the GNN-based O2O classification head is capable of learning semantic distances between anchors in addition to geometric distances, thus providing a more effective solution for dense scenarios compared to the traditional NMS approach.
|
||||
In the traditional NMS post-processing \cite{clrernet}, the default IoU threshold is set to 50 pixels. However, this default setting may not always be optimal, especially in dense scenarios where some lane predictions might be erroneously eliminated. Lowering the IoU threshold increases recall but decreases precision. To find the most effective IoU threshold, we experimented with various values and found that a threshold of 15 pixels achieves the best trade-off, resulting in an F1-score of 86.81\%. In contrast, the NMS-free paradigm with the GNN-based O2O classification head achieves an overall F1-score of 87.29\%, which is 0.48\% higher than the optimal threshold setting in the NMS paradigm. Additionally, both precision and recall are improved under the NMS-free approach. This indicates that the GNN-based O2O classification head is capable of learning both explicit geometric distance and implicit semantic distances between anchors in addition to geometric distances, thus providing a more effective solution for dense scenarios compared to the traditional NMS post-processing.
|
||||
|
||||
\begin{table}[h]
|
||||
\centering
|
||||
\caption{NMS vs NMS-free on CurveLanes validation set}
|
||||
\caption{NMS vs NMS-free on CurveLanes validation set.}
|
||||
\begin{adjustbox}{width=\linewidth}
|
||||
\begin{tabular}{l|l|ccc}
|
||||
\toprule
|
||||
@ -995,7 +990,7 @@ In the traditional NMS post-processing \cite{clrernet}, the default IoU threshol
|
||||
\label{aba_NMS_dense}
|
||||
\end{table}
|
||||
|
||||
\textbf{Visualization.} We present the Polar R-CNN predictions for both sparse and dense scenarios. Fig. \ref{vis_sparse} displays the predictions for sparse scenarios across four datasets. The local polar head effectively proposes anchors that are clustered around the ground truth, providing a robust prior for the RoI stage to achieve the final lane predictions. Moreover, the number of anchors has significantly decreased compared to previous works, making our method faster than other anchor-based methods in theory. Fig. \ref{vis_dense} shows the predictions for dense scenarios. We observe that NMS@50 mistakenly removes some predictions, leading to false negatives, while NMS@15 fails to eliminate redundant predictions, resulting in false positives. This highlights the trade-off between using a large IoU threshold and a small IoU threshold. The visualization clearly demonstrates that geometric distance becomes less effective in dense scenarios. Only the O2O classification head, driven by data, can address this issue by capturing semantic distance beyond geometric distance. As shown in Fig. \ref{vis_dense}, the O2O classification head successfully eliminates redundant true predictions while retaining dense predictions with small geometric distances.
|
||||
\textbf{Visualization.} We present the Polar R-CNN predictions for both sparse and dense scenarios. Fig. \ref{vis_sparse} displays the predictions for sparse scenarios across four datasets. LPH effectively proposes anchors that are clustered around the ground truth, providing a robust prior for the RoI stage to achieve the final lane predictions. Moreover, the number of anchors has significantly decreased compared to previous works, making our method faster than other anchor-based methods in theory. Fig. \ref{vis_dense} shows the predictions for dense scenarios. We observe that NMS@50 mistakenly removes some predictions, leading to false negatives, while NMS@15 fails to eliminate redundant predictions, resulting in false positives. This highlights the trade-off between using a large IoU threshold and a small IoU threshold. The visualization clearly demonstrates that geometric distance becomes less effective in dense scenarios. Only the O2O classification head, driven by data, can address this issue by capturing semantic distance beyond geometric distance. As shown in Fig. \ref{vis_dense}, the O2O classification head successfully eliminates redundant true predictions while retaining dense predictions with small geometric distances.
|
||||
|
||||
|
||||
|
||||
@ -1239,7 +1234,7 @@ In the traditional NMS post-processing \cite{clrernet}, the default IoU threshol
|
||||
|
||||
|
||||
\section{Conclusion and Future Work}
|
||||
In this paper, we propose Polar R-CNN to address two key issues in anchor-based lane detection methods. By incorporating a local and global polar coordinate system, our Polar R-CNN achieves improved performance with fewer anchors. Additionally, the introduction of a GNN-based O2O classification head allows us to replace the traditional NMS post-processing, and the NMS-free paradigm demonstrates superior performance in dense scenarios. Our model is highly flexible and the number of anchors can be adjusted based on the specific scenario. Users have the option to use either the O2M classification head with NMS post-processing or the O2O classification head for a NMS-free approach. Polar R-CNN is also deployment-friendly due to its simple structure, making it a potential new baseline for lane detection. Future work could explore incorporating new structures, such as large kernels or attention mechanisms, and experimenting with new label assignment, training, and anchor sampling strategies. We also plan to extend Polar R-CNN to video instance lane detection and 3D lane detection, utilizing advanced geometric modeling for these new tasks.
|
||||
In this paper, we propose Polar R-CNN to address two key issues in anchor-based lane detection methods. By incorporating a local and global polar coordinate system, our Polar R-CNN achieves improved performance with fewer anchors. Additionally, the introduction of the O2O classification head with Polar GNN block allows us to replace the traditional NMS post-processing, and the NMS-free paradigm demonstrates superior performance in dense scenarios. Our model is highly flexible and the number of anchors can be adjusted based on the specific scenario. Users have the option to use either the O2M classification head with NMS post-processing or the O2O classification head for a NMS-free approach. Polar R-CNN is also deployment-friendly due to its simple structure, making it a potential new baseline for lane detection. Future work could explore incorporating new structures, such as large kernels or attention mechanisms, and experimenting with new label assignment, training, and anchor sampling strategies. We also plan to extend Polar R-CNN to video instance lane detection and 3D lane detection, utilizing advanced geometric modeling for these new tasks.
|
||||
%
|
||||
%
|
||||
%
|
||||
|
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 265 KiB |
@ -40,8 +40,8 @@ plt.plot(x_6x13, y_6x13, 'p-', color='orange', alpha=alpha, markersize=12, linew
|
||||
|
||||
|
||||
plt.grid(True, linestyle='-', alpha=0.5)
|
||||
plt.xlabel("Anchor Number") # 横坐标名字
|
||||
plt.ylabel("F1-Score") # 纵坐标名字
|
||||
plt.xlabel("Anchor Selection Number") # 横坐标名字
|
||||
plt.ylabel("F1@50 (%)") # 纵坐标名字
|
||||
plt.legend(loc="lower right", title="Polarmap Size", title_fontsize=mpl.rcParams['legend.fontsize']) # 图例标题
|
||||
plt.savefig('anchor_num_testing.png', dpi=300)
|
||||
plt.show()
|
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 282 KiB |
@ -43,8 +43,8 @@ y_6x13 = [90.845, 89.979, 89.492, 89.237, 89.101, 89.055, 89.018, 88.999, 88.996
|
||||
plt.plot(x_6x13, y_6x13, 'p-', color='orange', alpha=alpha, markersize=12, linewidth=4, label="6*13")
|
||||
|
||||
plt.grid(True, linestyle='-', alpha=0.5)
|
||||
plt.xlabel("Anchor Number") # 横坐标名字
|
||||
plt.ylabel("Precision") # 纵坐标名字
|
||||
plt.xlabel("Anchor Selection Number") # 横坐标名字
|
||||
plt.ylabel("Precision@50 (%)") # 纵坐标名字
|
||||
plt.legend(loc="lower right", title="Polarmap Size", title_fontsize=mpl.rcParams['legend.fontsize']) # 图例标题
|
||||
plt.savefig('anchor_num_testing_p.png', dpi=300)
|
||||
plt.show()
|
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 274 KiB |
@ -39,8 +39,8 @@ y_6x13 = [69.227, 72.876, 73.825, 74.077, 74.174, 74.210, 74.232, 74.249, 74.260
|
||||
plt.plot(x_6x13, y_6x13, 'p-', color='orange', alpha=alpha, markersize=12, linewidth=4, label="6*13")
|
||||
|
||||
plt.grid(True, linestyle='-', alpha=0.5)
|
||||
plt.xlabel("Anchor Number") # 横坐标名字
|
||||
plt.ylabel("Recall") # 纵坐标名字
|
||||
plt.xlabel("Anchor Selection Number") # 横坐标名字
|
||||
plt.ylabel("Recall@50 (%)") # 纵坐标名字
|
||||
plt.legend(loc="lower right", title="Polarmap Size", title_fontsize=mpl.rcParams['legend.fontsize']) # 图例标题
|
||||
plt.savefig('anchor_num_testing_r.png', dpi=300)
|
||||
plt.show()
|
||||
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 152 KiB |
@ -40,7 +40,7 @@ for label, props in data.items():
|
||||
# 设置标题和标签
|
||||
plt.grid(True, linestyle='-', alpha=0.5)
|
||||
plt.xlabel('Anchor Number')
|
||||
plt.ylabel('F1-score')
|
||||
plt.ylabel('F1@50 (%)')
|
||||
|
||||
# 添加图例,并调整图例中的标记大小
|
||||
legend = plt.legend(loc="best")
|
||||
|
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 189 KiB |
@ -44,7 +44,7 @@ for label, props in data.items():
|
||||
# 设置标题和标签
|
||||
plt.grid(True, linestyle='-', alpha=0.5)
|
||||
plt.xlabel('Latency (ms) on NVIDIA A100')
|
||||
plt.ylabel('F1-score (%)')
|
||||
plt.ylabel('F1@50 (%)')
|
||||
|
||||
# 添加图例,并调整图例中的标记大小
|
||||
legend = plt.legend(loc="upper right")
|
||||
|