Skip to content

Commit

Permalink
Fix issue in tutorial (#997)
Browse files Browse the repository at this point in the history
* Fix issue in tutorial

* Fix lint issue

---------

Co-authored-by: Samet Akcay <[email protected]>
  • Loading branch information
Ravindu987 and samet-akcay authored Apr 6, 2023
1 parent 730bdb6 commit 3e9a109
Showing 1 changed file with 35 additions and 32 deletions.
67 changes: 35 additions & 32 deletions docs/source/how_to_guides/train_custom_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,38 +69,41 @@ Let's choose `Padim algorithm <https://arxiv.org/pdf/2011.08785.pdf>`_, copy the
# Replace the dataset configs with the following.
dataset:
name: hazelnut
format: folder
root: ./datasets/Hazelnut_toy
normal_dir: good # name of the folder containing normal images.
abnormal_dir: colour # name of the folder containing abnormal images.
task: classification # classification or segmentation
mask_dir: null #optional
normal_test_dir: null # optional
extensions: null
split_ratio: 0.2 # normal images ratio to create a test split
seed: 0
image_size: 256
train_batch_size: 32
eval_batch_size: 32
num_workers: 8
transform_config:
train: null
eval: null
val_split_mode: from_test # determines how the validation set is created, options [same_as_test, from_test]
tiling:
apply: false
tile_size: null
stride: null
remove_border_count: 0
use_random_tiling: False
random_tile_count: 16
model:
name: padim
backbone: resnet18
layer:
- layer1
name: hazelnut
format: folder
root: ./datasets/hazelnut_toy
normal_dir: good # name of the folder containing normal images.
abnormal_dir: colour # name of the folder containing abnormal images.
task: classification # classification or segmentation
mask_dir: null #optional
normal_test_dir: null # optional
extensions: null
split_ratio: 0.2 # normal images ratio to create a test split
seed: 0
image_size: 256
train_batch_size: 32
eval_batch_size: 32
num_workers: 8
normalization: imagenet # data distribution to which the images will be normalized
test_split_mode: from_dir # options [from_dir, synthetic]
val_split_ratio: 0.5 # fraction of train/test images held out for validation (usage depends on val_split_mode)
transform_config:
train: null
eval: null
val_split_mode: from_test # determines how the validation set is created, options [same_as_test, from_test]
tiling:
apply: false
tile_size: null
stride: null
remove_border_count: 0
use_random_tiling: False
random_tile_count: 16
model:
name: padim
backbone: resnet18
layer:
- layer1
...
Expand Down

0 comments on commit 3e9a109

Please sign in to comment.