oodeel 0.1.1__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of oodeel might be problematic. Click here for more details.

Files changed (62) hide show
  1. {oodeel-0.1.1/oodeel.egg-info → oodeel-0.3.0}/PKG-INFO +146 -20
  2. oodeel-0.1.1/PKG-INFO → oodeel-0.3.0/README.md +29 -38
  3. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/__init__.py +1 -1
  4. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/datasets/__init__.py +2 -1
  5. oodeel-0.3.0/oodeel/datasets/data_handler.py +304 -0
  6. oodeel-0.1.1/oodeel/datasets/data_handler.py → oodeel-0.3.0/oodeel/datasets/deprecated/DEPRECATED_data_handler.py +6 -6
  7. oodeel-0.1.1/oodeel/datasets/ooddataset.py → oodeel-0.3.0/oodeel/datasets/deprecated/DEPRECATED_ooddataset.py +14 -13
  8. oodeel-0.1.1/oodeel/datasets/tf_data_handler.py → oodeel-0.3.0/oodeel/datasets/deprecated/DEPRECATED_tf_data_handler.py +7 -7
  9. oodeel-0.1.1/oodeel/datasets/torch_data_handler.py → oodeel-0.3.0/oodeel/datasets/deprecated/DEPRECATED_torch_data_handler.py +12 -9
  10. oodeel-0.3.0/oodeel/datasets/deprecated/__init__.py +31 -0
  11. oodeel-0.3.0/oodeel/datasets/tf_data_handler.py +609 -0
  12. oodeel-0.3.0/oodeel/datasets/torch_data_handler.py +694 -0
  13. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/eval/metrics.py +7 -2
  14. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/eval/plots/features.py +2 -2
  15. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/eval/plots/plotly.py +2 -2
  16. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/extractor/feature_extractor.py +30 -9
  17. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/extractor/keras_feature_extractor.py +70 -13
  18. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/extractor/torch_feature_extractor.py +120 -33
  19. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/methods/__init__.py +17 -1
  20. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/methods/base.py +103 -17
  21. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/methods/dknn.py +22 -9
  22. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/methods/energy.py +8 -0
  23. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/methods/entropy.py +8 -0
  24. oodeel-0.3.0/oodeel/methods/gen.py +118 -0
  25. oodeel-0.3.0/oodeel/methods/gram.py +307 -0
  26. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/methods/mahalanobis.py +14 -12
  27. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/methods/mls.py +8 -0
  28. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/methods/odin.py +8 -0
  29. oodeel-0.3.0/oodeel/methods/rmds.py +122 -0
  30. oodeel-0.3.0/oodeel/methods/she.py +197 -0
  31. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/methods/vim.py +5 -5
  32. oodeel-0.3.0/oodeel/preprocess/__init__.py +31 -0
  33. oodeel-0.3.0/oodeel/preprocess/tf_preprocess.py +95 -0
  34. oodeel-0.3.0/oodeel/preprocess/torch_preprocess.py +97 -0
  35. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/utils/operator.py +72 -2
  36. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/utils/tf_operator.py +72 -4
  37. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/utils/tf_training_tools.py +26 -3
  38. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/utils/torch_operator.py +75 -4
  39. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/utils/torch_training_tools.py +31 -2
  40. oodeel-0.1.1/README.md → oodeel-0.3.0/oodeel.egg-info/PKG-INFO +164 -17
  41. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel.egg-info/SOURCES.txt +12 -1
  42. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel.egg-info/requires.txt +22 -12
  43. {oodeel-0.1.1 → oodeel-0.3.0}/setup.cfg +21 -5
  44. {oodeel-0.1.1 → oodeel-0.3.0}/setup.py +8 -4
  45. {oodeel-0.1.1 → oodeel-0.3.0}/tests/tests_tensorflow/tf_methods_utils.py +2 -1
  46. {oodeel-0.1.1 → oodeel-0.3.0}/tests/tests_torch/tools_torch.py +9 -9
  47. {oodeel-0.1.1 → oodeel-0.3.0}/tests/tests_torch/torch_methods_utils.py +34 -27
  48. {oodeel-0.1.1 → oodeel-0.3.0}/tests/tools_operator.py +10 -1
  49. {oodeel-0.1.1 → oodeel-0.3.0}/LICENSE +0 -0
  50. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/eval/__init__.py +0 -0
  51. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/eval/plots/__init__.py +0 -0
  52. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/eval/plots/metrics.py +0 -0
  53. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/extractor/__init__.py +0 -0
  54. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/types/__init__.py +0 -0
  55. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/utils/__init__.py +0 -0
  56. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel/utils/general_utils.py +0 -0
  57. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel.egg-info/dependency_links.txt +0 -0
  58. {oodeel-0.1.1 → oodeel-0.3.0}/oodeel.egg-info/top_level.txt +0 -0
  59. {oodeel-0.1.1 → oodeel-0.3.0}/tests/__init__.py +0 -0
  60. {oodeel-0.1.1 → oodeel-0.3.0}/tests/tests_tensorflow/__init__.py +0 -0
  61. {oodeel-0.1.1 → oodeel-0.3.0}/tests/tests_tensorflow/tools_tf.py +0 -0
  62. {oodeel-0.1.1 → oodeel-0.3.0}/tests/tests_torch/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: oodeel
