Skip to content

Menu

WorksComputer Science

FogTTA: Online Test-Time Adaptation for Robust Transformer-based Object Detection in Foggy Weather

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_dvkvpge2. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

Object detection models for autonomous driving commonly experience substantial performance drops when deployed under adverse weather due to the domain shift between training data and real-world operating conditions. This degradation is especially evident when models trained on clear-weather images encounter foggy environments with reduced visibility and contrast. To address this challenge, we introduce FogTTA, an online test-time adaptation framework designed to improve the robustness of Transformer-based object detectors in fog. Using RF-DETR as the underlying object detector, FogTTA enables real-time adaptation to the streaming target domain without requiring source data or retraining. The framework follows a teacher-student design, where the deployed model serves as the teacher and generates pseudo labels from weakly augmented target inputs. These predictions are subsequently refined through non-maximum suppression and confidence filtering. The student model then learns from strongly augmented target sample using the Varifocal loss to mitigate pseudo-label noise. The teacher is updated via exponential moving averaging to ensure stable and continuous adaptation. Experiments show that FogTTA outperforms prior baselines, delivering improved detection accuracy and stability while maintaining real-time performance.

Introduction

Object detection is a fundamental task in autonomous driving, where reliable perception under diverse environmental conditions is essential for safety [1]. Accurate detection and localization of surrounding objects are essential for safe autonomous navigation. Early detection models are based on convolutional neural networks (CNNs) and can be categorized into two-stage and one-stage approaches. Two-stage detectors, such as Faster R-CNN [2], achieve high accuracy through region proposal refinement but incur heavy computational costs. As real-time performance is critical for autonomous vehicles, one-stage detectors such as SSD [3] and YOLO [4] were developed to deliver efficient detection through a single feed-forward pass. CNN-based methods rely on local receptive fields and thus struggle to model long-range dependencies, which limits their adaptability to adverse conditions [5, 6].

Transformer-based architectures, on the other hand, leverage self-attention to capture long-range dependencies and global context across entire images. Early models such as DETR [6] demonstrated strong accuracy but suffered from high computational overhead and slow convergence. Subsequent detectors, including Deformable DETR [7], LW-DETR [8], and RT-DETR [9], improved speed and efficiency while maintaining competitive accuracy. RF-DETR [10] integrates DINOv2 into LW-DETR, which makes it a robust and efficient detector. However, models trained under clear-weather conditions still experience substantial performance degradation when deployed in foggy environments due to the domain shift.

Domain shift refers to the discrepancy between the distributions of the training (source) and deployment (target) environments [11]. In autonomous driving, this shift is critical when clear-weather models face fog, where reduced visibility and contrast hinder object

