-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.yaml
More file actions
43 lines (40 loc) · 2.2 KB
/
template.yaml
File metadata and controls
43 lines (40 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: DatasetName
# Define an arbitrary number of layers
layers:
SomeImages: # unique layer name
type: image # 'image' for image data and for label data one of: 'semseg' | 'multilabel'
path: some/path/to/data # directory
file_type: .png # required extension incl. dot (e.g., .png | .nii.gz | .b2nd)
pattern: # optional regex to filter files relative to 'path' without file_type
backend: # optional backend to load/write the data (e.g., sitk | nib) for .nii.gz, etc.
channels: 3 # number of channels, required for image
file_stack: False # True if each channel is a separate file: *_0000, *_0001, ...
SomeLabels:
type: semseg # semseg --> Semantic Segmentation | multilabel --> Multilabel Segmentation
path: some/path/to/data
file_type: .png|.nii.gz|.b2nd|...
pattern:
backend:
classes: 19 # number of classes, required for semseg/multilabel
file_stack: False # for multilabel: true if each class is a separate file: *_0000, *_0001, ...
ignore_bg: null # optional bool for labels; if true, class 0 is ignored in metrics and analysis
ignore_index: 255 # optional int for labels; label value to ignore in loss/eval
# Splitting (optional)
splits:
splits_file: some/path/splits_final.json # optional: use a file to define splits, content can be:
# 1) per-split, per-layer: {"train": {"Images": [...], "Labels": [...]}, "val": {"Images": [...], "Labels": [...]}, "test": {...}}
# 2) cross-validation per split: {"train": [{"Images": [...], "Labels": [...]}, {...}], "val": [{"Images": [...], "Labels": [...]}, {...}]}
# IDs must be exact names relative to each layer path, without file_type extension (stacked: use stack root, e.g. "train_001")
# Empty splits are allowed, e.g. "val": []
# optional: Per-layer overrides for paths/patterns by split.
train:
SomeImages: # empty -> use defaults
SomeLabels: # empty -> use defaults
val:
SomeImages:
pattern: some_pattern # optional: example override for pattern parameter for layer and split
path: some/path/to/data # optional: example override for path parameter for layer and split
SomeLabels:
pattern: some_pattern
path: some/path/to/data
test: # empty --> split is not defined