3
- Version: 0.1.1
3
+ Version: 0.3.0
4
4
  Summary: Simple, compact, and hackable post-hoc deep OOD detection for alreadytrained tensorflow or pytorch image classifiers.
5
5
  Author: DEEL Core Team
6
6
  Author-email: paul.novello@irt-saintexupery.com
@@ -11,13 +11,127 @@ Classifier: Programming Language :: Python :: 3.8
11
11
  Classifier: Programming Language :: Python :: 3.9
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: faiss_cpu
16
+ Requires-Dist: numpy
17
+ Requires-Dist: scikit_learn
18
+ Requires-Dist: scipy
19
+ Requires-Dist: setuptools
20
+ Requires-Dist: matplotlib
21
+ Requires-Dist: pandas
22
+ Requires-Dist: seaborn
23
+ Requires-Dist: plotly
24
+ Requires-Dist: tqdm
14
25
  Provides-Extra: dev
26
+ Requires-Dist: mypy; extra == "dev"
27
+ Requires-Dist: ipywidgets; extra == "dev"
28
+ Requires-Dist: mkdocs-jupyter; extra == "dev"
29
+ Requires-Dist: mkdocstrings-python; extra == "dev"
30
+ Requires-Dist: flake8; extra == "dev"
31
+ Requires-Dist: setuptools; extra == "dev"
32
+ Requires-Dist: pre-commit; extra == "dev"
33
+ Requires-Dist: tox; extra == "dev"
34
+ Requires-Dist: black; extra == "dev"
35
+ Requires-Dist: ruff; extra == "dev"
36
+ Requires-Dist: ipython; extra == "dev"
37
+ Requires-Dist: ipykernel; extra == "dev"
38
+ Requires-Dist: pytest; extra == "dev"
39
+ Requires-Dist: pylint; extra == "dev"
40
+ Requires-Dist: mypy; extra == "dev"
41
+ Requires-Dist: mkdocs; extra == "dev"
42
+ Requires-Dist: mkdocs-material; extra == "dev"
43
+ Requires-Dist: mkdocstrings; extra == "dev"
44
+ Requires-Dist: mknotebooks; extra == "dev"
45
+ Requires-Dist: mike; extra == "dev"
46
+ Requires-Dist: bump2version; extra == "dev"
47
+ Requires-Dist: docsig; extra == "dev"
48
+ Requires-Dist: no_implicit_optional; extra == "dev"
49
+ Requires-Dist: numpy==1.26.4; extra == "dev"
50
+ Requires-Dist: tensorflow==2.11.0; extra == "dev"
51
+ Requires-Dist: tensorflow_datasets; extra == "dev"
52
+ Requires-Dist: tensorflow_probability==0.19.0; extra == "dev"
53
+ Requires-Dist: timm; extra == "dev"
54
+ Requires-Dist: torch==1.13.1; extra == "dev"
55
+ Requires-Dist: torchvision==0.14.1; extra == "dev"
15
56
  Provides-Extra: tensorflow-dev
