Skip to content

Commit 79484f7

Browse files
committed
update run_with_minimal_inpu with a clearer description of the data format
1 parent 9e3d557 commit 79484f7

File tree

1 file changed

+16
-40
lines changed

1 file changed

+16
-40
lines changed

auto3dseg/docs/run_with_minimal_input.md

Lines changed: 16 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -18,55 +18,31 @@ if os.path.exists(root):
1818
download_and_extract(resource, compressed_file, root)
1919
```
2020

21-
**Step 1.** Provide the following data list (a ".json" file) for a new task and the data root. The typical data list is shown as follows.
21+
**Step 1.** Provide a `datalist.json` file.
22+
See the documentation under the `load_decathlon_datalist` function in `monai.data.decathlon_datalist` for details on the file format.
2223

24+
For the AutoRunner, you only need the `training` field with its list of training files:
2325
```
2426
{
25-
"training": [
26-
{
27-
"fold": 0,
28-
"image": "image_001.nii.gz",
29-
"label": "label_001.nii.gz"
30-
},
31-
{
32-
"fold": 0,
33-
"image": "image_002.nii.gz",
34-
"label": "label_002.nii.gz"
35-
},
36-
{
37-
"fold": 1,
38-
"image": "image_003.nii.gz",
39-
"label": "label_001.nii.gz"
40-
},
41-
{
42-
"fold": 2,
43-
"image": "image_004.nii.gz",
44-
"label": "label_002.nii.gz"
45-
},
46-
{
47-
"fold": 3,
48-
"image": "image_005.nii.gz",
49-
"label": "label_003.nii.gz"
50-
},
51-
{
52-
"fold": 4,
53-
"image": "image_006.nii.gz",
54-
"label": "label_004.nii.gz"
55-
}
56-
],
57-
"testing": [
58-
{
59-
"image": "image_010.nii.gz"
60-
}
61-
]
27+
"training":
28+
[
29+
{"image": "/path/to/image_1.nii.gz", "label": "/path/to/label_1.nii.gz"},
30+
{"image": "/path/to/image_2.nii.gz", "label": "/path/to/label_2.nii.gz"},
31+
...
32+
]
6233
}
34+
6335
```
36+
In each training item, you can add a `fold` field (with an integer starting at 0) to pre-specify the cross-validation folds, otherwise the AutoRunner will generate its own folds. All trained algorithms will use the same generated or pre-specified folds, the file can be found in the `work_dir` folder that the AutoRunner generates.
37+
It is recommended to add a `name` field and any other metadata fields that allow you to track which version of your dataset the models are trained on.
38+
39+
Save the file to `./datalist.json`.
6440

6541
**Step 2.** Prepare "task.yaml" with the necessary information as follows.
6642

6743
```
68-
modality: CT
69-
datalist: "./task.json"
44+
modality: CT # or MRI
45+
datalist: "./datalist.json"
7046
dataroot: "/workspace/data/task"
7147
```
7248

0 commit comments

Comments
 (0)