A Dual-Cycled Cross-View Transformer Network for Unified Road Layout Estimation and 3D Object Detection in the Bird's-Eye-View

The bird's-eye-view (BEV) representation allows robust learning of multiple tasks for autonomous driving including road layout estimation and 3D object detection. However, contemporary methods for unified road layout estimation and 3D object detection rarely handle the class imbalance of the training dataset and multi-class learning to reduce the total number of networks required. To overcome these limitations, we propose a unified model for road layout estimation and 3D object detection inspired by the transformer architecture and the CycleGAN learning framework. The proposed model deals with the performance degradation due to the class imbalance of the dataset utilizing the focal loss and the proposed dual cycle loss. Moreover, we set up extensive learning scenarios to study the effect of multi-class learning for road layout estimation in various situations. To verify the effectiveness of the proposed model and the learning scheme, we conduct a thorough ablation study and a comparative study. The experiment results attest the effectiveness of our model; we achieve state-of-the-art performance in both the road layout estimation and 3D object detection tasks.


I. INTRODUCTION
Recently, a number of prominent research outcomes are leading the advancement of autonomous driving: 3D object detection [1], semantic segmentation [2], and visual odometry [3]. Among them, the task of concurrent semantic road layout estimation and 3D object detection in the bird'seye-view (BEV) [4] is attracting growing interest; the low dimensional representation of the surrounding environments enhances crucial tasks for autonomous driving such as navigation and hazard avoidance in addition to the road layout estimation and 3D object detection tasks.
Nonetheless, contemporary methods for concurrent road layout estimation and 3D object detection in BEV display two major limitations. First, contemporary methods hardly consider the imbalance in the class distribution of the data for road layout estimation and 3D object detection. They simply learn to estimate the road layout and the 3D objects in a scene with naive objective functions. Next, contemporary approaches require multiple networks for each class for road layout estimation, resulting in computational inefficiency. Rather than learning one model for multiple classes, these approaches learn separate models for each class (e.g., road, vehicle, pedestrian and background).
To overcome the limitations of contemporary methods, we design a unified model for road layout estimation and 3D object detection inspired by the transformer architecture [5] and the CycleGAN learning framework [6]: the dualcycled cross-view transformer (DCT) architecture. First of all, the proposed model learns to estimate the road layout and detect 3D objects in a scene taking the class imbalance of the training dataset into account. Specifically, we propose to learn the model based on the focal loss [7] so that it focuses on a sparse set of hard examples while restraining the large number of easy negatives from overpowering the training procedure. Moreover, we propose a dual cycle loss to further compensate for the performance degradation caused by the class imbalance in the dataset.
Furthermore, we thoroughly investigate the effect of multiclass learning on the road layout estimation task; since multiclass learning for road layout estimation could reduce the total number of neural networks, it plays a crucial role in autonomous driving where computational resources are restricted. To accomplish this goal, we construct comprehensive multi-class learning experiment scenarios for road layout estimation including the proposed learning scheme (the dual cycle loss), examine the multi-class learning experiment results meticulously, and reveal essential insights for a future research direction.
In summary, the main contributions of our work are as follows: 1) DCT Architecture: We propose the dual-cycled crossview transformer (DCT) network for unified road layout estimation and 3D object detection for autonomous driving along with the learning scheme to handle the class imbalance. 2) Multi-Class Learning: We investigate the effect of multi-class learning in the context of road layout estimation for the first time to the best of our knowledge. 3) Ablation Study: We conduct a thorough ablation study and reveal important intuitions for the effect of each design choice. 4) SoTA Performance: We achieve state-of-the-art performance on both road layout estimation and 3D object detection in the Argoverse and KITTI 3D Object datasets, respectively. 5) Open Source: We contribute to the research society by making the source code of the proposed DCT network and the pretrained network parameters public.