This article is © 2026 by author(s) as listed above. The article is licensed under a Creative Commons Attribution (CC BY 4.0) International license (https://creativecommons.org/licenses/by/4.0/legalcode), except where otherwise indicated with respect to particular material included in the article. The article should be attributed to the author(s) identified above. detection [12]. Unsupervised domain adaptation (UDA) methods aim to mitigate this issue by aligning labeled source and unlabeled target data. However, as shown in Figure 1a, such methods [12, 13] assume access to both domains, which is impractical due to privacy and storage constraints. Source-free domain adaptation (SFDA) [14, 15] addresses this limitation by adapting pre-trained models to unlabeled target data without accessing source samples (Figure 1b), yet still requires offline retraining on the entire target set. In contrast, online test-time adaptation (TTA) [16, 17, 18] enables real-time adaptation to a stream of unlabeled target inputs during deployment (Figure 1c). Although more practical, TTA remains challenging due to the absence of supervision, the noise in pseudo labels, and the need to balance adaptation stability and responsiveness.

Figure 1. Illustration of domain adaptation paradigms for object detection: (a) UDA uses labeled source and unlabeled target data jointly; (b) SFDA adapts a source-trained model without source access; (c) TTA adapts online to streaming target data during deployment.

In this paper, we present FogTTA, an online test-time adaptation framework that enhances the robustness of Transformer-based object detectors under foggy conditions. Built upon RF-DETR [10], FogTTA adapts continuously to unseen target data without requiring source access or retraining. It employs a teacher–student design, where the deployed model (teacher) generates and refines pseudo labels through confidence-based filtering and non-maximum suppression (NMS), while the student learns from strongly augmented target views using the Varifocal loss [19] to handle pseudo-label noise. The teacher is updated via exponential moving averaging (EMA) of the student’s parameters to ensure stable and progressive adaptation.

The main contributions of this work are as follows:

  • We propose FogTTA, an online test-time adaptation framework that enhances the robustness of Transformer-based object detection under foggy weather conditions without requiring source data.

  • We utilized a pseudo-label refinement strategy that integrates NMS and the Varifocal loss to mitigate noise and uncertainty during adaptation.

  • We validate FogTTA through experiments, demonstrating improved detection accuracy in foggy conditions while maintaining real-time inference performance of RF-DETR.

The rest of this paper is organized as follows. Section 2 reviews related work. Section 3 presents the proposed methodology. Section 4 describes the experimental settings, and Section 5 discusses the results. Finally, Section 6 concludes the paper and outlines future directions.

Related Works

Transformer-based Object Detectors

The introduction of DETR [6] marked a turning point in object detection. As the first Transformer-based detector, DETR differs from previous approaches by utilizing learnable object queries and an end-to-end pipeline that eliminates the need for post-processing. However, the original DETR design is not suitable for real-time applications due to its computational complexity and relatively high latency. Deformable DETR [7], a follow-up work, adopts deformable attention to focus on key regions, accelerating training and reducing memory usage. To further improve real-time performance, RT-DETR [9] replaces the Transformer encoder with an efficient hybrid encoder to decouple the intra-scale interaction and cross-scale fusion of multi-scale features, improving performance while preserving the NMS-free design for faster inference. LW-DETR [8] uses a convolutional projector to connect a plain ViT encoder and a shallow DETR decoder, yielding a light-weight detector suitable for real-time applications. Building on LW-DETR and DINOv2, RF-DETR [10] leverages neural architecture search to create a scheduler-free object detector that surpasses prior state-of-the-art approaches as well as real-time methods.

Cross-weather domain adaptation

To systematically study clear-to-foggy adaptation, Foggy Cityscapes [20] dataset synthesizes foggy scenes on Cityscapes [21] dataset and is widely used as a benchmark for weather-robust object detection tasks. Early work on cross-weather domain adaptive object detection mainly follows the UDA setting. DA-Detect [12] augments Faster RCNN with image-level and object-level domain classifiers plus an auxiliary domain to reduce the influence of domain shift. This framework is further extended [13] to foggy and rainy conditions with a Dynamic Masking Process that exploits contextual information. However, these methods require access to both source and target data during training, thereby limiting their practicality in real-world deployment. To avoid accessing source data, DDT with AEMA [15] introduces a Dual-Rate Dynamic Teacher (DDT) with Asynchronous EMA (AEMA) to balance fast adaptation to domain shift and long-term knowledge in a source-free setting. FRANCK [14] shows a query-centric source-free framework for DETR with objectness-based sample reweighting module, a contrastive learning bank, and an uncertainty-weighted distillation. Nevertheless, these methods all rely on offline adaptation on a pre-collected target set, which limits their applicability in online test-time scenarios.

Test-time Domain Adaptation

Recent work extends TTA and online adaptation ideas to object detection by adapting detectors during inference without source data. MemCLR [18] introduced a unified teacher-student framework that adapts the target domain in both offline and online settings. MLFA [17] aligns informative global-level and cluster-level features between source and target domains while minimizing target entropy for realistic TTA object detection. DDT [16] introduce Dynamic Dual Teaching (DDT) scheme that combines a source detector and a vision language model teacher with dynamic prediction fusion and consistency regularization to achieve better generalization ability. However, existing TTA detectors still struggle with noisy pseudo labels and unstable adaptation under severe fog conditions. To address these limitations, we develop a transformer-based TTA framework that performs reliable adaptation without accessing source data.

Proposed Method

Problem Formulation

Let the labeled source domain be denoted as DS={(xiS,yiS)}i=1NS\mathcal{D}^{S} = \{(x_i^{S}, y_i^{S})\}_{i=1}^{N_S}, drawn from the joint distribution PS(X,Y)P_S(X,Y), where xiSx_i^{S} and yiSy_i^{S} represent the input image and its corresponding annotation. The source domain corresponds to clear-weather driving conditions. A model fθf_{\theta} is first trained on the source domain by minimizing the supervised detection loss:

min⁡θLsrc(fθ)=1NS∑i=1NSℓ(fθ(xiS),yiS),(1)\min_{\theta} \mathcal{L}_{\mathrm{src}}(f_{\theta}) = \frac{1}{N_S} \sum_{i=1}^{N_S} \ell(f_{\theta}(x_i^{S}), y_i^{S}), \tag*{(1)}

where ℓ(⋅,⋅)\ell(\cdot,\cdot) denotes the overall detection loss that combines classification and localization terms.

At deployment, the pretrained model encounters a stream of unlabeled target samples DT={xjT}j=1NT\mathcal{D}^{T} = \{x_j^{T}\}_{j=1}^{N_T}, drawn from foggy-weather driving conditions following a distinct distribution PT(X)P_T(X) such that PT(X)≠PS(X)P_T(X) \ne P_S(X). The goal of TTA is to adapt fθf_{\theta} online to the target distribution without access to DS\mathcal{D}^{S} or its labels. Formally, the adaptation objective is expressed as:

min⁡θExT∼PT(X)[ℓ(fθ(xT))],(2)\min_{\theta} \mathbb{E}_{x^{T}\sim P_T(X)}\left[\ell(f_{\theta}(x^{T}))\right], \tag*{(2)}

where ExT∼PT(X)[⋅]\mathbb{E}_{x^{T}\sim P_T(X)}[\cdot] denotes the expected loss over target samples drawn from the target distribution, and ℓ(fθ(xT))\ell(f_{\theta}(x^{T})) represents the unsupervised adaptation loss computed from each incoming target image.

Model Overview

Figure 2 illustrates the overall framework of our proposed TTA method for autonomous driving under foggy conditions. The process begins with a model fθf_{\theta} pretrained on a labeled source dataset DS\mathcal{D}^{S} that contains clear-weather driving scenes, as described in Section 3.3. During deployment, this pretrained model is installed on the vehicle and performs inference on a continuous stream of unlabeled target samples DT\mathcal{D}^{T} captured under foggy-weather conditions. As the visual appearance of foggy scenes differs significantly from clear-weather training data, the model experiences performance degradation caused by the domain shift between PT(X)P_T(X) and PS(X)P_S(X).

Figure 2. Model overview of the proposed FogTTA framework. (a) The model is trained on the labeled source domain using focal and detection losses. (b) The trained model is then deployed on the vehicle. (c) During deployment, the vehicle encounters a continuous stream of target data with a distribution different from the source domain. (d) The incoming target data are processed through the TTA pipeline. (e) Weak and strong augmentations of the target images are generated, where the deployed model serves as the teacher and processes weakly augmented inputs to produce refined pseudo labels. NMS is applied to the results, and the student model, which receives the strongly augmented inputs, is trained on these pseudo labels using the Varifocal loss. The teacher model is then updated via EMA of the student’s parameters.

To maintain robustness under such domain shifts, the model is continuously adapted to the incoming target data in an online manner without accessing the source dataset. This process follows a teacher–student framework, where the pretrained model fθf_{\theta} serves as both the inference and teacher network, and a student model fϕf_{\phi}, initialized with the teacher’s parameters, is used for adaptation. This architecture enables continuous online refinement as the environment evolves while ensuring that inference remains real-time through the efficiency of the RF-DETR backbone and is unaffected by the adaptation updates.

As detailed in Section 3.4, for each target sample in the stream, the teacher generates predictions that are treated as supervision signals for the student. The student is optimized using the Variational loss [19] (Section 3.5) to minimize the discrepancy between its predictions and the teacher’s refined pseudo labels, thereby learning target-specific representations from unlabeled data. After each adaptation step, the teacher model is updated using an EMA of the student’s parameters to integrate the latest knowledge from the target domain. Consequently, the teacher model, which also serves as the deployed inference model, remains continuously adapted to the evolving target data stream while retaining the knowledge learned from the source domain.

Training Source Model

The training objective of source fθf_{\theta} on the labeled source dataset DS\mathcal{D}^{S} follows the standard DETR [6] formulation and is optimized using a combination of classification and localization losses. Specifically, the overall loss is defined as:

Lsrc=λclsLcls+λboxLbox+λgiouLgiou,(3)\mathcal{L}_{\mathrm{src}} = \lambda_{\mathrm{cls}}\mathcal{L}_{\mathrm{cls}} + \lambda_{\mathrm{box}}\mathcal{L}_{\mathrm{box}} + \lambda_{\mathrm{giou}}\mathcal{L}_{\mathrm{giou}}, \tag*{(3)}

where λcls\lambda_{\mathrm{cls}}, λbox\lambda_{\mathrm{box}}, and λgiou\lambda_{\mathrm{giou}} are weighting coefficients that balance the individual loss terms.

The classification loss Lcls\mathcal{L}_{\mathrm{cls}} is computed using the focal loss [22], which addresses the foreground–background imbalance commonly observed in dense detection tasks. It is formulated as:

Lcls=−αt(1−pt)γlog⁡(pt),(4)\mathcal{L}_{\mathrm{cls}} = -\alpha_t(1-p_t)^{\gamma}\log(p_t), \tag*{(4)}

where ptp_t represents the predicted probability for the target class, αt\alpha_t is a balancing factor, and γ\gamma is the focusing parameter that down-weights easy samples.

For localization, the bounding box regression loss Lbox\mathcal{L}_{\mathrm{box}} and the generalized IoU loss Lgiou\mathcal{L}_{\mathrm{giou}} [23] are employed to jointly optimize box position and shape alignment. The Hungarian matching algorithm [6] is used to associate each prediction with a corresponding ground-truth box before loss computation.

Test-Time Domain Adaptation

For each incoming image xtx_t, the teacher network generates a set of object predictions

Pt={(bi,pi)}i=1Nt\mathcal{P}_t = \{(b_i, p_i)\}_{i=1}^{N_t}

where bib_i and pip_i represent the predicted bounding box and its associated class probability vector. To improve stability, the teacher performs two inference passes on weakly augmented versions of xtx_t, and the resulting predictions are merged and ranked according to their confidence scores.

Only the top KK detections are retained, and low-confidence predictions are filtered using a pseudo-label confidence threshold τpl\tau_{\mathrm{pl}}. The refined pseudo-label set is defined as

Y^t={(b^k,y^k,s^k)∈Pt∣s^k≥τpl},\hat{\mathcal{Y}}_t = \{(\hat{b}_k, \hat{y}_k, \hat{s}_k) \in\mathcal{P}_t \mid\hat{s}_k \geq\tau_{\mathrm{pl}}\},

where s^k=max⁡cpk,c\hat{s}_k = \max_c p_{k,c} denotes the highest class confidence. The value of τpl\tau_{\mathrm{pl}} determines a trade-off between precision and recall in the pseudo labels. A higher threshold increases precision by filtering out uncertain detections, however decreases recall, which means missing pseudo labels. Conversely, a lower threshold increases recall by retaining more true positives, but may introduce additional false positives that amplify noise during adaptation. As illustrated in Figure 3, selecting an appropriate τpl\tau_{\mathrm{pl}} is crucial to balancing stability and adaptability in the test-time learning process.

Figure 3. Precision and recall of pseudo labels with respect to the confidence threshold τpl\tau_{\mathrm{pl}}.

A non-maximum suppression with an IoU threshold τnms\tau_{\mathrm{nms}} is then applied to eliminate redundant detections. The resulting pseudo labels Y^t\hat{\mathcal{Y}}_t are used to supervise the student model fϕf_{\phi}, which is initialized with the teacher’s parameters and optimized using the adaptation losses detailed in § 2.5. After each adaptation step, the teacher parameters are updated using an EMA of the student’s parameters:

θt+1←μθt+(1−μ)ϕt,\theta_{t+1} \leftarrow\mu\theta_t + (1-\mu)\phi_t,

where μ\mu is the EMA momentum coefficient. This update allows the teacher, which also serves as the deployed inference model, to remain continuously adapted to the evolving target domain while retaining the knowledge learned from the source data.

Handling Pseudo-Label Noise with Varifocal Loss

Pseudo labels generated by the teacher model inherently contain noise due to uncertain predictions under foggy conditions. Low visibility, degraded contrast, and domain shift often lead to inaccurate classification scores and imprecise localization of bounding boxes. Directly training the student model on such noisy pseudo labels can result in confirmation bias [24, 25] and performance degradation. To mitigate this issue, we adopt the Varifocal loss [19], which adaptively weights the contribution of each sample based on its confidence and localization quality.

The Varifocal loss is formulated as:

Lvfl=−∑i=1Nαi(qi(1−pi)γlog⁡(pi)+(1−qi)piγlog⁡(1−pi))\mathcal{L}_{\mathrm{vfl}} = -\sum_{i=1}^{N} \alpha_i \left(q_i(1-p_i)^{\gamma}\log(p_i) + (1-q_i)p_i^{\gamma}\log(1-p_i)\right)

where pip_i denotes the predicted probability, qiq_i is the target confidence derived from the IoU between the predicted and pseudo-labeled boxes, and αi\alpha_i and γ\gamma are balancing and focusing parameters, respectively. Unlike hard thresholding, which discards low-confidence pseudo labels and their potentially useful information, the Varifocal loss retains all samples but adjusts their gradient contribution according to their confidence and localization accuracy. This allows the model to exploit informative low-confidence predictions while reducing the impact of unreliable ones.

By preserving pseudo labels and re-weighting them rather than removing them entirely, the Varifocal loss maintains richer supervision and achieves a better balance between learning stability and adaptability. Consequently, the adaptation process becomes more robust to pseudo-label noise and yields improved detection performance in foggy scenes compared to conventional focal loss.

Experimental settings

Dataset

We conduct experiments on the clear-to-foggy domain adaptation scenario using the Cityscapes [21] and Foggy Cityscapes [20] datasets. The labeled training set of Cityscapes is employed as the source domain, whereas the unlabeled training set of Foggy Cityscapes is utilized as the target domain during test-time adaptation. Following prior work, model performance is evaluated on the validation set of Foggy Cityscapes to measure its effectiveness and generalization capability under foggy-weather conditions.

Implementation Details

To simulate the streaming nature of target data during test-time adaptation, the target images are processed sequentially with a batch size of one. The model is adapted for one epoch over the entire target dataset, ensuring that each image is seen exactly once in the adaptation phase. The learning rate is set to 1×10−41 \times10^{-4}. The pseudo-label confidence threshold τpl\tau_{\mathrm{pl}} is set to 0.3, as discussed in Section 5.4.1, and the NMS threshold τnms\tau_{\mathrm{nms}} is fixed at 0.8 (Section 5.4.2). Based on common practice [26, 27], we set the EMA decay coefficient μ\mu to 0.999. Following the default configuration of RF-DETR [10] for the maximum number of detected objects, we set K=300K = 300 as the maximum number of pseudo labels retained after filtering.

Two types of data augmentation are applied to improve adaptation stability. For the teacher model, weak augmentation consists of light photometric and geometric transformations, including mild color jittering and random horizontal flipping. For the student model, a stronger augmentation is used to encourage robustness to appearance changes. It applies heavier color jittering, random grayscale conversion, Gaussian blur, and random erasing, combined with horizontal flipping.

All experiments are conducted on a single NVIDIA GeForce GTX 1080 Ti GPU.

Evaluation Metric

We evaluate performance using mAP, computed as the mean of class-wise AP values at an IoU threshold of 0.5. This metric jointly reflects detection accuracy and localization quality across all object categories.

Experimental Results

Results

Table 1 presents the detection performance under the Cityscapes →\to Foggy Cityscapes setting. Both the Source Only and Oracle models are based on the RF-DETR detector, where Source Only refers to the model trained solely on the clear-weather source domain without adaptation, and Oracle represents the model trained directly on labeled foggy data. The proposed FogTTA achieves the best overall performance across all classes, with an mAP of 57.6%, outperforming state-of-the-art methods while maintaining real-time efficiency. Compared to the source-only baseline, FogTTA yields a +1.5% mAP improvement and consistent gains across categories. These results confirm that online adaptation through pseudo-label refinement, Varifocal loss, and EMA-based teacher updates effectively mitigates domain shift and enhances robustness in foggy conditions.

MethodTTAPersonRiderCarTruckBusTrainMotorBicyclemAP
MLFA [17]✓38.050.918.532.314.421.031.922.528.7
MemCLR [18]✓32.141.443.521.433.111.525.532.929.8
DDT [16]✓32.041.147.925.133.828.526.035.233.7
DA-Detect [12]×36.546.754.330.351.248.731.639.142.3
DA-Detect (AdvGRL) [13]×36.549.155.830.048.751.333.341.643.4
FRANCK [14] †×48.149.360.633.948.236.934.047.944.9
DDT with AEMA [15] †×49.353.065.425.843.039.740.047.945.5
Source Only †✓52.754.971.643.166.761.647.650.356.1
FogTTA (Ours) †✓53.858.072.645.268.363.148.152.057.6
Oracle †✓57.158.878.647.076.467.248.552.660.8

Table 1. Comparison of detection performance on the Cityscapes →\to Foggy Cityscapes adaptation setting. † denotes Transformer-based object detection. TTA indicates test-time domain adaptation.

Qualitative Analysis

Figure 4 shows detection results before (first row) and after (second row) adaptation. Green circles indicate new correct detections after adaptation, while yellow circles mark false detections removed by FogTTA, showing improved accuracy and robustness under foggy conditions.

Detection results before and after adaptation

Figure 4. Detection results before (top) and after (bottom) adaptation. Green circles show new correct detections, while yellow circles show false positives removed by FogTTA.

Ablation Study

The contribution of each component in the proposed framework is examined to assess its effect on adaptation performance. Table 2 presents the results for different model variants, focusing on the influence of pseudo-label filtering and the Varifocal loss, which are both essential for achieving stable and reliable adaptation.

MethodPersonRiderCarTruckBusTrainMotorBicyclemAP
FogTTA (Ours)53.858.072.645.268.363.148.152.057.6
FogTTA w/o Pseudo-Label Filtering52.256.972.444.567.861.447.751.256.8
FogTTA w/o Varifocal Loss52.157.571.043.167.263.846.951.156.6
FogTTA w/o Pseudo-Label Filtering and Varifocal Loss52.155.970.144.568.962.345.850.656.3

Table 2. Ablation study on the impact of pseudo-label filtering and Varifocal loss under the Cityscapes →\to Foggy Cityscapes setting.

Removing pseudo-label filtering (FogTTA w/o Pseudo-Label Filtering) results in a clear decrease in accuracy. It shows the importance of discarding low-confidence detections to maintain high-quality supervision. Without this step, noisy pseudo labels with reduced precision are used during adaptation, which weakens the learning signal. Excluding the Varifocal loss (FogTTA w/o Varifocal Loss) also lowers performance, which highlights its effectiveness in mitigating residual noise by weighting samples according to their confidence and localization reliability. When both pseudo-label filtering and the Varifocal loss are removed, performance declines further, indicating that these two components complement each other in improving adaptation stability and overall detection accuracy.

Sensitivity Analysis

Effect of τpl\tau_{\mathrm{pl}}

As illustrated in Figure 5, the best overall performance is achieved when τpl=0.3\tau_{\mathrm{pl}} = 0.3. This observation aligns with the trend shown in Figure 3, where a threshold around 0.3 provides a desirable balance between precision and recall. Lower values of τpl\tau_{\mathrm{pl}} introduce excessive noise due to low-confidence predictions, while higher values filter out potentially informative pseudo labels, leading to reduced coverage. Setting τpl\tau_{\mathrm{pl}} to 0.3 offers the best trade-off between stability and adaptability during test-time learning.

Figure 5. Effect of τpl\tau_{\mathrm{pl}} on mAP.

Effect of τnms\tau_{\mathrm{nms}}

The NMS threshold τnms\tau_{\mathrm{nms}} controls the level of overlap allowed between detected bounding boxes and directly influences the trade-off between duplicate suppression and missed detections. Table 3 reports the results for different values of τnms\tau_{\mathrm{nms}}. As the threshold increases from 0.5 to 0.8, the mAP consistently improves, indicating that moderately higher overlap tolerance helps preserve valid detections that may otherwise be suppressed under dense or partially occluded conditions common in foggy scenes. When τnms\tau_{\mathrm{nms}} exceeds 0.8, performance slightly declines due to increased redundancy from overlapping boxes. The best performance is achieved at τnms=0.8\tau_{\mathrm{nms}} = 0.8, which provides a balanced compromise between duplicate suppression and recall preservation.

τnms\tau_{\mathrm{nms}}PersonRiderCarTruckBusTrainMotorBicyclemAP
0.552.957.771.844.467.662.647.751.657.0
0.652.057.371.544.367.964.648.452.057.2
0.753.057.571.745.168.062.448.751.957.3
0.853.858.072.645.268.363.148.152.057.6
0.953.158.172.444.569.162.948.351.657.5

Table 3. Detection performance with different NMS thresholds τnms\tau_{\mathrm{nms}}.

Conclusion

In this paper, we presented FogTTA, an online TTA framework designed to enhance the robustness of Transformer-based object detectors under foggy weather conditions. Building upon RF-DETR, FogTTA enables online adaptation without accessing source data by combining pseudo-label refinement, Varifocal loss, and EMA-based teacher updates. Experimental results demonstrated that FogTTA consistently outperforms all baseline methods in detection accuracy and stability compared to the source-only model, confirming the effectiveness of our approach for real-world autonomous driving scenarios. For future work, we plan to extend FogTTA to broader adaptation scenarios, including cross-dataset settings and simulation-to-real transfer, to evaluate its generalization under more diverse domain shifts. We also aim to explore additional adaptation cues, such as temporal information and uncertainty estimation, to further improve robustness in challenging driving environments.

Acknowledgements

This research is partially funded by the NSERC CREATE TrustCAV program and the NSERC Discovery Grant program, and in part by the NSERC Canada Research Chair (CRC) Program.

The authors used AI-assisted tools solely for language polishing of portions of this manuscript.

References

References

  1. [1]J. Janai, F. Güney, A. Behl, and A. Geiger. “Computer Vision for Autonomous Vehicles: Problems, Datasets and State of the Art”. In: Found. Trends Comput. Graph. Vis. 12.1–3 (July 2020), 1–308. ISSN: 1572-2740. DOI: 10.1561/0600000079. URL: https://doi.org/10.1561/0600000079.
  2. [2]S. Ren, K. He, R. Girshick, and J. Sun. “Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks”. In: Advances in Neural Information Processing Systems. Ed. by C. Cortes, N. Lawrence, D. Lee, M. Sugiyama, and R. Garnett. Vol. 28. Curran Associates, Inc., 2015. URL: https://proceedings.neurips.cc/paper_files/paper/2015/file/14bfa6bb14875e45bba028a21ed38046-Paper.pdf.arxiv.org/abs/1506.01497
  3. [3]W. Liu, D. Anguelov, D. Erhan, C. Szegedy, S. Reed, C.-Y. Fu, and A. C. Berg. “SSD: Single Shot MultiBox Detector”. In: Computer Vision – ECCV 2016. Ed. by B. Leibе, J. Matas, N. Sebe, and M. Welling. Cham: Springer International Publishing, 2016, pp. 21–37. ISBN: 978-3-319-46448-0.
  4. [4]J. Redmon, S. Divvala, R. Girshick, and A. Farhadi. “You Only Look Once: Unified, Real-Time Object Detection”. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 2016.arxiv.org/abs/1506.02640
  5. [5]A. Dosovitskiy. “An image is worth 16x16 words: Transformers for image recognition at scale”. In: arXiv preprint arXiv:2010.11929 (2020).arxiv.org/abs/2010.11929
  6. [6]N. Carion, F. Massa, G. Synnaeve, N. Usunier, A. Kirillov, and S. Zagoruyko. “End-to-End Object Detection with Transformers”. In: Computer Vision – ECCV 2020. Ed. by A. Vedaldi, H. Bischof, T. Brox, and J.-M. Frahm. Cham: Springer International Publishing, 2020, pp. 213–229. ISBN: 978-3-030-58542-8.arxiv.org/abs/2005.12872
  7. [7]X. Zhu, W. Su, L. Lu, B. Li, X. Wang, and J. Dai. “Deformable detr: Deformable transformers for end-to-end object detection”. In: arXiv preprint arXiv:2010.04159 (2020).arxiv.org/abs/2010.04159
  8. [8]Q. Chen, X. Su, X. Zhang, J. Wang, J. Chen, Y. Shen, C. Han, Z. Chen, W. Xu, F. Li, S. Zhang, K. Yao, E. Ding, G. Zhang, and J. Wang. DINO-DETR: A Transformer Replacement to YOLO for Real-Time Detection. 2024. arXiv: 2406.03459 [cs.CV]. URL: https://arxiv.org/abs/2406.03459.
  9. [9]Y. Zhao, W. Lv, S. Xu, J. Wei, G. Wang, Q. Dang, Y. Liu, and J. Chen. “DETRs Beat YOLOs on Real-time Object Detection”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). 2024, pp. 16965–16974.arxiv.org/abs/2304.08069
  10. [10]I. Robinson, P. Robichaeux, M. Popov, D. Ramanan, and N. Peri. RF-DETR: Neural Architecture Search for Real-Time Detection Transformers. 2025. arXiv: 2511.09554 [cs.CV]. URL: https://arxiv.org/abs/2511.09554.
  11. [11]J. Li, Z. Yu, Z. Du, L. Zhu, and H. T. Shen. “A Comprehensive Survey on Source-Free Domain Adaptation”. In: IEEE Transactions on Pattern Analysis and Machine Intelligence 46.8 (2024), pp. 5743–5762. DOI: 10.1109/TPAMI.2024.3370978.DOI
  12. [12]J. Li, R. Xu, J. Ma, Q. Zou, J. Ma, and H. Yu. “Domain Adaptive Object Detection for Autonomous Driving under Foggy Weather”. In: 2023 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV). 2023, pp. 612–622. DOI: 10.1109/WACV56688.2023.00068.DOI
  13. [13]J. Li, R. Xu, X. Liu, J. Ma, B. Li, Q. Zou, J. Ma, and H. Yu. “Domain Adaptation Based Object Detection for Autonomous Driving in Foggy and Rainy Weather”. In: IEEE Transactions on Intelligent Vehicles 10.2 (2025), pp. 900–911. DOI: 10.1109/TIV.2024.3419689.DOI
  14. [14]H. Yao, S. Zhao, S. Lu, H. Chen, Y. Li, G. Liu, T. Xing, C. Yan, J. Tao, and G. Ding. “Source-Free Object Detection With Detection Transformer”. In: IEEE Transactions on Image Processing 34 (2025), pp. 5948–5963. DOI: 10.1109/TIP.2025.3607621.DOI
  15. [15]Q. He, X. Wu, J.-Y. He, and S. Li. “Dual-Rate Dynamic Teacher for Source-Free Domain Adaptive Object Detection”. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2025, pp. 2067–2076.DOI
  16. [16]S. Zhang, L. Zhang, and Z. Liu. “Test-time adaptation for object detection via Dynamic Dual Teaching”. In: Image and Vision Computing 163 (2025), p. 105740. ISSN: 0262-8856. DOI: https://doi.org/10.1016/j.imavis.2025.105740. URL: https://www.sciencedirect.com/science/article/pii/S0262885625003282.
  17. [17]Y. Liu, J. Wang, C. Huang, Y. Wu, Y. Xu, and X. Cao. “MLFA: Toward Realistic Test Time Adaptive Object Detection by Multi-Level Feature Alignment”. In: IEEE Transactions on Image Processing 33 (2024), pp. 5837–5848. DOI: 10.1109/TIP.2024.3473532.DOI
  18. [18]V. Vas, P. Oza, and V. M. Patel. “Towards Online Domain Adaptive Object Detection”. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV). 2023, pp. 478–488.
  19. [19]H. Zhang, Y. Wang, F. Dayoub, and N. Sünderhauf. “VarifocalNet: An IoU-aware Dense Object Detector”. In: CVPR. 2021.arxiv.org/abs/2008.13367
  20. [20]M. Hahner, D. Dai, C. Sakaridis, J.-N. Zaech, and L. V. Gool. “Semantic Understanding of Foggy Scenes with Purely Synthetic Data”. In: 2019 IEEE Intelligent Transportation Systems Conference (ITSC). 2019, pp. 3675–3681. DOI: 10.1109/ITSC.2019.8917518.DOI
  21. [21]M. Cordts, M. Omran, S. Ramos, T. Rehfeld, M. Enzweiler, R. Benenson, U. Franke, S. Roth, and B. Schiele. “The Cityscapes Dataset for Semantic Urban Scene Understanding”. In: Proc. of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 2016.arxiv.org/abs/1604.01685
  22. [22]T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollár. “Focal Loss for Dense Object Detection”. In: IEEE Transactions on Pattern Analysis and Machine Intelligence 42.2 (2020), pp. 318–327. DOI: 10.1109/TPAMI.2018.2858826.DOI
  23. [23]H. Rezatofighi, M. Tsoi, J. Gwak, A. Sadeghian, I. Reid, and S. Savarese. “Generalized Intersection Over Union: A Metric and a Loss for Bounding Box Regression”. In: 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). 2019, pp. 658–666. DOI: 10.1109/CVPR.2019.00075.DOI
  24. [24]B. Chen, J. Jiang, X. Wang, P. Wan, J. Wang, and M. Long. “Debiased self-training for semi-supervised learning”. In: Advances in Neural Information Processing Systems 35 (2022), pp. 32424–32437.arxiv.org/abs/2202.07136
  25. [25]E. Arazo, D. Ortego, P. Albert, N. E. O’Connor, and K. McGuinness. “Pseudo-Labeling and Confirmation Bias in Deep Semi-Supervised Learning”. In: 2020 International Joint Conference on Neural Networks (IJCNN). 2020, pp. 1–8. DOI: 10.1109/IJCNN48605.2020.9207304.DOI
  26. [26]A. Tarvainen and H. Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. 2018. arXiv: 1703.01780 [cs.NE]. URL: https://arxiv.org/abs/1703.01780.
  27. [27]D. Morales-Brotons, T. Vogels, and H. Hendrikx. Exponential Moving Average of Weights in Deep Learning: Dynamics and Benefits. 2024. arXiv: 2411.18704 [cs.LG]. URL: https://arxiv.org/abs/2411.18704.

AI tools statement

This work lists 1 AI tool.

  • AI-assisted tools · AI tool

    Roles
    Writing — review & editing
    Verification
    self-declared at submission

Recorded on the work at submission, not per version. Names and roles are shown as submitted; roles use the CRediT taxonomy.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

No code, data or supplementary files were declared for this version.

Pick where to look, or just type