Test-time adaptation (TTA) intends to adapt the pretrained model to test distributions with only unlabeled test data streams. Most of the previous TTA methods have achieved great success on simple test data streams such as independently sampled data from single or multiple distributions. However, these attempts may fail in dynamic scenarios of real-world applications like autonomous driving, where the environments gradually change and the test data is sampled correlatively over time. In this work, we explore such practical test data streams to deploy the model on the fly, namely practical test-time adaptation (PTTA). To do so, we elaborate a Robust Test-Time Adaptation (RoTTA) method against the complex data stream in PTTA. More specifically, we present a robust batch normalization scheme to estimate the normalization statistics. Meanwhile, a memory bank is utilized to sample category-balanced data with consideration of timeliness and uncertainty. Further, to stabilize the training procedure, we develop a time-aware reweighting strategy with a teacher-student model. Extensive experiments prove that RoTTA enables continual testtime adaptation on the correlatively sampled data streams. Our method is easy to implement, making it a good choice for rapid deployment. The code is publicly available at https://github.com/BIT-DA/RoTTA
翻译:测试时自适应(TTA)旨在仅利用无标签测试数据流,使预训练模型适应测试分布。以往大多数TTA方法在简单测试数据流(如从单一或多个分布独立采样数据)上取得了显著成功。然而,在自动驾驶等实际应用的动态场景中,环境逐渐变化且测试数据随时间存在相关采样,这些方法可能失效。本研究探索此类实际测试数据流以实现在线模型部署,称为实际测试时自适应(PTTA)。为此,我们提出一种针对PTTA复杂数据流的鲁棒测试时自适应方法(RoTTA)。具体而言,我们设计了一种稳健的批归一化方案以估计归一化统计量;同时,利用记忆库在考虑时效性与不确定性的前提下采样类别平衡数据;此外,为稳定训练过程,我们开发了一种基于教师-学生模型的时间感知重加权策略。大量实验证明,RoTTA能在相关采样数据流上实现连续测试时自适应。该方法易于实现,是快速部署的理想选择。代码已开源:https://github.com/BIT-DA/RoTTA