Skip to content

Commit

Permalink
make code public
Browse files Browse the repository at this point in the history
  • Loading branch information
HamidrezaKmK committed Jul 18, 2024
1 parent 3afa745 commit 7417870
Show file tree
Hide file tree
Showing 297 changed files with 892,623 additions and 1 deletion.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Hamidreza Kamkari

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
213 changes: 212 additions & 1 deletion README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
base_model:
config_dir: checkpoints-znod8v3z/diffusion_cifar10_distinctions_aep6z5pr_final/run_config.json
checkpoint_dir: checkpoints-znod8v3z/diffusion_cifar10_distinctions_aep6z5pr_final/checkpoints/de_score-based-VP-diffusion_best_valid.pt
data:
# specify the datasets and dataloader configurations for the in and out of distribution data.
in_distribution:
dataloader_args:
make_valid_loader: false
dataset: cifar10
train_batch_size: 8
valid_batch_size: 8
test_batch_size: 8
pick_loader: train
out_of_distribution:
dataloader_args:
make_valid_loader: false
dataset: celeba
train_batch_size: 8
valid_batch_size: 8
test_batch_size: 8
pick_loader: test
ood:
# bypass the entire visualization process since there is no need to plot the histograms that take time!
bypass_visualization: True

# for reproducibility
seed: 100

use_dataloader: True
pick_count: 1

# The OOD detection method in use
method: ood.reconstruction.DegradeDenoise
method_args:
num_time_steps: 20
steps: 50
validation_size: 1
methods_to_include: ['l2', 'lpips']
verbose: 3
gamma: 1


logger:
project: ood-detection-single-runs
entity: platypus-dgm
name: cifar10_vs_celeba_small_degrade_denoise_ood
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
base_model:
config_dir: checkpoints-znod8v3z/diffusion_cifar10_distinctions_aep6z5pr_final/run_config.json
checkpoint_dir: checkpoints-znod8v3z/diffusion_cifar10_distinctions_aep6z5pr_final/checkpoints/de_score-based-VP-diffusion_best_valid.pt
data:
# specify the datasets and dataloader configurations for the in and out of distribution data.
in_distribution:
dataloader_args:
make_valid_loader: false
dataset: cifar10
train_batch_size: 8
valid_batch_size: 8
test_batch_size: 8
pick_loader: train
out_of_distribution:
dataloader_args:
make_valid_loader: false
dataset: cifar10
train_batch_size: 8
valid_batch_size: 8
test_batch_size: 8
pick_loader: test
ood:
# bypass the entire visualization process since there is no need to plot the histograms that take time!
bypass_visualization: True

# for reproducibility
seed: 100

use_dataloader: True
pick_count: 1

# The OOD detection method in use
method: ood.reconstruction.DegradeDenoise
method_args:
num_time_steps: 20
steps: 50
validation_size: 1
methods_to_include: ['l2', 'lpips']
verbose: 3
gamma: 1


logger:
project: ood-detection-single-runs
entity: platypus-dgm
name: cifar10_vs_celeba_small_degrade_denoise_in_distr
46 changes: 46 additions & 0 deletions configurations/ood/diffusions/degrade_denoise/cifar10_svhn_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
base_model:
config_dir: checkpoints-znod8v3z/diffusion_cifar10_distinctions_aep6z5pr_final/run_config.json
checkpoint_dir: checkpoints-znod8v3z/diffusion_cifar10_distinctions_aep6z5pr_final/checkpoints/de_score-based-VP-diffusion_best_valid.pt
data:
# specify the datasets and dataloader configurations for the in and out of distribution data.
in_distribution:
dataloader_args:
make_valid_loader: false
dataset: cifar10
train_batch_size: 8
valid_batch_size: 8
test_batch_size: 8
pick_loader: train
out_of_distribution:
dataloader_args:
make_valid_loader: false
dataset: svhn
train_batch_size: 8
valid_batch_size: 8
test_batch_size: 8
pick_loader: test
ood:
# bypass the entire visualization process since there is no need to plot the histograms that take time!
bypass_visualization: True

# for reproducibility
seed: 100

use_dataloader: True
pick_count: 1

# The OOD detection method in use
method: ood.reconstruction.DegradeDenoise
method_args:
num_time_steps: 10
steps: 100
validation_size: 1
methods_to_include: ['l2', 'lpips']
verbose: 3
gamma: 1


logger:
project: ood-detection-single-runs
entity: platypus-dgm
name: cifar10_vs_svhn_ood_degrade_denoise_ood
46 changes: 46 additions & 0 deletions configurations/ood/diffusions/degrade_denoise/cifar10_svhn_2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
base_model:
config_dir: checkpoints-znod8v3z/diffusion_cifar10_distinctions_aep6z5pr_final/run_config.json
checkpoint_dir: checkpoints-znod8v3z/diffusion_cifar10_distinctions_aep6z5pr_final/checkpoints/de_score-based-VP-diffusion_best_valid.pt
data:
# specify the datasets and dataloader configurations for the in and out of distribution data.
in_distribution:
dataloader_args:
make_valid_loader: false
dataset: cifar10
train_batch_size: 8
valid_batch_size: 8
test_batch_size: 8
pick_loader: train
out_of_distribution:
dataloader_args:
make_valid_loader: false
dataset: cifar10
train_batch_size: 8
valid_batch_size: 8
test_batch_size: 8
pick_loader: test
ood:
# bypass the entire visualization process since there is no need to plot the histograms that take time!
bypass_visualization: True

