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