57
+ Requires-Dist: mypy; extra == "tensorflow-dev"
58
+ Requires-Dist: ipywidgets; extra == "tensorflow-dev"
59
+ Requires-Dist: mkdocs-jupyter; extra == "tensorflow-dev"
60
+ Requires-Dist: mkdocstrings-python; extra == "tensorflow-dev"
61
+ Requires-Dist: flake8; extra == "tensorflow-dev"
62
+ Requires-Dist: setuptools; extra == "tensorflow-dev"
63
+ Requires-Dist: pre-commit; extra == "tensorflow-dev"
64
+ Requires-Dist: tox; extra == "tensorflow-dev"
65
+ Requires-Dist: black; extra == "tensorflow-dev"
66
+ Requires-Dist: ruff; extra == "tensorflow-dev"
67
+ Requires-Dist: ipython; extra == "tensorflow-dev"
68
+ Requires-Dist: ipykernel; extra == "tensorflow-dev"
69
+ Requires-Dist: pytest; extra == "tensorflow-dev"
70
+ Requires-Dist: pylint; extra == "tensorflow-dev"
71
+ Requires-Dist: mypy; extra == "tensorflow-dev"
72
+ Requires-Dist: mkdocs; extra == "tensorflow-dev"
73
+ Requires-Dist: mkdocs-material; extra == "tensorflow-dev"
74
+ Requires-Dist: mkdocstrings; extra == "tensorflow-dev"
75
+ Requires-Dist: mknotebooks; extra == "tensorflow-dev"
76
+ Requires-Dist: mike; extra == "tensorflow-dev"
77
+ Requires-Dist: bump2version; extra == "tensorflow-dev"
78
+ Requires-Dist: docsig; extra == "tensorflow-dev"
79
+ Requires-Dist: no_implicit_optional; extra == "tensorflow-dev"
80
+ Requires-Dist: numpy==1.26.4; extra == "tensorflow-dev"
81
+ Requires-Dist: tensorflow==2.11.0; extra == "tensorflow-dev"
82
+ Requires-Dist: tensorflow_datasets; extra == "tensorflow-dev"
83
+ Requires-Dist: tensorflow_probability==0.19.0; extra == "tensorflow-dev"
16
84
  Provides-Extra: torch-dev
85
+ Requires-Dist: mypy; extra == "torch-dev"
86
+ Requires-Dist: ipywidgets; extra == "torch-dev"
87
+ Requires-Dist: mkdocs-jupyter; extra == "torch-dev"
88
+ Requires-Dist: mkdocstrings-python; extra == "torch-dev"
89
+ Requires-Dist: flake8; extra == "torch-dev"
90
+ Requires-Dist: setuptools; extra == "torch-dev"
91
+ Requires-Dist: pre-commit; extra == "torch-dev"
92
+ Requires-Dist: tox; extra == "torch-dev"
93
+ Requires-Dist: black; extra == "torch-dev"
94
+ Requires-Dist: ruff; extra == "torch-dev"
95
+ Requires-Dist: ipython; extra == "torch-dev"
96
+ Requires-Dist: ipykernel; extra == "torch-dev"
97
+ Requires-Dist: pytest; extra == "torch-dev"
98
+ Requires-Dist: pylint; extra == "torch-dev"
99
+ Requires-Dist: mypy; extra == "torch-dev"
100
+ Requires-Dist: mkdocs; extra == "torch-dev"
101
+ Requires-Dist: mkdocs-material; extra == "torch-dev"
102
+ Requires-Dist: mkdocstrings; extra == "torch-dev"
103
+ Requires-Dist: mknotebooks; extra == "torch-dev"
104
+ Requires-Dist: mike; extra == "torch-dev"
105
+ Requires-Dist: bump2version; extra == "torch-dev"
106
+ Requires-Dist: docsig; extra == "torch-dev"
107
+ Requires-Dist: no_implicit_optional; extra == "torch-dev"
108
+ Requires-Dist: numpy==1.26.4; extra == "torch-dev"
109
+ Requires-Dist: timm; extra == "torch-dev"
110
+ Requires-Dist: torch==1.13.1; extra == "torch-dev"
111
+ Requires-Dist: torchvision==0.14.1; extra == "torch-dev"
17
112
  Provides-Extra: tensorflow
113
+ Requires-Dist: tensorflow==2.11.0; extra == "tensorflow"
114
+ Requires-Dist: tensorflow_datasets; extra == "tensorflow"
115
+ Requires-Dist: tensorflow_probability==0.19.0; extra == "tensorflow"
18
116
  Provides-Extra: torch
117
+ Requires-Dist: timm; extra == "torch"
118
+ Requires-Dist: torch==1.13.1; extra == "torch"
119
+ Requires-Dist: torchvision==0.14.1; extra == "torch"
19
120
  Provides-Extra: docs
20
- License-File: LICENSE
121
+ Requires-Dist: mkdocs; extra == "docs"
122
+ Requires-Dist: mkdocs-material; extra == "docs"
123
+ Requires-Dist: mkdocstrings; extra == "docs"
124
+ Requires-Dist: mknotebooks; extra == "docs"
125
+ Requires-Dist: ipython; extra == "docs"
126
+ Dynamic: author
127
+ Dynamic: author-email
128
+ Dynamic: classifier
129
+ Dynamic: description
130
+ Dynamic: description-content-type
131
+ Dynamic: license-file
132
+ Dynamic: provides-extra
133
+ Dynamic: requires-dist
134
+ Dynamic: summary
21
135
 