II. RELATED WORKS
In this section, we review previous methods relevant to the semantic road layout estimation and monocular 3D object detection tasks in BEV.
Semantic road layout estimation in BEV. With the advancement of large-scale datasets for autonomous driving [8], [9], [10], the task of semantic road layout estimation has emerged. Early approaches have assumed that scenes are in general planar in the autonomous driving settings and transformed images into BEV using simple homographies [11], [12], [13]. However, the planar scene assumption results in artifacts for dynamic objects such as moving vehicles and pedestrians. Thus, contemporary approaches directly learn the image-to-BEV transformation [4], [14]. For example, VED utilizes a variational autoencoder (VAE) model for producing the semantic road layout of the given image [15]; VPN performs cross-view semantic segmentation by learning common feature representation across multiple views [14]; and lift-splat-shoot (LSS) transforms 2D image features into 3D space and generates BEV grids [16].
Monocular 3D object detection. Monocular 3D object detection aims to estimate the dimension and the orientation of objects in the real-world coordinate from a single monocular image. One category of approaches formulates monocular 3D object detection as 2D object detection and evaluates the depth of the given monocular scene [15], [17]. Moreover, approaches based on psuedo-lidars first predict the depth map of the given 2D image, project the predicted depth map into 3D points and conduct 3D object detection directly on these projected 3D points [18], [19] using 3D object detection algorithms [20], [21].
On the other hand, formulating 3D object detection as 2D segmentation in the top-view is drawing increasing attention due to the conciseness and diverse applicability of the lowdimensional representation in the context of autonomous driving [22], [23], [17]. For instance, Mono3D predicts 3D bounding boxes on the ground plane and projects the predicted 3D bounding boxes into the given monocular image [24]; and OFTNet transforms the given monocular image into the top-view representation and performs 2D semantic segmentation for 3D object detection [25]. Recently Monolayout [26] and CVT [27] have attempted to present a unified model for both the semantic road layout estimation and 3D object detection tasks in BEV from a single monocular image.
Transformers for computer vision. Currently, the transformer architecture [5] is prevailing in a lot of computer vision fields [28], [29]. Based on the attention mechanism first proposed for machine translation [30], transformers explicitly model pair-wise interactions of elements in a sequence. This ability of transformers could aid modeling the correlation between the features of views in different domains [31] or in different time-steps [32]. For semantic road layout estimation and 3D object detection in BEV, CVT has designed a crossview transformer for establishing the correlation between the front-view and the top-view [27].

III. METHODOLOGY
We describe the proposed dual-cycled cross-view transformer (DCT) architecture inspirited by the transformer architecture [5] and the CycleGAN learning framework [6] in this section. Fig. 1 depicts the overall architecture of the proposed dual-cycled cross-view transformer (DCT) network. During training, the DCT network receives both the top-view layout and the front-view image as input. The top-view layout and the front-view image get transformed to the front-view representation and the top-view representation, respectively. Then, the transformed front-view embedding and the transformed top-view embedding get cyclically retransformed into the top-view representation and the front-view representation, respectively. The proposed dual-cycled view projection module utilizes these transformed representations for ensuring the complete dual cycle consistency-leading to performance enhancement. Further, the top-view representation extracted from the input front-view image goes through the cross-view transformer [27] and then becomes the top-view prediction, i.e., the semantic road layout from the single front-view image. In addition, we utilize an auxiliary supervision for better gradient flow during training. During testing or inference, the DCT network only receives a front-view image for road layout estimation and 3D object detection with the crossview transformer.

B. Remedy for Class Imbalance
When the distribution of class labels in the training set is not even but skewed, the vast number of easy negative samples tend to overpower the training procedure and the model learns not meaningful representation with the naive cross-entropy loss [7]. In the road layout estimation task, the layouts ordinarily contain way more background pixels than other classes, i.e., vehicles or roads. Thus, an appropriate management of the class imbalance is essential and it leads to significant performance enhancement.
To attain the goal, we propose to learn road layout estimation and 3D object detection in BEV from a single front-view image utilizing the focal loss [7] as follows: where p c = log exp(xc) C i=1 exp(xi) ∈ [0, 1], N and γ represent the estimated probability of the class c, the total number of class categories and a hyper-parameter, respectively. In the single class learning setting, c ∈ {foreground, background} and we set γ as 2.

C. Auxiliary Supervision
Neural architectures that incorporate multiple components could bring about a large number of parameters-making the optimization process challenging [33]. To cope with a possible gradient vanishing problem and better flow the supervision signal throughout the entire architecture, we employ an auxiliary supervision branch. The auxiliary supervision branch takes X from the dual cycled view projection module and predicts the road layout from X using a separate decoder (the transform decoder).

