Skip to content

Commit

Permalink
Merge pull request #165 from zjysteven/main
Browse files Browse the repository at this point in the history
Minor fix
  • Loading branch information
zjysteven authored Jun 27, 2023
2 parents 5155ea6 + fb76ad5 commit 8d44375
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,22 @@ From the repository folder
```shell
pre-commit install
```

## Contributing to OpenOOD leaderboard

We welcome new entries submitted to the leaderboard. Please follow the instructions below to submit your results.

1. Evaluate your model/method with OpenOOD's benchmark and evaluator such that the comparison is fair.

2. Report your new results by opening an issue. Remember to specify the following information:

- **`Training`**: The training method of your model, e.g., `CrossEntropy`.
- **`Postprocessor`**: The postprocessor of your model, e.g., `MSP`, `ReAct`, etc.
- **`Near-OOD AUROC`**: The AUROC score of your model on the near-OOD split.
- **`Far-OOD AUROC`**: The AUROC score of your model on the far-OOD split.
- **`ID Accuracy`**: The accuracy of your model on the ID test data.
- **`Outlier Data`**: Whether your model uses the outlier data for training.
- **`Model Arch.`**: The architecture of your base classifier, e.g., `ResNet18`.
- **`Additional Description`**: Any additional description of your model, e.g., `100 epochs`, `torchvision pretrained`, etc.

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 [[email protected]](mailto:[email protected]).
2 changes: 2 additions & 0 deletions openood/preprocessors/cider_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def __init__(self, config: Config):
tvs_trans.Normalize(mean=self.mean, std=self.std),
])

self.transform = TwoCropTransform(self.transform)

def setup(self, **kwargs):
pass

Expand Down
7 changes: 2 additions & 5 deletions openood/preprocessors/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openood.utils import Config

from .base_preprocessor import BasePreprocessor
from .cider_preprocessor import CiderPreprocessor, TwoCropTransform
from .cider_preprocessor import CiderPreprocessor
from .csi_preprocessor import CSIPreprocessor
from .cutpaste_preprocessor import CutPastePreprocessor
from .draem_preprocessor import DRAEMPreprocessor
Expand Down Expand Up @@ -31,10 +31,7 @@ def get_preprocessor(config: Config, split):
}

if split == 'train':
if config.preprocessor.name == 'cider':
return TwoCropTransform(CiderPreprocessor(config))
else:
return train_preprocessors[config.preprocessor.name](config)
return train_preprocessors[config.preprocessor.name](config)
else:
try:
return test_preprocessors[config.preprocessor.name](config)
Expand Down

0 comments on commit 8d44375

Please sign in to comment.