Skip to content

Commit

Permalink
Add transform config to yaml fil (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
samet-akcay authored Mar 23, 2022
1 parent b57e025 commit 2dfa0a7
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 28 deletions.
4 changes: 4 additions & 0 deletions anomalib/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def get_datamodule(config: Union[DictConfig, ListConfig]) -> LightningDataModule
test_batch_size=config.dataset.test_batch_size,
num_workers=config.dataset.num_workers,
seed=config.project.seed,
transform_config=config.dataset.transform_config,
create_validation_set=config.dataset.create_validation_set,
)
elif config.dataset.name.lower() == "btech":
datamodule = BTechDataModule(
Expand All @@ -56,6 +58,8 @@ def get_datamodule(config: Union[DictConfig, ListConfig]) -> LightningDataModule
test_batch_size=config.dataset.test_batch_size,
num_workers=config.dataset.num_workers,
seed=config.project.seed,
transform_config=config.dataset.transform_config,
create_validation_set=config.dataset.create_validation_set,
)
else:
raise ValueError(
Expand Down
5 changes: 3 additions & 2 deletions anomalib/models/cflow/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ dataset:
path: ./datasets/MVTec
category: bottle
task: segmentation
label_format: None
image_size: 256
train_batch_size: 16
test_batch_size: 16
inference_batch_size: 16
fiber_batch_size: 64
num_workers: 36
num_workers: 8
transform_config: null
create_validation_set: false

model:
name: cflow
Expand Down
3 changes: 2 additions & 1 deletion anomalib/models/dfkde/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ dataset:
path: ./datasets/MVTec
category: bottle
task: classification
label_format: None
image_size: 256
train_batch_size: 32
test_batch_size: 32
num_workers: 36
transform_config: null
create_validation_set: false

model:
name: dfkde
Expand Down
3 changes: 2 additions & 1 deletion anomalib/models/dfm/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ dataset:
path: ./datasets/MVTec
category: bottle
task: classification
label_format: None
image_size: 256
train_batch_size: 32
test_batch_size: 32
num_workers: 36
transform_config: null
create_validation_set: false

model:
name: dfm
Expand Down
13 changes: 7 additions & 6 deletions anomalib/models/ganomaly/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ dataset:
path: ./datasets/MVTec
category: bottle
task: classification
label_format: None
image_size: 256
train_batch_size: 32
test_batch_size: 32
inference_batch_size: 32
num_workers: 32
transform_config: null
create_validation_set: false
tiling:
apply: true
tile_size: 64
stride: null
remove_border_count: 0
use_random_tiling: False
random_tile_count: 16
image_size: 256
train_batch_size: 32
test_batch_size: 32
inference_batch_size: 32
num_workers: 32

model:
name: ganomaly
Expand Down
11 changes: 6 additions & 5 deletions anomalib/models/padim/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ dataset:
path: ./datasets/MVTec
category: bottle
task: segmentation
label_format: None
image_size: 256
train_batch_size: 32
test_batch_size: 32
num_workers: 36
transform_config: null
create_validation_set: false
tiling:
apply: false
tile_size: null
stride: null
remove_border_count: 0
use_random_tiling: False
random_tile_count: 16
image_size: 256
train_batch_size: 32
test_batch_size: 32
num_workers: 36

model:
name: padim
Expand Down
15 changes: 8 additions & 7 deletions anomalib/models/patchcore/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ dataset:
path: ./datasets/MVTec
task: segmentation
category: bottle
label_format: None
image_size: 224
train_batch_size: 32
test_batch_size: 1
num_workers: 36
transform_config: null
create_validation_set: false
tiling:
apply: false
tile_size: null
apply: true
tile_size: 64
stride: null
remove_border_count: 0
use_random_tiling: False
random_tile_count: 16
image_size: 224
train_batch_size: 32
test_batch_size: 1
num_workers: 36

model:
name: patchcore
Expand Down
13 changes: 7 additions & 6 deletions anomalib/models/stfpm/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ dataset:
path: ./datasets/MVTec
category: bottle
task: segmentation
label_format: None
image_size: 256
train_batch_size: 32
test_batch_size: 32
inference_batch_size: 32
num_workers: 36
transform_config: null
create_validation_set: false
tiling:
apply: false
tile_size: null
stride: null
remove_border_count: 0
use_random_tiling: False
random_tile_count: 16
image_size: 256
train_batch_size: 32
test_batch_size: 32
inference_batch_size: 32
num_workers: 36

model:
name: stfpm
Expand Down

0 comments on commit 2dfa0a7

Please sign in to comment.