Continual Momentum Filtering (CMF) is a novel approach to bolster the OTTA methodology. CMF infers a refined source model through target model denoising by leveraging the Kalman filter. The refined source model is ensembled with the target model for the OTTA procedure. By streamlining the Kalman filter algorithm, the computational overheads were minimized, underpinning the pragmatic nature of the CMF.
- ImageNet-C contains 1,281,167/50,000 training/testing data respectively. ImageNet-C is a dataset applied to ImageNet according to 15 types of damage (gaussian noise, shot noise, impulse noise, defocus blur, glass blur, motion blur, zoom blur, snow, frost, fog, brightness, contrast, elastic transform, pixelate, and jpeg compression) at five severity levels.
- Rendition included 30,000 images with various artistic renderings of 200 ImageNet classes, primarily collected from Flickr and filtered by Amazon MTurk annotators.
- Sketch consists of 50,000 images, with 50 images for each of the 1,000 ImageNet classes. This dataset is constructed from Google image queries with the standard class name "sketch of" and is only searched within the "black and white" color scheme.
- D109 is a dataset concerning natural distribution shifts. This dataset consists of five domains (clipart, infograph, painting, real, and sketch). D109 classes were based on DomainNet (cleaned), including 109 classes that overlapp with ImageNet. D109 is automatically generated when running code based on DomainNet.
The following models are officially provided by torchvision and Huggingface and are automatically downloaded when the code is run.
Each method is mapped to the following keys (i.e., key:method).
- Covariate Shifts (
CS
):CS
involves previously defined domains streamed into the model, which were all mixed up. The likelihood of temporally adjacent input data being drawn from the same domain is low. - Temporally-Correlated Covariate Shifts (
TC-CS
): Each domain was applied sequentially inTC-CS
. Temporally adjacent input data were likely to belong to the same domain. - Temporally-Correlated Label Shifts (
TC-LS
):TC-LS
simulates the characteristics of real online data, where labels are temporally interrelated, an d data of the same class appears multiple times. The Dirichlet distribution, driven by the concentration parameter$\delta>0$ , determines how data from each class were allocated to each label. -
TC-LS
sceanrio is mixed withCS
orTC-CS
(i.e.,TC-LS_TC-CS
,TC-LS_CS
).
conda env create -f environment.yml -n cmf
bash run.sh <method-key>
# e.g., bash run.sh cmf
The results files are generated in 'output' directory.
- The scenario of
CS
bash scenarios/run_cs.sh <method-key> "<model-name>"
- The scenario of
TC-CS
bash scenarios/run_tc_cs.sh <method-key> "<model-name>"
- The scenario of
TC-LS_TC-CS
bash scenarios/run_tc_ls_tc_cs.sh <method-key> "<model-name>"
- The scenario of
TC-LS_CS
bash scenarios/run_tc_ls_cs.sh <method-key> "<model-name>"
We rewrote this repository using test-time-adaptation benchmark as the default toolkits.