# for reproducibility
seed: 100

use_dataloader: True
pick_count: 1

# The OOD detection method in use
method: ood.reconstruction.DegradeDenoise
method_args:
num_time_steps: 10
steps: 100
validation_size: 1
methods_to_include: ['l2', 'lpips']
verbose: 3
gamma: 1


logger:
project: ood-detection-single-runs
entity: platypus-dgm
name: cifar10_vs_svhn_ood_degrade_denoise_in_distr
49 changes: 49 additions & 0 deletions configurations/ood/diffusions/degrade_denoise/fmnist_mnist_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
base_model:
config_dir: checkpoints-hg9x5r0n/diffusion_fashion-mnist_interparental_bxnuw7zk_final/run_config.json
checkpoint_dir: checkpoints-hg9x5r0n/diffusion_fashion-mnist_interparental_bxnuw7zk_final/checkpoints/de_score-based-VP-diffusion_best_valid.pt
data:
# specify the datasets and dataloader configurations for the in and out of distribution data.
in_distribution:
dataloader_args:
make_valid_loader: false
dataset: fashion-mnist
train_batch_size: 128
valid_batch_size: 128
test_batch_size: 128
additional_dataset_args:
resize_image: [32, 32]
pick_loader: train
out_of_distribution:
dataloader_args:
make_valid_loader: false
dataset: mnist
train_batch_size: 128
valid_batch_size: 128
test_batch_size: 128
additional_dataset_args:
resize_image: [32, 32]
pick_loader: test
ood:
# bypass the entire visualization process since there is no need to plot the histograms that take time!
bypass_visualization: True

# for reproducibility
seed: 100

use_dataloader: True
pick_count: 1

# The OOD detection method in use
method: ood.reconstruction.DegradeDenoise
method_args:
num_time_steps: 10
steps: 100
validation_size: 1
methods_to_include: ['l2', 'lpips']
verbose: 3


logger:
project: ood-detection-single-runs
entity: platypus-dgm
name: fmnist_vs_mnist_degrade_denoise_ood
49 changes: 49 additions & 0 deletions configurations/ood/diffusions/degrade_denoise/fmnist_mnist_2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
base_model:
config_dir: checkpoints-hg9x5r0n/diffusion_fashion-mnist_interparental_bxnuw7zk_final/run_config.json
checkpoint_dir: checkpoints-hg9x5r0n/diffusion_fashion-mnist_interparental_bxnuw7zk_final/checkpoints/de_score-based-VP-diffusion_best_valid.pt
data:
# specify the datasets and dataloader configurations for the in and out of distribution data.
in_distribution:
dataloader_args:
make_valid_loader: false
dataset: fashion-mnist
train_batch_size: 128
valid_batch_size: 128
test_batch_size: 128
additional_dataset_args:
resize_image: [32, 32]
pick_loader: train
out_of_distribution:
dataloader_args:
make_valid_loader: false
dataset: fashion-mnist
train_batch_size: 128
valid_batch_size: 128
test_batch_size: 128
additional_dataset_args:
resize_image: [32, 32]
pick_loader: test
ood:
# bypass the entire visualization process since there is no need to plot the histograms that take time!
bypass_visualization: True

# for reproducibility
seed: 100

use_dataloader: True
pick_count: 1

# The OOD detection method in use
method: ood.reconstruction.DegradeDenoise
method_args:
num_time_steps: 10
steps: 100
validation_size: 1
methods_to_include: ['l2', 'lpips']
verbose: 3


logger:
project: ood-detection-single-runs
entity: platypus-dgm
name: fmnist_vs_mnist_degrade_denoise_in_distr
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
base_model:
config_dir: checkpoints-hg9x5r0n/diffusion_fashion-mnist_interparental_bxnuw7zk_final/run_config.json
checkpoint_dir: checkpoints-hg9x5r0n/diffusion_fashion-mnist_interparental_bxnuw7zk_final/checkpoints/de_score-based-VP-diffusion_best_valid.pt
data:
# specify the datasets and dataloader configurations for the in and out of distribution data.
in_distribution:
dataloader_args:
make_valid_loader: false
dataset: fashion-mnist
train_batch_size: 128
valid_batch_size: 128
test_batch_size: 128
additional_dataset_args:
resize_image: [32, 32]
pick_loader: train
out_of_distribution:
dataloader_args:
make_valid_loader: false
train_batch_size: 128
valid_batch_size: 128
test_batch_size: 128
dataset: dgm-generated
dgm_args:
model_loading_config:
config_dir: checkpoints-hg9x5r0n/diffusion_fashion-mnist_interparental_bxnuw7zk_final/run_config.json
checkpoint_dir: checkpoints-hg9x5r0n/diffusion_fashion-mnist_interparental_bxnuw7zk_final/checkpoints/de_score-based-VP-diffusion_best_valid.pt
seed: 10
length: 1000
pick_loader: test
ood:
# bypass the entire visualization process since there is no need to plot the histograms that take time!
bypass_visualization: True
histogram_limit: 0

# for reproducibility
seed: 100

use_dataloader: True
pick_count: 1

# The OOD detection method in use
method: ood.reconstruction.DegradeDenoise
method_args:
num_time_steps: 10
steps: 100
validation_size: 1
methods_to_include: ['l2', 'lpips']
verbose: 3


logger:
project: ood-detection-single-runs
entity: platypus-dgm
name: fmnist_vs_mnist_degrade_denoise_ood
Loading

0 comments on commit 7417870

Please sign in to comment.