22
136
 
23
137
  <!-- Banner section -->
@@ -33,29 +147,23 @@ License-File: LICENSE
33
147
  <!-- Badge section -->
34
148
  <div align="center">
35
149
  <a href="#">
36
- <img src="https://img.shields.io/badge/python-3.8%2B-blue">
37
- </a>
150
+ <img src="https://img.shields.io/badge/python-3.8%2B-blue"></a>
38
151
  <a href="https://github.com/deel-ai/oodeel/actions/workflows/python-linters.yml">
39
- <img alt="Flake8" src="https://github.com/deel-ai/oodeel/actions/workflows/python-linters.yml/badge.svg">
40
- </a>
152
+ <img alt="Flake8" src="https://github.com/deel-ai/oodeel/actions/workflows/python-linters.yml/badge.svg"></a>
41
153
  <a href="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-tf.yml">
42
- <img alt="Tests tf" src="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-tf.yml/badge.svg">
43
- </a>
154
+ <img alt="Tests tf" src="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-tf.yml/badge.svg"></a>
44
155
  <a href="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-torch.yml">
45
- <img alt="Tests torch" src="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-torch.yml/badge.svg">
46
- </a>
156
+ <img alt="Tests torch" src="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-torch.yml/badge.svg"></a>
47
157
  <a href="https://github.com/deel-ai/oodeel/actions/workflows/python-coverage-shield.yml">
48
- <img alt="Coverage" src="https://github.com/deel-ai/oodeel/raw/gh-shields/coverage.svg">
49
- </a>
158
+ <img alt="Coverage" src="https://github.com/deel-ai/oodeel/raw/gh-shields/coverage.svg"></a>
50
159
  <a href="https://github.com/deel-ai/oodeel/blob/master/LICENSE">
51
- <img alt="License MIT" src="https://img.shields.io/badge/License-MIT-efefef">
52
- </a>
160
+ <img alt="License MIT" src="https://img.shields.io/badge/License-MIT-efefef"></a>
53
161
  </div>
54
162
  <br>
55
163
 
56
164
  <!-- Short description of your library -->
57
165
 
