Cross-Domain Car Detection Model with Integrated Convolutional Block Attention Mechanism

Haoxuan Xu, Songning Lai, Yang Yang · DOI

Abstract

Robust car detection is a cornerstone of autonomous driving safety, yet standard computer vision models often suffer significant performance degradation when transitioning from daytime to nighttime environments. This paper presents CDMA, a cross-domain car detection framework designed to bridge this gap using Unsupervised Domain Adaptation (UDA). By integrating a modified CycleGAN for image-to-image translation, a dual-headed Convolutional Block Attention Module (CBAM), and Generalized Intersection over Union (GIoU) loss, the proposed model achieves a mean Average Precision (mAP) of 59.97% on the SODA10M dataset. This represents a substantial improvement over baseline detectors and demonstrates the efficacy of using attention mechanisms to capture domain-invariant features like vehicle headlights and silhouettes.

Introduction

Computer vision models for autonomous driving are notoriously "brittle" when moving between domains—specifically from clear daytime conditions to low-visibility nighttime scenes. While massive amounts of labeled daytime data are available, labeling nighttime footage is labor-intensive, costly, and prone to human error due to poor visibility.

Standard object detectors often fail at night because they have not learned to prioritize the specific features that define a car in the dark, such as the glow of headlights or the specific silhouettes created by streetlamps. This research addresses the challenge of Unsupervised Domain Adaptation (UDA): training a model on labeled daytime data and unlabeled nighttime data so that it performs reliably in both environments without requiring expensive, manually labeled nighttime training sets.

Methodology

The authors propose a multi-stage framework called CDMA (Cross-domain Car Detection Model with integrated Attention), which consists of three primary components: image translation, attention-based feature extraction, and optimized loss calculation.

Image-to-Image Translation

To leverage existing daytime labels, the framework utilizes a modified CycleGAN to transform daytime images into "fake" nighttime images. This process allows the model to "transfer" the labels from the daytime source to a nighttime style, effectively creating a synthetic training set that mimics the target domain's visual characteristics.

Integrated Attention (CBAM)

The core novelty of CDMA is the integration of the Convolutional Block Attention Module (CBAM). This module applies both channel and spatial attention to the feature maps. In the generator phase, it helps the model focus on critical features like headlights. In the detector phase—an improved Faster R-CNN referred to as Attention R-CNN—it enables the model to ignore background noise and focus on the vehicle's structural integrity. By using both attention types, the model learns where to look (spatial) and what features are most important (channel), which is particularly effective when the "important" pixels change drastically between day (car body) and night (lights/silhouette).

Generalized Intersection over Union (GIoU) Loss

In cross-domain tasks, initial predictions are often far from the ground truth, leading to a "zero overlap" problem. Standard Intersection over Union (IoU) loss provides no gradient when bounding boxes do not overlap, stalling the training process. CDMA adopts Generalized Intersection over Union (GIoU), which accounts for the empty space between boxes. This provides a mathematical "path" for the model to move the predicted box toward the target even with zero initial overlap, leading to more stable training and improved bounding box accuracy.

Experimental Evaluation

Datasets

The model was primarily evaluated on the SODA10M dataset, a high-quality driving dataset. The researchers utilized 5,000 daytime images from Shanghai for training and a diverse test set of 5,000 images covering various cities, weather conditions, and times of day, including 1,656 specific night scenes. Additionally, the SSLAD dataset was used for initial resolution reduction tests to evaluate model effectiveness across different scales.

Key Results

The CDMA framework showed dramatic improvements over baseline models on the SODA10M dataset:

  • mAP (mean Average Precision): The model achieved 59.97% mAP, a significant jump from the baseline Faster R-CNN's 39.29%.
  • Comparison to SOTA: CDMA outperformed modern one-stage detectors, including YOLOv8 (52.65% mAP) and YOLOv7 (50.82% mAP), in this specific cross-domain nighttime task.
  • Recall: The model's ability to successfully identify cars improved by 16.22% compared to standard domain adaptation methods, reaching a total of 73.88%.
  • Ablation Studies: Removing the attention mechanism from the "head" of the model caused a sharper performance drop than removing it from the "tail," suggesting that early-stage feature extraction is where attention matters most for managing domain shifts.

Discussion and Conclusion

While the CDMA model excels at Recall (finding cars in the dark), its Precision—the accuracy of those detections—remains lower than some baselines like YOLOv8. This suggests that while the model is highly sensitive to vehicles in low-light conditions, it occasionally misidentifies other glowing objects as vehicles.

Future work will focus on refining bounding box precision and extending the framework to other critical categories, such as pedestrians and cyclists. Nevertheless, the integration of CBAM and GIoU within a UDA framework provides a robust path forward for autonomous systems to operate safely across the 24-hour cycle without the need for exhaustive nighttime data labeling.

Summary updated

BibTeX
@article{xu2023cross,
  author = {Haoxuan Xu and Songning Lai and Yang Yang},
  title = {{Cross-Domain Car Detection Model with Integrated Convolutional Block Attention Mechanism}},
  journal = {Image and Vision Computing},
  year = {2023},
  url = {https://openreview.net/forum?id=H8vnke9yML},
}
Figure