Skip to content

Commit 9e3d557

Browse files
committed
update readme with information on datalist format
1 parent 5bf0ed6 commit 9e3d557

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

auto3dseg/README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,40 @@ We provide [a two-minute example](notebooks/auto3dseg_hello_world.ipynb) for use
5656

5757
To further demonstrate the capabilities of **Auto3DSeg**, [here](./tasks/instance22/README.md) is the detailed performance of the algorithm in **Auto3DSeg**, which won 2nd place in the MICCAI 2022 challenge **[INSTANCE22: The 2022 Intracranial Hemorrhage Segmentation Challenge on Non-Contrast Head CT (NCCT)](https://instance.grand-challenge.org/)**
5858

59+
## Running with Own Data
60+
61+
To run Auto3DSeg on your own dataset, all you need to do is build a `datalist.json` file for your dataset, and run the AutoRunner on it.
62+
63+
The datalist format is based on the datasets released by the (Medical Segmentation Decathlon)[http://medicaldecathlon.com].
64+
See the function `load_decathlon_datalist` in `monai/data/decathlon_datalist.py` for a description of the format.
65+
66+
For the AutoRunner, we only need the `training` data, since it will automatically create cross-validation folds.
67+
Any other metadata, such as `modality`, `numTraining`, `name`, etc. will not be used by the AutoRunner, but we do recommend to keep track of names and versions of the dataset.
68+
In short, your `datalist.json` file should look like this:
69+
70+
```
71+
{
72+
"name": "Example datalist.json"
73+
"training":
74+
[
75+
{"image": "/path/to/image_1.nii.gz", "label": "/path/to/label_1.nii.gz"},
76+
{"image": "/path/to/image_2.nii.gz", "label": "/path/to/label_2.nii.gz"},
77+
...
78+
]
79+
}
80+
81+
```
82+
83+
The AutoRunner will create a `work_dir` folder in the directory from which it is ran, with the resulting models and the copied datalist file _with_ cross-validation folds. This allows you to see which datalist file the models are trained on.
84+
You are free to add the cross-validation folds beforehand, these should align with the number of folds set in the configuration of the AutoRunner (by default 5, see [notebook](notebooks/auto_runner.ipynb)).
85+
5986
## Reference Python APIs for Auto3DSeg
6087

6188
**Auto3DSeg** offers users different levels of APIs to run pipelines that suit their needs.
6289

6390
### 1. Run with Minimal Input using ```AutoRunner```
6491

65-
The user needs to provide a data list (".json" file) for the new task and data root. A typical data list is as this [example](tasks/msd/Task05_Prostate/msd_task05_prostate_folds.json). A sample datalist for an existing MSD formatted dataset can be created using [this notebook](notebooks/msd_datalist_generator.ipynb). After creating the data list, the user can create a simple "task.yaml" file (shown below) as the minimum input for **Auto3DSeg**.
92+
The user needs to provide a data list (".json" file) for the new task and data root. A typical data list is as this [example](tasks/msd/Task05_Prostate/msd_task05_prostate_folds.json). [This notebook](notebooks/msd_crossval_datalist_generator.ipynb) features an example to create a datalist with cross-validation folds from an existing MSD dataset. After creating the data list, the user can create a simple "task.yaml" file (shown below) as the minimum input for **Auto3DSeg**.
6693

6794
```
6895
modality: CT

0 commit comments

Comments
 (0)