58
- <b>Oodeel</b> is a library that performs post-hoc deep OOD detection on already trained neural network image classifiers. The philosophy of the library is to favor quality over quantity and to foster easy adoption. As a result, we provide a simple, compact and easily customizable API and carefully integrate and test each proposed baseline into a coherent framework that is designed to enable their use in tensorflow **and** pytorch. You can find the documentation [here](https://deel-ai.github.io/oodeel/).
166
+ <b>Oodeel</b> is a library that performs post-hoc deep OOD (Out-of-Distribution) detection on already trained neural network image classifiers. The philosophy of the library is to favor quality over quantity and to foster easy adoption. As a result, we provide a simple, compact and easily customizable API and carefully integrate and test each proposed baseline into a coherent framework that is designed to enable their use in tensorflow **and** pytorch. You can find the documentation [here](https://deel-ai.github.io/oodeel/).
59
167
 
60
168
  ```python
61
169
  from oodeel.methods import MLS
@@ -75,7 +183,8 @@ scores, info = mls.score(ds) # ds is a tf.data.Dataset or a torch.DataLoader
75
183
  - [Contributing](#contributing)
76
184
  - [See Also](#see-also)
77
185
  - [Acknowledgments](#acknowledgments)
78
- - [Creator](#creator)
186
+ - [Creators](#creators)
187
+ - [Citation](#citation)
79
188
  - [License](#license)
80
189
 
81
190
  # Installation
@@ -194,15 +303,19 @@ Currently, **oodeel** includes the following baselines:
194
303
  | MSP | [A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks](http://arxiv.org/abs/1610.02136) | ICLR 2017 | avail [tensorflow & torch](docs/pages/getting_started.ipynb)|
195
304
  | Mahalanobis | [A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks](http://arxiv.org/abs/1807.03888) | NeurIPS 2018 | avail [tensorflow](docs/notebooks/tensorflow/demo_mahalanobis_tf.ipynb) or [torch](docs/notebooks/torch/demo_mahalanobis_torch.ipynb)|
196
305
  | Energy | [Energy-based Out-of-distribution Detection](http://arxiv.org/abs/2010.03759) | NeurIPS 2020 |avail [tensorflow](docs/notebooks/tensorflow/demo_energy_tf.ipynb) or [torch](docs/notebooks/torch/demo_energy_torch.ipynb) |
197
- | Odin | [Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks](http://arxiv.org/abs/1706.02690) | ICLR 2018 |avail [tensorflow](docs/notebooks/tensorflow/demo_odin_tf.ipynb) or [torch](docs/notebooks/torch/demo_odin_torch.ipynb) |
306
+ | Odin | [Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks](http://arxiv.org/abs/1706.02690) | ICLR 2018 | avail [tensorflow](docs/notebooks/tensorflow/demo_odin_tf.ipynb) or [torch](docs/notebooks/torch/demo_odin_torch.ipynb) |
198
307
  | DKNN | [Out-of-Distribution Detection with Deep Nearest Neighbors](http://arxiv.org/abs/2204.06507) | ICML 2022 | avail [tensorflow](docs/notebooks/tensorflow/demo_dknn_tf.ipynb) or [torch](docs/notebooks/torch/demo_dknn_torch.ipynb) |
199
308
  | VIM | [ViM: Out-Of-Distribution with Virtual-logit Matching](http://arxiv.org/abs/2203.10807) | CVPR 2022 |avail [tensorflow](docs/notebooks/tensorflow/demo_vim_tf.ipynb) or [torch](docs/notebooks/torch/demo_vim_torch.ipynb) |
200
309
  | Entropy | [Likelihood Ratios for Out-of-Distribution Detection](https://proceedings.neurips.cc/paper/2019/hash/1e79596878b2320cac26dd792a6c51c9-Abstract.html) | NeurIPS 2019 |avail [tensorflow](docs/notebooks/tensorflow/demo_entropy_tf.ipynb) or [torch](docs/notebooks/torch/demo_entropy_torch.ipynb) |
201
310
  | GODIN | [Generalized ODIN: Detecting Out-of-Distribution Image Without Learning From Out-of-Distribution Data](https://ieeexplore.ieee.org/document/9156473/) | CVPR 2020 | planned |
202
311
  | ReAct | [ReAct: Out-of-distribution Detection With Rectified Activations](http://arxiv.org/abs/2111.12797) | NeurIPS 2021 | avail [tensorflow](docs/notebooks/tensorflow/demo_react_tf.ipynb) or [torch](docs/notebooks/torch/demo_react_torch.ipynb) |
203
312
  | NMD | [Neural Mean Discrepancy for Efficient Out-of-Distribution Detection](https://openaccess.thecvf.com/content/CVPR2022/html/Dong_Neural_Mean_Discrepancy_for_Efficient_Out-of-Distribution_Detection_CVPR_2022_paper.html) | CVPR 2022 | planned |
204
- | Gram | [Detecting Out-of-Distribution Examples with Gram Matrices](https://proceedings.mlr.press/v119/sastry20a.html) | ICML 2020 | planned |
205
-
313
+ | Gram | [Detecting Out-of-Distribution Examples with Gram Matrices](https://proceedings.mlr.press/v119/sastry20a.html) | ICML 2020 | avail [tensorflow](docs/notebooks/tensorflow/demo_gram_tf.ipynb) or [torch](docs/notebooks/torch/demo_gram_torch.ipynb) |
314
+ | GEN | [GEN: Pushing the Limits of Softmax-Based Out-of-Distribution Detection](https://openaccess.thecvf.com/content/CVPR2023/html/Liu_GEN_Pushing_the_Limits_of_Softmax-Based_Out-of-Distribution_Detection_CVPR_2023_paper.html) | CVPR 2023 | avail [tensorflow](docs/notebooks/tensorflow/demo_gen_tf.ipynb) or [torch](docs/notebooks/torch/demo_gen_torch.ipynb) |
315
+ | RMDS | [A Simple Fix to Mahalanobis Distance for Improving Near-OOD Detection](https://arxiv.org/abs/2106.09022) | preprint | avail [tensorflow](docs/notebooks/tensorflow/demo_rmds_tf.ipynb) or [torch](docs/notebooks/torch/demo_rmds_torch.ipynb) |
316
+ | SHE | [Out-of-Distribution Detection based on In-Distribution Data Patterns Memorization with Modern Hopfield Energy](https://openreview.net/forum?id=KkazG4lgKL) | ICLR 2023 | avail [tensorflow](docs/notebooks/tensorflow/demo_she_tf.ipynb) or [torch](docs/notebooks/torch/demo_she_torch.ipynb) |
317
+ | ASH | [Extremely Simple Activation Shaping for Out-of-Distribution Detection](http://arxiv.org/abs/2310.00227) | ICLR 2023 | avail [tensorflow](docs/notebooks/tensorflow/demo_ash_tf.ipynb) or [torch](docs/notebooks/torch/demo_ash_torch.ipynb) |
318
+ | SCALE | [Scaling for Training Time and Post-hoc Out-of-distribution Detection Enhancement](https://arxiv.org/abs/2111.12797) | ICLR 2024 | avail [tensorflow](docs/notebooks/tensorflow/demo_scale_tf.ipynb) or [torch](docs/notebooks/torch/demo_scale_torch.ipynb) |
206
319
 
207
320
 
208
321
 
@@ -252,6 +365,19 @@ This project received funding from the French ”Investing for the Future – PI
252
365
 
253
366
  The library was created by Paul Novello to streamline DEEL research on post-hoc deep OOD methods and foster their adoption by DEEL industrial partners. He was soon joined by Yann Pequignot, Yannick Prudent, Corentin Friedrich and Matthieu Le Goff.
254
367
 
368
+ # Citation
369
+
370
+ If you use OODEEL for your research project, please consider citing:
371
+ ```
372
+ @misc{oodeel,
373
+ author = {Novello, Paul and Prudent, Yannick and Friedrich, Corentin and Pequignot, Yann and Le Goff, Matthieu},
374
+ title = {OODEEL, a simple, compact, and hackable post-hoc deep OOD detection for already trained tensorflow or pytorch image classifiers.},
375
+ year = {2023},
376
+ publisher = {GitHub},
377
+ journal = {GitHub repository},
378
+ howpublished = {\url{https://github.com/deel-ai/oodeel}},
379
+ }
380
+ ```
255
381
  # License
256
382
 
257
383
  The package is released under [MIT license](LICENSE).
@@ -1,24 +1,3 @@
1
- Metadata-Version: 2.1
2
- Name: oodeel
3
- Version: 0.1.1
4
- Summary: Simple, compact, and hackable post-hoc deep OOD detection for alreadytrained tensorflow or pytorch image classifiers.
5
- Author: DEEL Core Team
6
- Author-email: paul.novello@irt-saintexupery.com
7
- Classifier: Programming Language :: Python
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.7
10
- Classifier: Programming Language :: Python :: 3.8
11
- Classifier: Programming Language :: Python :: 3.9
12
- Classifier: Programming Language :: Python :: 3.10
13
- Description-Content-Type: text/markdown
14
- Provides-Extra: dev
15
- Provides-Extra: tensorflow-dev
16
- Provides-Extra: torch-dev
17
- Provides-Extra: tensorflow
18
- Provides-Extra: torch
19
- Provides-Extra: docs
20
- License-File: LICENSE
21
-
22
1
 
23
2
  <!-- Banner section -->
24
3
  <div align="center">
@@ -33,29 +12,23 @@ License-File: LICENSE
33
12
  <!-- Badge section -->
34
13
  <div align="center">
35
14
  <a href="#">
36
- <img src="https://img.shields.io/badge/python-3.8%2B-blue">
37
- </a>
15
+ <img src="https://img.shields.io/badge/python-3.8%2B-blue"></a>
38
16
  <a href="https://github.com/deel-ai/oodeel/actions/workflows/python-linters.yml">
39
- <img alt="Flake8" src="https://github.com/deel-ai/oodeel/actions/workflows/python-linters.yml/badge.svg">
40
- </a>
17
+ <img alt="Flake8" src="https://github.com/deel-ai/oodeel/actions/workflows/python-linters.yml/badge.svg"></a>
41
18
  <a href="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-tf.yml">
42
- <img alt="Tests tf" src="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-tf.yml/badge.svg">
43
- </a>
19
+ <img alt="Tests tf" src="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-tf.yml/badge.svg"></a>
44
20
  <a href="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-torch.yml">
45
- <img alt="Tests torch" src="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-torch.yml/badge.svg">
46
- </a>
21
+ <img alt="Tests torch" src="https://github.com/deel-ai/oodeel/actions/workflows/python-tests-torch.yml/badge.svg"></a>
47
22
  <a href="https://github.com/deel-ai/oodeel/actions/workflows/python-coverage-shield.yml">
48
- <img alt="Coverage" src="https://github.com/deel-ai/oodeel/raw/gh-shields/coverage.svg">
49
- </a>
23
+ <img alt="Coverage" src="https://github.com/deel-ai/oodeel/raw/gh-shields/coverage.svg"></a>
50
24
  <a href="https://github.com/deel-ai/oodeel/blob/master/LICENSE">
51
- <img alt="License MIT" src="https://img.shields.io/badge/License-MIT-efefef">
52
- </a>
25
+ <img alt="License MIT" src="https://img.shields.io/badge/License-MIT-efefef"></a>
53
26
  </div>
54
27
  <br>
55
28
 
56
29
  <!-- Short description of your library -->
57
30
 
58
- <b>Oodeel</b> is a library that performs post-hoc deep OOD detection on already trained neural network image classifiers. The philosophy of the library is to favor quality over quantity and to foster easy adoption. As a result, we provide a simple, compact and easily customizable API and carefully integrate and test each proposed baseline into a coherent framework that is designed to enable their use in tensorflow **and** pytorch. You can find the documentation [here](https://deel-ai.github.io/oodeel/).
31
+ <b>Oodeel</b> is a library that performs post-hoc deep OOD (Out-of-Distribution) detection on already trained neural network image classifiers. The philosophy of the library is to favor quality over quantity and to foster easy adoption. As a result, we provide a simple, compact and easily customizable API and carefully integrate and test each proposed baseline into a coherent framework that is designed to enable their use in tensorflow **and** pytorch. You can find the documentation [here](https://deel-ai.github.io/oodeel/).
59
32
 
60
33
  ```python
61
34
  from oodeel.methods import MLS
@@ -75,7 +48,8 @@ scores, info = mls.score(ds) # ds is a tf.data.Dataset or a torch.DataLoader
75
48
  - [Contributing](#contributing)
76
49
  - [See Also](#see-also)
77
50
  - [Acknowledgments](#acknowledgments)
78
- - [Creator](#creator)
51
+ - [Creators](#creators)
52
+ - [Citation](#citation)
79
53
  - [License](#license)
80
54
 
81
55
  # Installation
@@ -194,15 +168,19 @@ Currently, **oodeel** includes the following baselines:
194
168
  | MSP | [A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks](http://arxiv.org/abs/1610.02136) | ICLR 2017 | avail [tensorflow & torch](docs/pages/getting_started.ipynb)|
195
169
  | Mahalanobis | [A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks](http://arxiv.org/abs/1807.03888) | NeurIPS 2018 | avail [tensorflow](docs/notebooks/tensorflow/demo_mahalanobis_tf.ipynb) or [torch](docs/notebooks/torch/demo_mahalanobis_torch.ipynb)|
196
170
  | Energy | [Energy-based Out-of-distribution Detection](http://arxiv.org/abs/2010.03759) | NeurIPS 2020 |avail [tensorflow](docs/notebooks/tensorflow/demo_energy_tf.ipynb) or [torch](docs/notebooks/torch/demo_energy_torch.ipynb) |
197
- | Odin | [Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks](http://arxiv.org/abs/1706.02690) | ICLR 2018 |avail [tensorflow](docs/notebooks/tensorflow/demo_odin_tf.ipynb) or [torch](docs/notebooks/torch/demo_odin_torch.ipynb) |
171
+ | Odin | [Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks](http://arxiv.org/abs/1706.02690) | ICLR 2018 | avail [tensorflow](docs/notebooks/tensorflow/demo_odin_tf.ipynb) or [torch](docs/notebooks/torch/demo_odin_torch.ipynb) |
198
172
  | DKNN | [Out-of-Distribution Detection with Deep Nearest Neighbors](http://arxiv.org/abs/2204.06507) | ICML 2022 | avail [tensorflow](docs/notebooks/tensorflow/demo_dknn_tf.ipynb) or [torch](docs/notebooks/torch/demo_dknn_torch.ipynb) |
199
173
  | VIM | [ViM: Out-Of-Distribution with Virtual-logit Matching](http://arxiv.org/abs/2203.10807) | CVPR 2022 |avail [tensorflow](docs/notebooks/tensorflow/demo_vim_tf.ipynb) or [torch](docs/notebooks/torch/demo_vim_torch.ipynb) |
200
174
  | Entropy | [Likelihood Ratios for Out-of-Distribution Detection](https://proceedings.neurips.cc/paper/2019/hash/1e79596878b2320cac26dd792a6c51c9-Abstract.html) | NeurIPS 2019 |avail [tensorflow](docs/notebooks/tensorflow/demo_entropy_tf.ipynb) or [torch](docs/notebooks/torch/demo_entropy_torch.ipynb) |
201
175
  | GODIN | [Generalized ODIN: Detecting Out-of-Distribution Image Without Learning From Out-of-Distribution Data](https://ieeexplore.ieee.org/document/9156473/) | CVPR 2020 | planned |
202
176
  | ReAct | [ReAct: Out-of-distribution Detection With Rectified Activations](http://arxiv.org/abs/2111.12797) | NeurIPS 2021 | avail [tensorflow](docs/notebooks/tensorflow/demo_react_tf.ipynb) or [torch](docs/notebooks/torch/demo_react_torch.ipynb) |
203
177
  | NMD | [Neural Mean Discrepancy for Efficient Out-of-Distribution Detection](https://openaccess.thecvf.com/content/CVPR2022/html/Dong_Neural_Mean_Discrepancy_for_Efficient_Out-of-Distribution_Detection_CVPR_2022_paper.html) | CVPR 2022 | planned |
204
- | Gram | [Detecting Out-of-Distribution Examples with Gram Matrices](https://proceedings.mlr.press/v119/sastry20a.html) | ICML 2020 | planned |
205
-
178
+ | Gram | [Detecting Out-of-Distribution Examples with Gram Matrices](https://proceedings.mlr.press/v119/sastry20a.html) | ICML 2020 | avail [tensorflow](docs/notebooks/tensorflow/demo_gram_tf.ipynb) or [torch](docs/notebooks/torch/demo_gram_torch.ipynb) |
179
+ | GEN | [GEN: Pushing the Limits of Softmax-Based Out-of-Distribution Detection](https://openaccess.thecvf.com/content/CVPR2023/html/Liu_GEN_Pushing_the_Limits_of_Softmax-Based_Out-of-Distribution_Detection_CVPR_2023_paper.html) | CVPR 2023 | avail [tensorflow](docs/notebooks/tensorflow/demo_gen_tf.ipynb) or [torch](docs/notebooks/torch/demo_gen_torch.ipynb) |
180
+ | RMDS | [A Simple Fix to Mahalanobis Distance for Improving Near-OOD Detection](https://arxiv.org/abs/2106.09022) | preprint | avail [tensorflow](docs/notebooks/tensorflow/demo_rmds_tf.ipynb) or [torch](docs/notebooks/torch/demo_rmds_torch.ipynb) |
181
+ | SHE | [Out-of-Distribution Detection based on In-Distribution Data Patterns Memorization with Modern Hopfield Energy](https://openreview.net/forum?id=KkazG4lgKL) | ICLR 2023 | avail [tensorflow](docs/notebooks/tensorflow/demo_she_tf.ipynb) or [torch](docs/notebooks/torch/demo_she_torch.ipynb) |
182
+ | ASH | [Extremely Simple Activation Shaping for Out-of-Distribution Detection](http://arxiv.org/abs/2310.00227) | ICLR 2023 | avail [tensorflow](docs/notebooks/tensorflow/demo_ash_tf.ipynb) or [torch](docs/notebooks/torch/demo_ash_torch.ipynb) |
183
+ | SCALE | [Scaling for Training Time and Post-hoc Out-of-distribution Detection Enhancement](https://arxiv.org/abs/2111.12797) | ICLR 2024 | avail [tensorflow](docs/notebooks/tensorflow/demo_scale_tf.ipynb) or [torch](docs/notebooks/torch/demo_scale_torch.ipynb) |
206
184
 
207
185
 
208
186
 
@@ -252,6 +230,19 @@ This project received funding from the French ”Investing for the Future – PI
252
230
 
253
231
  The library was created by Paul Novello to streamline DEEL research on post-hoc deep OOD methods and foster their adoption by DEEL industrial partners. He was soon joined by Yann Pequignot, Yannick Prudent, Corentin Friedrich and Matthieu Le Goff.
254
232
 
233
+ # Citation
234
+
235
+ If you use OODEEL for your research project, please consider citing:
236
+ ```
237
+ @misc{oodeel,
238
+ author = {Novello, Paul and Prudent, Yannick and Friedrich, Corentin and Pequignot, Yann and Le Goff, Matthieu},
239
+ title = {OODEEL, a simple, compact, and hackable post-hoc deep OOD detection for already trained tensorflow or pytorch image classifiers.},
240
+ year = {2023},
241
+ publisher = {GitHub},
242
+ journal = {GitHub repository},
243
+ howpublished = {\url{https://github.com/deel-ai/oodeel}},
244
+ }
245
+ ```
255
246
  # License
256
247
 
257
248
  The package is released under [MIT license](LICENSE).
@@ -25,4 +25,4 @@ oodeel
25
25
  -------
26
26
  """
27
27
 
28
- __version__ = "0.1.1"
28
+ __version__ = "0.3.0"
@@ -20,4 +20,5 @@
20
20
  # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  # SOFTWARE.
23
- from .ooddataset import OODDataset
23
+ from .data_handler import load_data_handler
24
+ from .deprecated.DEPRECATED_ooddataset import OODDataset