D. Dual Cycle Loss
Inspired by the CycleGAN learning framework [6], we propose the dual cycled view projection module which evaluates the dual cycle loss. First, the proposed dual cycled view projection module consists of four major components: a front-view feature extractor (i.e., encoder), a top-view feature extractor, a top-to-front multi-layer perceptron (MLP) and a front-to-top MLP. The two feature extractors learn representations for top-view layouts and front-view images. Moreover, the two MLPs conduct domain transfer from topto-front and front-to-top.
Next, the proposed dual cycle loss boosts the performance of the view transformation by letting the DCT network learn both the forward view transformation (front-view to top-view to front-view) and the backward view transformation (topview to front-view to top-view); the dual cycle loss comprise of a forward loss and a backward loss.
Furthermore, for mathematical description of the dual cycle loss, let X,X, F and G denote the front image embedding (i.e., the output of the front-view feature extractor), the top-view layout embedding (i.e., the output of the top-view feature extractor), the top-to-front MLP and the front-to-top MLP, respectively. Then, X = G(X), X = F (X ) = F (G(X)), andX = G(F (X)) lie in the top-view, the front-view and the top-view embedding spaces, respectively. Consequently, the forward loss becomes and similarly the backward loss is Finally, we define the dual cycle loss as follows:

E. Multi-Class Learning
Learning cross-view transformation of each entity (vehicles and roads) using separate neural networks results in a substantial computational inefficiency as practiced in conventional methods [26], [27]. Thus, multi-class learning would hugely improve the computational efficiency for autonomous driving systems where the computational capacity is in general limited. To investigate the effect of multiclass learning in the unified road layout estimation and 3D object detection learning environments, we use c ∈ {vehicle, road, background} in (1) and accordingly N in (1) becomes 3.

F. Objective Function
Our objective function incorporates two losses as follows: where λ i ∈ {1, 2} indicates the weight factor for each loss and we set λ 1 and λ 2 as 10 and 1·e −3 , respectively. Note that the focal loss evaluates the discrepancy between the outputs of the DCT network (the outputs of the two decoders, i.e., the decoded X ) and the ground-truth road layout.

IV. EXPERIMENT
To verify the performance of the proposed DCT network, we conduct a set of extensive experiments and compare the proposed model against multiple baselines in various scenarios.

A. Settings
Datasets. We employ two datasets for evaluation: the KITTI [8] and Argoverse [34] datasets. First, the KITTI dataset provides a number of splits. We evaluate the performance of each model on three KITTI splits: the KITTI 3D object detection split (KITTI 3D Object) [24] with 3,712 training and 3,769 validation images for 3D vehicle detection, the KITTI Odometry split for road layout estimation with 15,806 training and 6,636 validation images, and the KITTI Raw [35] with 10,156 training and 5,074 validation images for road layout estimation. Next, the Argoverse dataset consists of 6,723 training and 2,418 validation images for road layout estimation.
Metrics. For quantitative analysis, we adopt the standard object detection and segmentation metrics [36]: the mean of intersection-over-union (mIoU) and the mean average precision (mAP) metrics.
Baselines. We compare the performance of the proposed method against a set of state-of-the-art methods: MonoOccupancy [15], MonoLayout [26], VPN [14], Mono3D [24], OFTNet [25], and CVT [27]. One thing to note is that we use Mono3D [24] and OFTNet [25] for detecting vehicles in the top-view and adapted versions of VPN [14] and MonoOccupancy [15] for fair comparison [27]. Further, we utilize the latest performance of baselines reported online which is slightly distinctive than the reported results in their original papers. We exclude baselines that employ additional information such as multiple input images [37], [4] rather than a monocular image input.

B. Implementation Details
We implement the proposed model using the Pytorch framework and train the model using a single NVIDIA A30 GPU. We normalize the input images to 1024×1024. The size of the ground truth label of KITTI Odometry, KITTI 3D Object, KITTI Raw and Argoverse are originally 128×128, 256×256, 256×256, and 512×512, respectively; they all get interpolated as 1024×1024. Next, we render the ground truths of single-class instances as three-channel images by repeating the image content in the channel axis; we prioritize vehicles over roads to make each pixel contain one class label when ground truth pixels include multiple class labels. In addition, we render the ground truths of multiclass instances as one-hot encoded three-channel image. For feature extraction, we utilize the ResNet-18 architecture [38] without bottleneck layers; for domain transfer between the front-view and the top-view, we employ MLPs with two fully-connected layers interspersed with the ReLU activation. For training, we employ the Adam optimizer [39]. Moreover, the batch size, learning rate and the number of training epochs are 6, 1e-4 and 120, respectively. In the single class learning setting, we decay the learning rate once by 0.1 at the 50-th epoch; in the multi-class learning setting, we decay the learning rate once by 0.1 at the 100-th epoch.

