Image Classification
English
TTA
GuillaumeVray commited on
Commit
02ba886
·
1 Parent(s): 1161884

Uploading files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitignore +141 -0
  2. README.md +102 -0
  3. augmentations/augmix_ops.py +146 -0
  4. augmentations/transforms_cotta.py +166 -0
  5. cfgs/ccc/resnet50/eata.yaml +22 -0
  6. cfgs/ccc/resnet50/eata_reservoir.yaml +26 -0
  7. cfgs/ccc/resnet50/eta.yaml +20 -0
  8. cfgs/ccc/resnet50/eta_reservoir.yaml +26 -0
  9. cfgs/ccc/resnet50/rdumb.yaml +22 -0
  10. cfgs/ccc/resnet50/roid.yaml +20 -0
  11. cfgs/ccc/resnet50/roid_reservoir.yaml +25 -0
  12. cfgs/ccc/resnet50/sar.yaml +17 -0
  13. cfgs/ccc/resnet50/sar_reservoir.yaml +22 -0
  14. cfgs/ccc/resnet50/source.yaml +11 -0
  15. cfgs/ccc/resnet50/tent.yaml +18 -0
  16. cfgs/ccc/resnet50/tent_reservoir.yaml +23 -0
  17. cfgs/ccc/vit_b_16/dpcore.yaml +27 -0
  18. cfgs/ccc/vit_b_16/eata.yaml +22 -0
  19. cfgs/ccc/vit_b_16/eata_reservoir.yaml +26 -0
  20. cfgs/ccc/vit_b_16/eta.yaml +21 -0
  21. cfgs/ccc/vit_b_16/eta_reservoir.yaml +24 -0
  22. cfgs/ccc/vit_b_16/prompt_reservoir.yaml +36 -0
  23. cfgs/ccc/vit_b_16/rdumb.yaml +21 -0
  24. cfgs/ccc/vit_b_16/roid.yaml +20 -0
  25. cfgs/ccc/vit_b_16/roid_reservoir.yaml +25 -0
  26. cfgs/ccc/vit_b_16/sar.yaml +17 -0
  27. cfgs/ccc/vit_b_16/sar_reservoir.yaml +22 -0
  28. cfgs/ccc/vit_b_16/source_vit.yaml +11 -0
  29. cfgs/ccc/vit_b_16/tent.yaml +17 -0
  30. cfgs/ccc/vit_b_16/tent_reservoir.yaml +22 -0
  31. cfgs/cifar100_c/Standard/eata.yaml +36 -0
  32. cfgs/cifar100_c/Standard/eata_reservoir.yaml +39 -0
  33. cfgs/cifar100_c/Standard/eta.yaml +34 -0
  34. cfgs/cifar100_c/Standard/eta_reservoir.yaml +39 -0
  35. cfgs/cifar100_c/Standard/rdumb.yaml +36 -0
  36. cfgs/cifar100_c/Standard/roid.yaml +34 -0
  37. cfgs/cifar100_c/Standard/roid_reservoir.yaml +39 -0
  38. cfgs/cifar100_c/Standard/sar.yaml +35 -0
  39. cfgs/cifar100_c/Standard/sar_reservoir.yaml +36 -0
  40. cfgs/cifar100_c/Standard/source.yaml +27 -0
  41. cfgs/cifar100_c/Standard/tent.yaml +31 -0
  42. cfgs/cifar100_c/Standard/tent_reservoir.yaml +36 -0
  43. cfgs/cifar10_c/Standard/eata.yaml +36 -0
  44. cfgs/cifar10_c/Standard/eata_reservoir.yaml +39 -0
  45. cfgs/cifar10_c/Standard/eta.yaml +34 -0
  46. cfgs/cifar10_c/Standard/eta_reservoir.yaml +39 -0
  47. cfgs/cifar10_c/Standard/rdumb.yaml +35 -0
  48. cfgs/cifar10_c/Standard/roid.yaml +31 -0
  49. cfgs/cifar10_c/Standard/roid_reservoir.yaml +39 -0
  50. cfgs/cifar10_c/Standard/sar.yaml +31 -0
