Skip to content

Commit 8d44375

Browse files
authored
Merge pull request #165 from zjysteven/main
Minor fix
2 parents 5155ea6 + fb76ad5 commit 8d44375

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

CONTRIBUTING.md

+19
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,22 @@ From the repository folder
4747
```shell
4848
pre-commit install
4949
```
50+
51+
## Contributing to OpenOOD leaderboard
52+
53+
We welcome new entries submitted to the leaderboard. Please follow the instructions below to submit your results.
54+
55+
1. Evaluate your model/method with OpenOOD's benchmark and evaluator such that the comparison is fair.
56+
57+
2. Report your new results by opening an issue. Remember to specify the following information:
58+
59+
- **`Training`**: The training method of your model, e.g., `CrossEntropy`.
60+
- **`Postprocessor`**: The postprocessor of your model, e.g., `MSP`, `ReAct`, etc.
61+
- **`Near-OOD AUROC`**: The AUROC score of your model on the near-OOD split.
62+
- **`Far-OOD AUROC`**: The AUROC score of your model on the far-OOD split.
63+
- **`ID Accuracy`**: The accuracy of your model on the ID test data.
64+
- **`Outlier Data`**: Whether your model uses the outlier data for training.
65+
- **`Model Arch.`**: The architecture of your base classifier, e.g., `ResNet18`.
66+
- **`Additional Description`**: Any additional description of your model, e.g., `100 epochs`, `torchvision pretrained`, etc.
67+
68+
3. Ideally, send us a copy of your model checkpoint so that we can verify your results on our end. You can either upload the checkpoint to a cloud storage and share the link in the issue, or send us an email at [jz288@duke.edu](mailto:jz288@duke.edu).

openood/preprocessors/cider_preprocessor.py

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def __init__(self, config: Config):
4444
tvs_trans.Normalize(mean=self.mean, std=self.std),
4545
])
4646

47+
self.transform = TwoCropTransform(self.transform)
48+
4749
def setup(self, **kwargs):
4850
pass
4951

openood/preprocessors/utils.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from openood.utils import Config
22

33
from .base_preprocessor import BasePreprocessor
4-
from .cider_preprocessor import CiderPreprocessor, TwoCropTransform
4+
from .cider_preprocessor import CiderPreprocessor
55
from .csi_preprocessor import CSIPreprocessor
66
from .cutpaste_preprocessor import CutPastePreprocessor
77
from .draem_preprocessor import DRAEMPreprocessor
@@ -31,10 +31,7 @@ def get_preprocessor(config: Config, split):
3131
}
3232

3333
if split == 'train':
34-
if config.preprocessor.name == 'cider':
35-
return TwoCropTransform(CiderPreprocessor(config))
36-
else:
37-
return train_preprocessors[config.preprocessor.name](config)
34+
return train_preprocessors[config.preprocessor.name](config)
3835
else:
3936
try:
4037
return test_preprocessors[config.preprocessor.name](config)

0 commit comments

Comments
 (0)