C. Ablation Study
To verify the effectiveness of each component of the proposed learning scheme, we conduct ablation studies in two learning settings: single-class learning and multi-class learning.
Single-Class Learning. Table I describes the ablation study result in the single-class learning scenario. The baseline model learned with the naive cross-entropy loss. As we applied the focal loss to the baseline model, the performance enhanced since the proposed learning scheme with the focal loss effectively dealt with the class imbalance. Moreover, the dual cycle loss further improved the performance as the loss incorporated the complete dual cycle consistency. In short, sequential application of the focal loss and the proposed dual cycle loss to the baseline model boosts the performance sequentially-which demonstrates the effectiveness of both the proposed application of the focal loss and the designed dual cycle loss.
Multi-Class Learning. Table II describes the ablation study result in the multi-class learning scenario. Similar to the single-class learning scenario, the application of the focal loss and the dual-cycle loss in progression to the baseline model enhanced the performance with substantial performance margins consecutively-corroborating the validity of each component of the proposed learning scheme in the multi-class learning setting. However, note that the multiclass learning deteriorates performance and the performance drop is more severe for vehicles. We surmise that vehicles occupying less areas than roads in a road layout require more deliberate learning scheme design.

D. Comparative Study
We perform comparative studies to establish the performance contribution against the baseline models. Note that, in Tables III and IV, * means the latest performance published online, which are slightly different from the reported results in the original papers.
Single-Class Learning. Tables III and IV exhibit the comparative study result in the single-class learning scenario. The proposed DCT architecture shows state-of-theart performance on both the KITTI and Argoverse datasets  with substantial performance gains. The performance gain is more prominent in mAP than mIoU (7.85% and 6.26% mAP enhancement in the KITTI 3D and Argoverse vehicle datasets, respectively) since we proposed to handle the class imbalance utilizing the focal loss. Moreover, Fig. 2 presents the qualitative comparison of our approach against the baseline methods. The comparison result demonstrates that our method overcomes existing class imbalance problem effectively. The predicted road layout from the DCT network contains less noise than the baselines (in fact, almost zero noise). Plus, the DCT network generates road layouts with more accurate and clearer boundaries. Next, our DCT method shows superior performance in the 3D object detection in BEV task. The DCT network successfully distinguishes densely arranged cars in a row (marked as red boxes in the figure) whereas the baseline models likely failed to differentiate them.
Multi-Class Learning. Table V quantifies the comparative study result in the multi-class learning scenario; the proposed DCT network accomplished state-of-the-art performance with considerable margins. The performance mar-gin is more conspicuous for predicting vehicles where the class imbalance problem is more severe. In addition, all methods considered in the experiment displayed degraded performance in the multi-class learning scenario compared to the single-class learning scenario. We assume that vehicles taking up much fewer pixels than roads in a road layout cause the performance degradation-demanding an advanced learning scheme for multi-class learning.
Besides, Fig. 3 illustrates the qualitative comparison result. The qualitative comparison result establishes the superiority of the proposed DCT architecture likewise. Our DCT architecture transforms the road layout from the front-view to the top-view with more accurate and clearer boundaries compared to the baseline model; furthermore, the road layouts from the DCT network contains less noise. In addition, the DCT network differentiates adjacent vehicles, which the baseline model can hardly distinguish.

V. CONCLUSION
In this work, we proposed the dual-cycled cross-view transformer (DCT) network for unified road layout estimation and 3D object detection. The DCT network concurrently performs both the road layout estimation and 3D object detection tasks in BEV, which are essential for autonomous driving. We proposed to manage the class imbalance of the training data through the focal loss so that excessive negative samples would not overwhelm the learning process. Besides, we designed dual cycle consistency loss to further offset the performance loss caused by the class imbalance. Next, we investigated the effect of multi-class learning on road layout estimation; otherwise we need one neural network per each class. We revealed that multi-class learning requires an enhanced model design since the current model's learning