.gitignore ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ cfgs_aba/
6
+ scratch/
7
+ features
8
+ wandb
9
+ # C extensions
10
+ *.so
11
+ output
12
+ ckpt
13
+ data
14
+ *.pkl
15
+ # Distribution / packaging
16
+ .Python
17
+ build/
18
+ develop-eggs/
19
+ dist/
20
+ downloads/
21
+ eggs/
22
+ .eggs/
23
+ lib/
24
+ lib64/
25
+ parts/
26
+ sdist/
27
+ var/
28
+ wheels/
29
+ pip-wheel-metadata/
30
+ share/python-wheels/
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+ MANIFEST
35
+
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a template
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+
42
+ # Installer logs
43
+ pip-log.txt
44
+ pip-delete-this-directory.txt
45
+
46
+ # Unit test / coverage reports
47
+ htmlcov/
48
+ .tox/
49
+ .nox/
50
+ .coverage
51
+ .coverage.*
52
+ .cache
53
+ nosetests.xml
54
+ coverage.xml
55
+ *.cover
56
+ *.py,cover
57
+ .hypothesis/
58
+ .pytest_cache/
59
+
60
+ # Translations
61
+ *.mo
62
+ *.pot
63
+
64
+ # Django stuff:
65
+ *.log
66
+ local_settings.py
67
+ db.sqlite3
68
+ db.sqlite3-journal
69
+
70
+ # Flask stuff:
71
+ instance/
72
+ .webassets-cache
73
+
74
+ # Scrapy stuff:
75
+ .scrapy
76
+
77
+ # Sphinx documentation
78
+ docs/_build/
79
+
80
+ # PyBuilder
81
+ target/
82
+
83
+ # Jupyter Notebook
84
+ .ipynb_checkpoints
85
+
86
+ # IPython
87
+ profile_default/
88
+ ipython_config.py
89
+
90
+ # pyenv
91
+ .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ #Pipfile.lock
99
+
100
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
101
+ __pypackages__/
102
+
103
+ # Celery stuff
104
+ celerybeat-schedule
105
+ celerybeat.pid
106
+
107
+ # SageMath parsed files
108
+ *.sage.py
109
+
110
+ # Environments
111
+ .env
112
+ .venv
113
+ env/
114
+ venv/
115
+ ENV/
116
+ env.bak/
117
+ venv.bak/
118
+
119
+ # Spyder project settings
120
+ .spyderproject
121
+ .spyproject
122
+
123
+ # Rope project settings
124
+ .ropeproject
125
+
126
+ # mkdocs documentation
127
+ /site
128
+
129
+ # mypy
130
+ .mypy_cache/
131
+ .dmypy.json
132
+ dmypy.json
133
+
134
+ # Pyre type checker
135
+ .pyre/
136
+ *.ipynb
137
+ *.sh
138
+ classification/scripts/
139
+ classification/output*
140
+ classification_test/
141
+ classification/visualize.ipynb
README.md ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ReservoirTTA
2
+
3
+ <a href="https://arxiv.org/pdf/2505.14511?"><img src="https://img.shields.io/badge/arxiv-orange"></a>
4
+
5
+ This repository contains the official Pytorch implementation of under review paper: "ReservoirTTA: Prolonged Test-time Adaptation for Evolving and Recurring Domains"
6
+
7
+ ## Abstract
8
+ This paper introduces **ReservoirTTA**, a novel plug–in framework designed for prolonged test–time adaptation (TTA) in scenarios where the test domain continuously shifts over time, including cases where domains recur or evolve gradually. At its core, ReservoirTTA maintains a reservoir of domain-specialized models—an adaptive test-time model ensemble—that both detects new domains via online clustering over style features of incoming samples and routes each sample to the appropriate specialized model, and thereby enables domain-specific adaptation. This multi-model strategy overcomes key limitations of single model adaptation, such as catastrophic forgetting, inter-domain interference, and error accumulation, ensuring robust and stable performance on sustained non-stationary test distributions. Our theoretical analysis reveals key components that bound parameter variance and prevent model collapse, while our plug–in TTA module mitigates catastrophic forgetting of previously encountered domains. Extensive experiments on the classification corruption benchmarks, including ImageNet-C and CIFAR-10/100-C, as well as the Cityscapes→ACDC semantic segmentation task, covering recurring and continuously evolving domain shifts, demonstrate that ReservoirTTA significantly improves adaptation accuracy and maintains stable performance across prolonged, recurring shifts, outperforming state-of-the-art methods.
9
+
10
+ ## Overview
11
+
12
+ <img src="figs/introduction.png" alt="image" style="width:auto;height:auto;">
13
+
14
+ <b>Recurring test-time adaptation scenarios. Left: </b> Visual domains can recur over time; ETA, lacking regularization, steadily degrades under these repeated shifts. <b>Right:</b> A zoom-in on the snow corruption across 20 recurrences shows that EATA remains overall stable but still exhibits error spikes on returning to the same corruption across recurrences. <b> ReservoirTTA </b> detects returning domains and reuses specialized models to preserve learned knowledge, delivering improved robustness and faster (re-)adaptation over successive recurrences.
15
+
16
+ <br>
17
+ <br>
18
+ <br>
19
+
20
+ <img src="figs/method.png" alt="image" style="width:auto;height:auto;">
21
+
22
+ <b>Overview of ReservoirTTA.</b> ReservoirTTA operates in four stages: (1) <b>Style Characterization and Domain Identification</b> extracts early convolutional features and assigns incoming test batches to a style cluster via an online clustering mechanism; (2) <b>Model Reservoir Initialization</b> adds a new model for a detected domain, initializing it with parameters that maximize prediction mutual information; (3) <b>Model Reservoir Adaptation</b> selectively adapts the most relevant model using TTA methods; and (4) <b>Model Prediction</b> is then obtained via the ensemble’s parameters.
23
+
24
+ ## Prerequisites
25
+ To use the repository please use the following conda environment
26
+
27
+ ```
28
+ conda update conda
29
+ conda env create -f environment.yml
30
+ conda activate reservoirtta
31
+ ```
32
+
33
+ ## Run
34
+ To execute the code, use the following command:
35
+
36
+ ```
37
+ python test_time.py --cfg <config_filename>
38
+ ```
39
+
40
+ Replace `<config_filename>` with the appropriate configuration file located in the `cfgs` directory.
41
+
42
+ ### Examples
43
+ To run experiments on CIFAR100-C with the CSC setting:
44
+
45
+ - **ETA**:
46
+ ```
47
+ python test_time.py --cfg cfgs/cifar100_c/Standard/eta.yaml
48
+ ```
49
+ - **EATA**:
50
+ ```
51
+ python test_time.py --cfg cfgs/cifar100_c/Standard/eata.yaml
52
+ ```
53
+ - **EATA+ReservoirTTA**:
54
+ ```
55
+ python test_time.py --cfg cfgs/cifar100_c/Standard/eata_reservoir.yaml
56
+ ```
57
+
58
+ To run experiments on CIFAR10-C with the CDC setting:
59
+
60
+ - **ROID**:
61
+ ```
62
+ python test_time.py --cfg cfgs/cifar10_c/Standard/roid.yaml SETTING continual_cdc
63
+ ```
64
+ - **ROID+ReservoirTTA**:
65
+ ```
66
+ python test_time.py --cfg cfgs/cifar10_c/Standard/roid_reservoir.yaml SETTING continual_cdc
67
+ ```
68
+
69
+ ### Parameters to Tune
70
+ The default configurations are defined in `conf.py`. Below is a detailed explanation of the key parameters you can adjust:
71
+
72
+ #### General Parameters
73
+ - **`DATA_DIR`**: Specifies the path to the data directory where datasets are stored.
74
+ - **`SETTING`**: Defines the Test-Time Adaptation (TTA) protocol. Options include:
75
+ - `"continual"`: For the Continual Shifting Corruption (CSC) setting.
76
+ - `"continual_cdc"`: For the Continual Domain Corruption (CDC) setting.
77
+ - **`CORRUPTION.RECUR`**: Indicates the number of recurrences for the corruption.
78
+
79
+ #### ReservoirTTA-Specific Parameters
80
+ - **`RESERVOIRTTA.MAX_NUM_MODELS`**: The maximum number of models allowed in the reservoir.
81
+ - **`RESERVOIRTTA.SIZE_OF_BUFFER`**: The size of the style reservoir buffer used for storing style features.
82
+ - **`RESERVOIRTTA.QUANTILE_THR`**: The quantile threshold used to set the new domain detector threshold.
83
+ - **`RESERVOIRTTA.ENSEMBLING`**: A boolean flag to enable or disable weight ensembling for predictions.
84
+ - **`RESERVOIRTTA.SAMPLING`**: Specifies the method used to sample features from the style reservoir.
85
+ - **`RESERVOIRTTA.INIT`**: Defines the method for initializing a new model in the reservoir.
86
+ - **`RESERVOIRTTA.STYLE_IDX`**: A list of layers from the frozen VGG model to use as style extractors.
87
+ - **`RESERVOIRTTA.STYLE_FORMAT`**: Specifies the function type used to compute the style features from the frozen VGG model.
88
+
89
+ These parameters allow you to customize the behavior of the framework to suit your specific use case or dataset.
90
+
91
+ ## Thanks
92
+ Our code is derived from https://github.com/mariodoebler/test-time-adaptation. Please follow this repository to download datasets under `data` for CIFAR10-C, CIFAR100-C, ImageNet-C, and CCC.
93
+
94
+ ## Cite
95
+ ```
96
+ @article{vray2025reservoirtta,
97
+ title={ReservoirTTA: Prolonged Test-time Adaptation for Evolving and Recurring Domains},
98
+ author={Vray, Guillaume and Tomar, Devavrat and Gao, Xufeng and Thiran, Jean-Philippe and Shelhamer, Evan and Bozorgtabar, Behzad},
99
+ journal={arXiv preprint arXiv:2505.14511},
100
+ year={2025}
101
+ }
102
+ ```
augmentations/augmix_ops.py ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2019 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+ """Base augmentations operators."""
16
+
17
+ import numpy as np
18
+ from PIL import Image, ImageOps, ImageEnhance
19
+
20
+
21
+ def int_parameter(level, maxval):
22
+ """Helper function to scale `val` between 0 and maxval .
23
+
24
+ Args:
25
+ level: Level of the operation that will be between [0, `PARAMETER_MAX`].
26
+ maxval: Maximum value that the operation can have. This will be scaled to
27
+ level/PARAMETER_MAX.
28
+
29
+ Returns:
30
+ An int that results from scaling `maxval` according to `level`.
31
+ """
32
+ return int(level * maxval / 10)
33
+
34
+
35
+ def float_parameter(level, maxval):
36
+ """Helper function to scale `val` between 0 and maxval.
37
+
38
+ Args:
39
+ level: Level of the operation that will be between [0, `PARAMETER_MAX`].
40
+ maxval: Maximum value that the operation can have. This will be scaled to
41
+ level/PARAMETER_MAX.
42
+
43
+ Returns:
44
+ A float that results from scaling `maxval` according to `level`.
45
+ """
46
+ return float(level) * maxval / 10.
47
+
48
+
49
+ def sample_level(n):
50
+ return np.random.uniform(low=0.1, high=n)
51
+
52
+
53
+ def autocontrast(pil_img, *args):
54
+ return ImageOps.autocontrast(pil_img)
55
+
56
+
57
+ def equalize(pil_img, *args):
58
+ return ImageOps.equalize(pil_img)
59
+
60
+
61
+ def posterize(pil_img, level, _):
62
+ level = int_parameter(sample_level(level), 4)
63
+ return ImageOps.posterize(pil_img, 4 - level)
64
+
65
+
66
+ def rotate(pil_img, level, _):
67
+ degrees = int_parameter(sample_level(level), 30)
68
+ if np.random.uniform() > 0.5:
69
+ degrees = -degrees
70
+ return pil_img.rotate(degrees, resample=Image.BILINEAR)
71
+
72
+
73
+ def solarize(pil_img, level, _):
74
+ level = int_parameter(sample_level(level), 256)
75
+ return ImageOps.solarize(pil_img, 256 - level)
76
+
77
+
78
+ def shear_x(pil_img, level, img_size):
79
+ level = float_parameter(sample_level(level), 0.3)
80
+ if np.random.uniform() > 0.5:
81
+ level = -level
82
+ return pil_img.transform((img_size, img_size),
83
+ Image.AFFINE, (1, level, 0, 0, 1, 0),
84
+ resample=Image.BILINEAR)
85
+
86
+
87
+ def shear_y(pil_img, level, img_size):
88
+ level = float_parameter(sample_level(level), 0.3)
89
+ if np.random.uniform() > 0.5:
90
+ level = -level
91
+ return pil_img.transform((img_size, img_size),
92
+ Image.AFFINE, (1, 0, 0, level, 1, 0),
93
+ resample=Image.BILINEAR)
94
+
95
+
96
+ def translate_x(pil_img, level, img_size):
97
+ level = int_parameter(sample_level(level), img_size / 3)
98
+ if np.random.random() > 0.5:
99
+ level = -level
100
+ return pil_img.transform((img_size, img_size),
101
+ Image.AFFINE, (1, 0, level, 0, 1, 0),
102
+ resample=Image.BILINEAR)
103
+
104
+
105
+ def translate_y(pil_img, level, img_size):
106
+ level = int_parameter(sample_level(level), img_size / 3)
107
+ if np.random.random() > 0.5:
108
+ level = -level
109
+ return pil_img.transform((img_size, img_size),
110
+ Image.AFFINE, (1, 0, 0, 0, 1, level),
111
+ resample=Image.BILINEAR)
112
+
113
+
114
+ # operation that overlaps with ImageNet-C's test set
115
+ def color(pil_img, level, _):
116
+ level = float_parameter(sample_level(level), 1.8) + 0.1
117
+ return ImageEnhance.Color(pil_img).enhance(level)
118
+
119
+
120
+ # operation that overlaps with ImageNet-C's test set
121
+ def contrast(pil_img, level, _):
122
+ level = float_parameter(sample_level(level), 1.8) + 0.1
123
+ return ImageEnhance.Contrast(pil_img).enhance(level)
124
+
125
+
126
+ # operation that overlaps with ImageNet-C's test set
127
+ def brightness(pil_img, level, _):
128
+ level = float_parameter(sample_level(level), 1.8) + 0.1
129
+ return ImageEnhance.Brightness(pil_img).enhance(level)
130
+
131
+
132
+ # operation that overlaps with ImageNet-C's test set
133
+ def sharpness(pil_img, level, _):
134
+ level = float_parameter(sample_level(level), 1.8) + 0.1
135
+ return ImageEnhance.Sharpness(pil_img).enhance(level)
136
+
137
+
138
+ augmentations = [
139
+ autocontrast, equalize, posterize, rotate, solarize, shear_x, shear_y,
140
+ translate_x, translate_y
141
+ ]
142
+
143
+ augmentations_all = [
144
+ autocontrast, equalize, posterize, rotate, solarize, shear_x, shear_y,
145
+ translate_x, translate_y, color, contrast, brightness, sharpness
146
+ ]
augmentations/transforms_cotta.py ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # KATANA: Simple Post-Training Robustness Using Test Time Augmentations
2
+ # https://arxiv.org/pdf/2109.08191v1.pdf
3
+ import PIL
4
+ import torch
5
+ import torchvision.transforms.functional as F
6
+ import torchvision.transforms as transforms
7
+ from torchvision.transforms import ColorJitter, Compose, Lambda
8
+ from numpy import random
9
+
10
+
11
+ class GaussianNoise(torch.nn.Module):
12
+ def __init__(self, mean=0., std=1.):
13
+ super().__init__()
14
+ self.std = std
15
+ self.mean = mean
16
+
17
+ def forward(self, img):
18
+ noise = torch.randn(img.size()) * self.std + self.mean
19
+ noise = noise.to(img.device)
20
+ return img + noise
21
+
22
+ def __repr__(self):
23
+ return self.__class__.__name__ + '(mean={0}, std={1})'.format(self.mean, self.std)
24
+
25
+
26
+ class Clip(torch.nn.Module):
27
+ def __init__(self, min_val=0., max_val=1.):
28
+ super().__init__()
29
+ self.min_val = min_val
30
+ self.max_val = max_val
31
+
32
+ def forward(self, img):
33
+ return torch.clip(img, self.min_val, self.max_val)
34
+
35
+ def __repr__(self):
36
+ return self.__class__.__name__ + '(min_val={0}, max_val={1})'.format(self.min_val, self.max_val)
37
+
38
+
39
+ class ColorJitterPro(ColorJitter):
40
+ """Randomly change the brightness, contrast, saturation, and gamma correction of an image."""
41
+
42
+ def __init__(self, brightness=0, contrast=0, saturation=0, hue=0, gamma=0):
43
+ super().__init__(brightness, contrast, saturation, hue)
44
+ self.gamma = self._check_input(gamma, 'gamma')
45
+
46
+ @staticmethod
47
+ @torch.jit.unused
48
+ def get_params(brightness, contrast, saturation, hue, gamma):
49
+ """Get a randomized transform to be applied on image.
50
+
51
+ Arguments are same as that of __init__.
52
+
53
+ Returns:
54
+ Transform which randomly adjusts brightness, contrast and
55
+ saturation in a random order.
56
+ """
57
+ transforms = []
58
+
59
+ if brightness is not None:
60
+ brightness_factor = random.uniform(brightness[0], brightness[1])
61
+ transforms.append(Lambda(lambda img: F.adjust_brightness(img, brightness_factor)))
62
+
63
+ if contrast is not None:
64
+ contrast_factor = random.uniform(contrast[0], contrast[1])
65
+ transforms.append(Lambda(lambda img: F.adjust_contrast(img, contrast_factor)))
66
+
67
+ if saturation is not None:
68
+ saturation_factor = random.uniform(saturation[0], saturation[1])
69
+ transforms.append(Lambda(lambda img: F.adjust_saturation(img, saturation_factor)))
70
+
71
+ if hue is not None:
72
+ hue_factor = random.uniform(hue[0], hue[1])
73
+ transforms.append(Lambda(lambda img: F.adjust_hue(img, hue_factor)))
74
+
75
+ if gamma is not None:
76
+ gamma_factor = random.uniform(gamma[0], gamma[1])
77
+ transforms.append(Lambda(lambda img: F.adjust_gamma(img, gamma_factor)))
78
+
79
+ random.shuffle(transforms)
80
+ transform = Compose(transforms)
81
+
82
+ return transform
83
+
84
+ def forward(self, img):
85
+ """
86
+ Args:
87
+ img (PIL Image or Tensor): Input image.
88
+
89
+ Returns:
90
+ PIL Image or Tensor: Color jittered image.
91
+ """
92
+ fn_idx = torch.randperm(5)
93
+ for fn_id in fn_idx:
94
+ if fn_id == 0 and self.brightness is not None:
95
+ brightness = self.brightness
96
+ brightness_factor = torch.tensor(1.0).uniform_(brightness[0], brightness[1]).item()
97
+ img = F.adjust_brightness(img, brightness_factor)
98
+
99
+ if fn_id == 1 and self.contrast is not None:
100
+ contrast = self.contrast
101
+ contrast_factor = torch.tensor(1.0).uniform_(contrast[0], contrast[1]).item()
102
+ img = F.adjust_contrast(img, contrast_factor)
103
+
104
+ if fn_id == 2 and self.saturation is not None:
105
+ saturation = self.saturation
106
+ saturation_factor = torch.tensor(1.0).uniform_(saturation[0], saturation[1]).item()
107
+ img = F.adjust_saturation(img, saturation_factor)
108
+
109
+ if fn_id == 3 and self.hue is not None:
110
+ hue = self.hue
111
+ hue_factor = torch.tensor(1.0).uniform_(hue[0], hue[1]).item()
112
+ img = F.adjust_hue(img, hue_factor)
113
+
114
+ if fn_id == 4 and self.gamma is not None:
115
+ gamma = self.gamma
116
+ gamma_factor = torch.tensor(1.0).uniform_(gamma[0], gamma[1]).item()
117
+ img = img.clamp(1e-8, 1.0) # to fix Nan values in gradients, which happens when applying gamma
118
+ # after contrast
119
+ img = F.adjust_gamma(img, gamma_factor)
120
+
121
+ return img
122
+
123
+ def __repr__(self):
124
+ format_string = self.__class__.__name__ + '('
125
+ format_string += 'brightness={0}'.format(self.brightness)
126
+ format_string += ', contrast={0}'.format(self.contrast)
127
+ format_string += ', saturation={0}'.format(self.saturation)
128
+ format_string += ', hue={0})'.format(self.hue)
129
+ format_string += ', gamma={0})'.format(self.gamma)
130
+ return format_string
131
+
132
+
133
+ def get_tta_transforms(img_size, gaussian_std: float=0.005, soft=False, padding_mode='edge', cotta_augs=True):
134
+ n_pixels = img_size[0] if isinstance(img_size, (list, tuple)) else img_size
135
+
136
+ tta_transforms = [
137
+ Clip(0.0, 1.0),
138
+ ColorJitterPro(
139
+ brightness=[0.8, 1.2] if soft else [0.6, 1.4],
140
+ contrast=[0.85, 1.15] if soft else [0.7, 1.3],
141
+ saturation=[0.75, 1.25] if soft else [0.5, 1.5],
142
+ hue=[-0.03, 0.03] if soft else [-0.06, 0.06],
143
+ gamma=[0.85, 1.15] if soft else [0.7, 1.3]
144
+ ),
145
+ transforms.Pad(padding=int(n_pixels / 2), padding_mode=padding_mode),
146
+ transforms.RandomAffine(
147
+ degrees=[-8, 8] if soft else [-15, 15],
148
+ translate=(1/16, 1/16),
149
+ scale=(0.95, 1.05) if soft else (0.9, 1.1),
150
+ shear=None,
151
+ interpolation=PIL.Image.BILINEAR,
152
+ fill=0
153
+ )
154
+ ]
155
+ if cotta_augs:
156
+ tta_transforms += [transforms.GaussianBlur(kernel_size=5, sigma=[0.001, 0.25] if soft else [0.001, 0.5]),
157
+ transforms.CenterCrop(size=n_pixels),
158
+ transforms.RandomHorizontalFlip(p=0.5),
159
+ GaussianNoise(0, gaussian_std),
160
+ Clip(0.0, 1.0)]
161
+ else:
162
+ tta_transforms += [transforms.CenterCrop(size=n_pixels),
163
+ transforms.RandomHorizontalFlip(p=0.5),
164
+ Clip(0.0, 1.0)]
165
+
166
+ return transforms.Compose(tta_transforms)
cfgs/ccc/resnet50/eata.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ ARCH: resnet50
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 0.00025
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
18
+ EATA:
19
+ FISHER_ALPHA: 2000.0
20
+ D_MARGIN: 0.05
21
+ SOURCE:
22
+ NUM_SAMPLES: 2000
cfgs/ccc/resnet50/eata_reservoir.yaml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata_reservoirtta
3
+ ARCH: resnet50
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 0.00025
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
18
+ EATA:
19
+ FISHER_ALPHA: 2000.0
20
+ D_MARGIN: 0.05
21
+ SOURCE:
22
+ NUM_SAMPLES: 2000
23
+ RESERVOIRTTA:
24
+ MAX_NUM_MODELS: 16
25
+ SIZE_OF_BUFFER: 1024
26
+
cfgs/ccc/resnet50/eta.yaml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ ARCH: resnet50
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 0.00025
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
18
+ EATA:
19
+ FISHER_ALPHA: 0.0
20
+ D_MARGIN: 0.05
cfgs/ccc/resnet50/eta_reservoir.yaml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata_reservoirtta
3
+ ARCH: resnet50
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 0.00025
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
18
+ EATA:
19
+ FISHER_ALPHA: 0.0
20
+ D_MARGIN: 0.05
21
+ SOURCE:
22
+ NUM_SAMPLES: 2000
23
+ RESERVOIRTTA:
24
+ MAX_NUM_MODELS: 16
25
+ SIZE_OF_BUFFER: 1024
26
+
cfgs/ccc/resnet50/rdumb.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ RESET_AFTER_NUM_UPDATES: 1000
4
+ ARCH: resnet50
5
+ TEST:
6
+ BATCH_SIZE: 64
7
+ CORRUPTION:
8
+ DATASET: ccc
9
+ SEVERITY:
10
+ - 5
11
+ TYPE:
12
+ - baseline_20_transition+speed_1000_seed_44
13
+ OPTIM:
14
+ BETA: 0.9
15
+ LR: 0.00025
16
+ METHOD: SGD
17
+ STEPS: 1
18
+ WD: 0.0
19
+ EATA:
20
+ FISHER_ALPHA: 0.0
21
+ D_MARGIN: 0.05
22
+
cfgs/ccc/resnet50/roid.yaml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CORRUPTION:
2
+ DATASET: ccc
3
+ SEVERITY:
4
+ - 5
5
+ TYPE:
6
+ - baseline_20_transition+speed_1000_seed_44
7
+ MODEL:
8
+ ADAPTATION: roid
9
+ ARCH: resnet50
10
+ OPTIM:
11
+ BETA: 0.9
12
+ LR: 0.00025
13
+ METHOD: SGD
14
+ STEPS: 1
15
+ WD: 0.0
16
+ TEST:
17
+ BATCH_SIZE: 64
18
+ ROID:
19
+ USE_CONSISTENCY: False
20
+ USE_PRIOR_CORRECTION: False
cfgs/ccc/resnet50/roid_reservoir.yaml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CORRUPTION:
2
+ DATASET: ccc
3
+ SEVERITY:
4
+ - 5
5
+ TYPE:
6
+ - baseline_20_transition+speed_1000_seed_44
7
+ MODEL:
8
+ ADAPTATION: roid_reservoirtta
9
+ ARCH: resnet50
10
+ OPTIM:
11
+ BETA: 0.9
12
+ LR: 0.00025
13
+ METHOD: SGD
14
+ STEPS: 1
15
+ WD: 0.0
16
+ TEST:
17
+ BATCH_SIZE: 64
18
+ ROID:
19
+ USE_CONSISTENCY: False
20
+ USE_PRIOR_CORRECTION: False
21
+ SOURCE:
22
+ NUM_SAMPLES: 2000
23
+ RESERVOIRTTA:
24
+ MAX_NUM_MODELS: 16
25
+ SIZE_OF_BUFFER: 4096
cfgs/ccc/resnet50/sar.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CORRUPTION:
2
+ DATASET: ccc
3
+ SEVERITY:
4
+ - 5
5
+ TYPE:
6
+ - baseline_20_transition+speed_1000_seed_44
7
+ MODEL:
8
+ ADAPTATION: sar
9
+ ARCH: resnet50
10
+ OPTIM:
11
+ BETA: 0.9
12
+ LR: 0.00025
13
+ METHOD: SGD
14
+ STEPS: 1
15
+ WD: 0.0
16
+ TEST:
17
+ BATCH_SIZE: 64
cfgs/ccc/resnet50/sar_reservoir.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CORRUPTION:
2
+ DATASET: ccc
3
+ SEVERITY:
4
+ - 5
5
+ TYPE:
6
+ - baseline_20_transition+speed_1000_seed_44
7
+ MODEL:
8
+ ADAPTATION: sar_reservoirtta
9
+ ARCH: resnet50
10
+ OPTIM:
11
+ BETA: 0.9
12
+ LR: 0.00025
13
+ METHOD: SGD
14
+ STEPS: 1
15
+ WD: 0.0
16
+ TEST:
17
+ BATCH_SIZE: 64
18
+ SOURCE:
19
+ NUM_SAMPLES: 2000
20
+ RESERVOIRTTA:
21
+ MAX_NUM_MODELS: 16
22
+ SIZE_OF_BUFFER: 1024
cfgs/ccc/resnet50/source.yaml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: source
3
+ ARCH: resnet50
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
cfgs/ccc/resnet50/tent.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: tent
3
+ ARCH: resnet50
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 0.00025
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
18
+
cfgs/ccc/resnet50/tent_reservoir.yaml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: tent_reservoirtta
3
+ ARCH: resnet50
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 0.00025
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
18
+ SOURCE:
19
+ NUM_SAMPLES: 2000
20
+ RESERVOIRTTA:
21
+ MAX_NUM_MODELS: 16
22
+ SIZE_OF_BUFFER: 1024
23
+
cfgs/ccc/vit_b_16/dpcore.yaml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: dpcore
3
+ ARCH: Standard_VITB
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ METHOD: AdamW
14
+ STEPS: 1
15
+ MOMENTUM: 0.9
16
+ LR: 0.01
17
+ WD: 0.01
18
+ BETA: 0.9
19
+ DPCORE:
20
+ TEMP_TAU: 3.0
21
+ EMA_ALPHA: 0.999
22
+ THR_RHO: 0.8
23
+ E_ID: 1
24
+ E_OOD: 50
25
+ NUM_PROMPTS: 8
26
+ SRC_NUM_SAMPLES: 300
27
+ MAX_PROTOTYPES: 2000
cfgs/ccc/vit_b_16/eata.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ ARCH: Standard_VITB
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 1e-4
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
18
+ EATA:
19
+ FISHER_ALPHA: 2000.0
20
+ D_MARGIN: 0.05
21
+ SOURCE:
22
+ NUM_SAMPLES: 2000
cfgs/ccc/vit_b_16/eata_reservoir.yaml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata_reservoirtta
3
+ ARCH: Standard_VITB
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 1e-4
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
18
+ EATA:
19
+ FISHER_ALPHA: 2000.0
20
+ D_MARGIN: 0.05
21
+ MOMENTUM_SRC: 1.0
22
+ SOURCE:
23
+ NUM_SAMPLES: 2000
24
+ RESERVOIRTTA:
25
+ MAX_NUM_MODELS: 16
26
+ SIZE_OF_BUFFER: 1024
cfgs/ccc/vit_b_16/eta.yaml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ ARCH: Standard_VITB
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 1e-4
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
18
+ EATA:
19
+ FISHER_ALPHA: 0.0
20
+ D_MARGIN: 0.05
21
+
cfgs/ccc/vit_b_16/eta_reservoir.yaml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata_reservoirtta
3
+ ARCH: Standard_VITB
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 1e-4
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
18
+ EATA:
19
+ FISHER_ALPHA: 0.0
20
+ D_MARGIN: 0.05
21
+ RESERVOIRTTA:
22
+ MAX_NUM_MODELS: 16
23
+ SIZE_OF_BUFFER: 1024
24
+ NUM_SAMPLES: 2000
cfgs/ccc/vit_b_16/prompt_reservoir.yaml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: prompt_reservoirtta
3
+ ARCH: Standard_VITB
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ METHOD: AdamW
14
+ STEPS: 1
15
+ MOMENTUM: 0.9
16
+ LR: 0.1
17
+ WD: 0.01
18
+ BETA: 0.9
19
+ DPCORE:
20
+ TEMP_TAU: 3.0
21
+ EMA_ALPHA: 0.999
22
+ THR_RHO: 0.8
23
+ E_ID: 1
24
+ E_OOD: 50
25
+ NUM_PROMPTS: 8
26
+ SRC_NUM_SAMPLES: 300
27
+ MAX_PROTOTYPES: 2000
28
+ RESERVOIRTTA:
29
+ MAX_NUM_MODELS: 64
30
+ SIZE_OF_BUFFER: 1024
31
+ ENSEMBLING: False
32
+ SOURCE_BUFFER: True
33
+ CENTROID_REG: True
34
+ NUM_SAMPLES: 2000
35
+ SOURCE:
36
+ NUM_SAMPLES: 2000
cfgs/ccc/vit_b_16/rdumb.yaml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ RESET_AFTER_NUM_UPDATES: 1000
4
+ ARCH: Standard_VITB
5
+ TEST:
6
+ BATCH_SIZE: 64
7
+ CORRUPTION:
8
+ DATASET: ccc
9
+ SEVERITY:
10
+ - 5
11
+ TYPE:
12
+ - baseline_20_transition+speed_1000_seed_44
13
+ OPTIM:
14
+ BETA: 0.9
15
+ LR: 1e-4
16
+ METHOD: SGD
17
+ STEPS: 1
18
+ WD: 0.0
19
+ EATA:
20
+ FISHER_ALPHA: 0.0
21
+ D_MARGIN: 0.05
cfgs/ccc/vit_b_16/roid.yaml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CORRUPTION:
2
+ DATASET: ccc
3
+ SEVERITY:
4
+ - 5
5
+ TYPE:
6
+ - baseline_20_transition+speed_1000_seed_44
7
+ MODEL:
8
+ ADAPTATION: roid
9
+ ARCH: Standard_VITB
10
+ OPTIM:
11
+ BETA: 0.9
12
+ LR: 1e-4
13
+ METHOD: SGD
14
+ STEPS: 1
15
+ WD: 0.0
16
+ TEST:
17
+ BATCH_SIZE: 64
18
+ ROID:
19
+ USE_CONSISTENCY: False
20
+ USE_PRIOR_CORRECTION: False
cfgs/ccc/vit_b_16/roid_reservoir.yaml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CORRUPTION:
2
+ DATASET: ccc
3
+ SEVERITY:
4
+ - 5
5
+ TYPE:
6
+ - baseline_20_transition+speed_1000_seed_44
7
+ MODEL:
8
+ ADAPTATION: roid_reservoirtta
9
+ ARCH: Standard_VITB
10
+ OPTIM:
11
+ BETA: 0.9
12
+ LR: 1e-4
13
+ METHOD: SGD
14
+ STEPS: 1
15
+ WD: 0.0
16
+ TEST:
17
+ BATCH_SIZE: 64
18
+ RESERVOIRTTA:
19
+ MAX_NUM_MODELS: 16
20
+ SIZE_OF_BUFFER: 4096
21
+ SOURCE:
22
+ NUM_SAMPLES: 2000
23
+ ROID:
24
+ USE_CONSISTENCY: False
25
+ USE_PRIOR_CORRECTION: False
cfgs/ccc/vit_b_16/sar.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CORRUPTION:
2
+ DATASET: ccc
3
+ SEVERITY:
4
+ - 5
5
+ TYPE:
6
+ - baseline_20_transition+speed_1000_seed_44
7
+ MODEL:
8
+ ADAPTATION: sar
9
+ ARCH: Standard_VITB
10
+ OPTIM:
11
+ BETA: 0.9
12
+ LR: 1e-4
13
+ METHOD: SGD
14
+ STEPS: 1
15
+ WD: 0.0
16
+ TEST:
17
+ BATCH_SIZE: 64
cfgs/ccc/vit_b_16/sar_reservoir.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CORRUPTION:
2
+ DATASET: ccc
3
+ SEVERITY:
4
+ - 5
5
+ TYPE:
6
+ - baseline_20_transition+speed_1000_seed_44
7
+ MODEL:
8
+ ADAPTATION: sar_reservoirtta
9
+ ARCH: Standard_VITB
10
+ OPTIM:
11
+ BETA: 0.9
12
+ LR: 1e-4
13
+ METHOD: SGD
14
+ STEPS: 1
15
+ WD: 0.0
16
+ TEST:
17
+ BATCH_SIZE: 64
18
+ RESERVOIRTTA:
19
+ MAX_NUM_MODELS: 16
20
+ SIZE_OF_BUFFER: 1024
21
+ SOURCE:
22
+ NUM_SAMPLES: 2000
cfgs/ccc/vit_b_16/source_vit.yaml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: source
3
+ ARCH: Standard_VITB
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
cfgs/ccc/vit_b_16/tent.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: tent
3
+ ARCH: Standard_VITB
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 1e-4
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
cfgs/ccc/vit_b_16/tent_reservoir.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: tent_reservoirtta
3
+ ARCH: Standard_VITB
4
+ TEST:
5
+ BATCH_SIZE: 64
6
+ CORRUPTION:
7
+ DATASET: ccc
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - baseline_20_transition+speed_1000_seed_44
12
+ OPTIM:
13
+ BETA: 0.9
14
+ LR: 1e-4
15
+ METHOD: SGD
16
+ STEPS: 1
17
+ WD: 0.0
18
+ RESERVOIRTTA:
19
+ MAX_NUM_MODELS: 16
20
+ SIZE_OF_BUFFER: 1024
21
+ SOURCE:
22
+ NUM_SAMPLES: 2000
cfgs/cifar100_c/Standard/eata.yaml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ ARCH: Hendrycks2020AugMix_ResNeXt
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar100_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ EATA:
33
+ FISHER_ALPHA: 2000.
34
+ D_MARGIN: 0.1
35
+ SOURCE:
36
+ NUM_SAMPLES: 2000
cfgs/cifar100_c/Standard/eata_reservoir.yaml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata_reservoirtta
3
+ ARCH: Hendrycks2020AugMix_ResNeXt
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar100_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ EATA:
33
+ FISHER_ALPHA: 2000.
34
+ D_MARGIN: 0.1
35
+ SOURCE:
36
+ NUM_SAMPLES: 2000
37
+ RESERVOIRTTA:
38
+ MAX_NUM_MODELS: 16
39
+ SIZE_OF_BUFFER: 1024
cfgs/cifar100_c/Standard/eta.yaml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ ARCH: Hendrycks2020AugMix_ResNeXt
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar100_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ EATA:
33
+ FISHER_ALPHA: 0.0
34
+ D_MARGIN: 0.1
cfgs/cifar100_c/Standard/eta_reservoir.yaml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata_reservoirtta
3
+ ARCH: Hendrycks2020AugMix_ResNeXt
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar100_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ EATA:
33
+ FISHER_ALPHA: 0.0
34
+ D_MARGIN: 0.1
35
+ RESERVOIRTTA:
36
+ MAX_NUM_MODELS: 16
37
+ SIZE_OF_BUFFER: 1024
38
+ SOURCE:
39
+ NUM_SAMPLES: 2000
cfgs/cifar100_c/Standard/rdumb.yaml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ RESET_AFTER_NUM_UPDATES: 1000
4
+ ARCH: Hendrycks2020AugMix_ResNeXt
5
+ TEST:
6
+ BATCH_SIZE: 200
7
+ CORRUPTION:
8
+ RECUR: 20
9
+ DATASET: cifar100_c
10
+ SEVERITY:
11
+ - 5
12
+ TYPE:
13
+ - gaussian_noise
14
+ - shot_noise
15
+ - impulse_noise
16
+ - defocus_blur
17
+ - glass_blur
18
+ - motion_blur
19
+ - zoom_blur
20
+ - snow
21
+ - frost
22
+ - fog
23
+ - brightness
24
+ - contrast
25
+ - elastic_transform
26
+ - pixelate
27
+ - jpeg_compression
28
+ OPTIM:
29
+ METHOD: Adam
30
+ STEPS: 1
31
+ BETA: 0.9
32
+ LR: 1e-3
33
+ WD: 0.
34
+ EATA:
35
+ FISHER_ALPHA: 0.0
36
+ D_MARGIN: 0.1
cfgs/cifar100_c/Standard/roid.yaml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: roid
3
+ ARCH: Hendrycks2020AugMix_ResNeXt
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar100_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ ROID:
33
+ USE_CONSISTENCY: False
34
+ USE_PRIOR_CORRECTION: False
cfgs/cifar100_c/Standard/roid_reservoir.yaml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: roid_reservoirtta
3
+ ARCH: Hendrycks2020AugMix_ResNeXt
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar100_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ ROID:
33
+ USE_CONSISTENCY: False
34
+ USE_PRIOR_CORRECTION: False
35
+ RESERVOIRTTA:
36
+ MAX_NUM_MODELS: 16
37
+ SIZE_OF_BUFFER: 1024
38
+ SOURCE:
39
+ NUM_SAMPLES: 2000
cfgs/cifar100_c/Standard/sar.yaml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: sar
3
+ ARCH: Hendrycks2020AugMix_ResNeXt
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar100_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+
33
+ EATA:
34
+ FISHER_ALPHA: 0.0
35
+ D_MARGIN: 0.1
cfgs/cifar100_c/Standard/sar_reservoir.yaml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: sar_reservoirtta
3
+ ARCH: Hendrycks2020AugMix_ResNeXt
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar100_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ RESERVOIRTTA:
33
+ MAX_NUM_MODELS: 16
34
+ SIZE_OF_BUFFER: 1024
35
+ SOURCE:
36
+ NUM_SAMPLES: 2000
cfgs/cifar100_c/Standard/source.yaml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: source
3
+ ARCH: Hendrycks2020AugMix_ResNeXt
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ RECUR: 1
8
+ DATASET: cifar100_c
9
+ SEVERITY:
10
+ - 5
11
+ TYPE:
12
+ - motion_blur
13
+ - snow
14
+ - fog
15
+ - shot_noise
16
+ - defocus_blur
17
+ - contrast
18
+ - zoom_blur
19
+ - brightness
20
+ - frost
21
+ - elastic_transform
22
+ - glass_blur
23
+ - gaussian_noise
24
+ - pixelate
25
+ - jpeg_compression
26
+ - impulse_noise
27
+
cfgs/cifar100_c/Standard/tent.yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: tent
3
+ ARCH: Hendrycks2020AugMix_ResNeXt
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar100_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
cfgs/cifar100_c/Standard/tent_reservoir.yaml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: tent_reservoirtta
3
+ ARCH: Hendrycks2020AugMix_ResNeXt
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar100_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ RESERVOIRTTA:
33
+ MAX_NUM_MODELS: 16
34
+ SIZE_OF_BUFFER: 1024
35
+ SOURCE:
36
+ NUM_SAMPLES: 2000
cfgs/cifar10_c/Standard/eata.yaml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ ARCH: Standard
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar10_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ EATA:
33
+ FISHER_ALPHA: 2000.
34
+ D_MARGIN: 0.4
35
+ SOURCE:
36
+ NUM_SAMPLES: 2000
cfgs/cifar10_c/Standard/eata_reservoir.yaml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata_reservoirtta
3
+ ARCH: Standard
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar10_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ EATA:
33
+ FISHER_ALPHA: 2000.
34
+ D_MARGIN: 0.4
35
+ SOURCE:
36
+ NUM_SAMPLES: 2000
37
+ RESERVOITTA:
38
+ MAX_NUM_MODELS: 16
39
+ SIZE_OF_BUFFER: 1024
cfgs/cifar10_c/Standard/eta.yaml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ ARCH: Standard
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar10_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ EATA:
33
+ FISHER_ALPHA: 0.0
34
+ D_MARGIN: 0.4
cfgs/cifar10_c/Standard/eta_reservoir.yaml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata_reservoirtta
3
+ ARCH: Standard
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar10_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ EATA:
33
+ FISHER_ALPHA: 0.0
34
+ D_MARGIN: 0.4
35
+ RESERVOIRTTA:
36
+ MAX_NUM_MODELS: 16
37
+ SIZE_OF_BUFFER: 1024
38
+ SOURCE:
39
+ NUM_SAMPLES: 2000
cfgs/cifar10_c/Standard/rdumb.yaml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: eata
3
+ RESET_AFTER_NUM_UPDATES: 1000
4
+ ARCH: Standard
5
+ TEST:
6
+ BATCH_SIZE: 200
7
+ CORRUPTION:
8
+ DATASET: cifar10_c
9
+ SEVERITY:
10
+ - 5
11
+ TYPE:
12
+ - gaussian_noise
13
+ - shot_noise
14
+ - impulse_noise
15
+ - defocus_blur
16
+ - glass_blur
17
+ - motion_blur
18
+ - zoom_blur
19
+ - snow
20
+ - frost
21
+ - fog
22
+ - brightness
23
+ - contrast
24
+ - elastic_transform
25
+ - pixelate
26
+ - jpeg_compression
27
+ OPTIM:
28
+ METHOD: Adam
29
+ STEPS: 1
30
+ BETA: 0.9
31
+ LR: 1e-3
32
+ WD: 0.
33
+ EATA:
34
+ FISHER_ALPHA: 0.0
35
+ D_MARGIN: 0.4
cfgs/cifar10_c/Standard/roid.yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: roid
3
+ ARCH: Standard
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar10_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
cfgs/cifar10_c/Standard/roid_reservoir.yaml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: roid_reservoirtta
3
+ ARCH: Standard
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar10_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.
32
+ RESERVOIRTTA:
33
+ MAX_NUM_MODELS: 16
34
+ SIZE_OF_BUFFER: 1024
35
+ ROID:
36
+ USE_CONSISTENCY: False
37
+ USE_PRIOR_CORRECTION: False
38
+ SOURCE:
39
+ NUM_SAMPLES: 2000
cfgs/cifar10_c/Standard/sar.yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MODEL:
2
+ ADAPTATION: sar
3
+ ARCH: Standard
4
+ TEST:
5
+ BATCH_SIZE: 200
6
+ CORRUPTION:
7
+ DATASET: cifar10_c
8
+ SEVERITY:
9
+ - 5
10
+ TYPE:
11
+ - gaussian_noise
12
+ - shot_noise
13
+ - impulse_noise
14
+ - defocus_blur
15
+ - glass_blur
16
+ - motion_blur
17
+ - zoom_blur
18
+ - snow
19
+ - frost
20
+ - fog
21
+ - brightness
22
+ - contrast
23
+ - elastic_transform
24
+ - pixelate
25
+ - jpeg_compression
26
+ OPTIM:
27
+ METHOD: Adam
28
+ STEPS: 1
29
+ BETA: 0.9
30
+ LR: 1e-3
31
+ WD: 0.