Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ An example result from inference is shown below:
**This is a demonstration network meant to just show the training process for this sort of network with MONAI. To achieve better performance, users need to use larger dataset like [BraTS 2021](https://www.synapse.org/#!Synapse:syn25829067/wiki/610865).**

## Data
The training data is BraTS 2016 and 2017 from the Medical Segmentation Decathalon. Users can find more details on the dataset (`Task01_BrainTumour`) at http://medicaldecathlon.com/.
The training data is BraTS 2016 and 2017 from the Medical Segmentation Decathlon. Users can find more details on the dataset (`Task01_BrainTumour`) at http://medicaldecathlon.com/.

- Target: Image Generation
- Task: Synthesis
Expand Down
2 changes: 1 addition & 1 deletion models/brats_mri_generative_diffusion/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ An example result from inference is shown below:
**This is a demonstration network meant to just show the training process for this sort of network with MONAI. To achieve better performance, users need to use larger dataset like [Brats 2021](https://www.synapse.org/#!Synapse:syn25829067/wiki/610865) and have GPU with memory larger than 32G to enable larger networks and attention layers.**

## Data
The training data is BraTS 2016 and 2017 from the Medical Segmentation Decathalon. Users can find more details on the dataset (`Task01_BrainTumour`) at http://medicaldecathlon.com/.
The training data is BraTS 2016 and 2017 from the Medical Segmentation Decathlon. Users can find more details on the dataset (`Task01_BrainTumour`) at http://medicaldecathlon.com/.

- Target: Image Generation
- Task: Synthesis
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Description

A diffusion model to synthetise X-Ray images based on radiological report impressions.
A diffusion model to synthesise X-Ray images based on radiological report impressions.

# Model Overview
This model is trained from scratch using the Latent Diffusion Model architecture [1] and is used for the synthesis of
Expand All @@ -20,7 +20,7 @@ original images to have a format of 512 x 512 pixels.
## Preprocessing
We resized the original images to make the smallest sides have 512 pixels. When inputting it to the network, we center
cropped the images to 512 x 512. The pixel intensity was normalised to be between [0, 1]. The text data was obtained
from associated radiological reports. We randoomly extracted sentences from the findings and impressions sections of the
from associated radiological reports. We randomly extracted sentences from the findings and impressions sections of the
reports, having a maximum of 5 sentences and 77 tokens. The text was tokenised using the CLIPTokenizer from
transformers package (https://github.com/huggingface/transformers) (pretrained model
"stabilityai/stable-diffusion-2-1-base") and then encoded using CLIPTextModel from the same package and pretrained
Expand Down
2 changes: 1 addition & 1 deletion models/endoscopic_tool_segmentation/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Since datasets are private, existing public datasets like [EndoVis 2017](https:/
### Preprocessing
When using EndoVis or any other dataset, it should be divided into "train", "valid" and "test" folders. Samples in each folder would better be images and converted to jpg format. Otherwise, "images", "labels", "val_images" and "val_labels" parameters in `configs/train.json` and "datalist" in `configs/inference.json` should be modified to fit given dataset. After that, "dataset_dir" parameter in `configs/train.json` and `configs/inference.json` should be changed to root folder which contains "train", "valid" and "test" folders.

Please notice that loading data operation in this bundle is adaptive. If images and labels are not in the same format, it may lead to a mismatching problem. For example, if images are in jpg format and labels are in npy format, PIL and Numpy readers will be used separately to load images and labels. Since these two readers have their own way to parse file's shape, loaded labels will be transpose of the correct ones and incur a missmatching problem.
Please notice that loading data operation in this bundle is adaptive. If images and labels are not in the same format, it may lead to a mismatching problem. For example, if images are in jpg format and labels are in npy format, PIL and Numpy readers will be used separately to load images and labels. Since these two readers have their own way to parse file's shape, loaded labels will be transpose of the correct ones and incur a mismatching problem.

## Training configuration
The training as performed with the following:
Expand Down
2 changes: 1 addition & 1 deletion models/lung_nodule_ct_detection/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In these files, the values of "box" are the ground truth boxes in world coordina
The raw CT images in LUNA16 have various of voxel sizes. The first step is to resample them to the same voxel size.
In this model, we resampled them into 0.703125 x 0.703125 x 1.25 mm.

Please following the instruction in Section 3.1 of https://github.com/Project-MONAI/tutorials/tree/main/detection to do the resampling.
Please follow the instruction in Section 3.1 of https://github.com/Project-MONAI/tutorials/tree/main/detection to do the resampling.

### Data download
The mhd/raw original data can be downloaded from [LUNA16](https://luna16.grand-challenge.org/Home/). The DICOM original data can be downloaded from [LIDC-IDRI database](https://wiki.cancerimagingarchive.net/display/Public/LIDC-IDRI) [3,4,5]. You will need to resample the original data to start training.
Expand Down
2 changes: 1 addition & 1 deletion models/pancreas_ct_dints_segmentation/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A neural architecture search algorithm for volumetric (3D) segmentation of the p
![image](https://developer.download.nvidia.com/assets/Clara/Images/clara_pt_net_arch_search_segmentation_workflow_4-1.png)

## Data
The training dataset is the Pancreas Task from the Medical Segmentation Decathalon. Users can find more details on the datasets at http://medicaldecathlon.com/.
The training dataset is the Pancreas Task from the Medical Segmentation Decathlon. Users can find more details on the datasets at http://medicaldecathlon.com/.

- Target: Pancreas and pancreatic tumor
- Modality: Portal venous phase CT
Expand Down
2 changes: 1 addition & 1 deletion models/segmentation_template/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ so doesn't do anything useful on its own. The purpose is to demonstrate the base
bundles compatible with MONAILabel amongst other things.

To use this bundle, copy the contents of the whole directory and change the definitions for network, data, transforms,
or whatever else you want for your own new segmentation bundle. Some of the names are critical for MONAILable but
or whatever else you want for your own new segmentation bundle. Some of the names are critical for MONAI Label but
otherwise you're free to change just about whatever else is defined here to suit your network.

This bundle should also demonstrate good practice and design, however there is one caveat about definitions being
Expand Down
2 changes: 1 addition & 1 deletion models/spleen_ct_segmentation/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This model is trained using the runner-up [1] awarded pipeline of the "Medical S
![model workflow](https://developer.download.nvidia.com/assets/Clara/Images/clara_pt_spleen_ct_segmentation_workflow.png)

## Data
The training dataset is the Spleen Task from the Medical Segmentation Decathalon. Users can find more details on the datasets at http://medicaldecathlon.com/.
The training dataset is the Spleen Task from the Medical Segmentation Decathlon. Users can find more details on the datasets at http://medicaldecathlon.com/.

- Target: Spleen
- Modality: CT
Expand Down
2 changes: 1 addition & 1 deletion models/spleen_deepedit_annotation/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DeepEdit is an algorithm that combines the power of two models in one single arc
The model was trained on 32 images and validated on 9 images.

## Data
The training dataset is the Spleen Task from the Medical Segmentation Decathalon. Users can find more details on the datasets at http://medicaldecathlon.com/.
The training dataset is the Spleen Task from the Medical Segmentation Decathlon. Users can find more details on the datasets at http://medicaldecathlon.com/.

- Target: Spleen
- Modality: CT
Expand Down
2 changes: 1 addition & 1 deletion models/ventricular_short_axis_3label/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The network is trained with this data in conjunction with a series of augmentati

Free-form deformation is applied to vary the shape of the heart and its surrounding tissues which mimics to a degree deformation like what would be observed through the cardiac cycle. This of course does not replicate the heart moving through plane during the cycle or represent other observed changes but does provide enough variation that full-cycle segmentation is generally acceptable.

Smooth fields are used to vary contrast and intensity in localised regions to simulate some of the variation in image quality caused by acquisition artefacts. Guassian noise is also added to simulate poor quality acquisition. These together force the network to learn to deal with a wider variation of image quality and partially to account for the difference between scanner vendors.
Smooth fields are used to vary contrast and intensity in localised regions to simulate some of the variation in image quality caused by acquisition artefacts. Gaussian noise is also added to simulate poor quality acquisition. These together force the network to learn to deal with a wider variation of image quality and partially to account for the difference between scanner vendors.

Training is invoked with the following command line:

Expand Down
2 changes: 1 addition & 1 deletion models/vista2d/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ python -m monai.bundle run_workflow "scripts.workflow.VistaCell" --config_file c
You can override the `basedir` to specify a different dataset directory by using the following command:

```bash
python -m monai.bundle run_workflow "scripts.workflow.VistaCell" --config_file configs/hyper_parameters.yaml --basedir <actual dataset ditectory>
python -m monai.bundle run_workflow "scripts.workflow.VistaCell" --config_file configs/hyper_parameters.yaml --basedir <actual dataset directory>
```

#### Quick run with a few data points
Expand Down
8 changes: 4 additions & 4 deletions models/vista3d/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Model Overview
Vista3D model fintuning/evaluation/inference pipeline. VISTA3D is trained using over 20 partial datasets with more complicated pipeline. To avoid confusion, we will only provide finetuning/continual learning APIs for users to finetune on their
Vista3D model finetuning/evaluation/inference pipeline. VISTA3D is trained using over 20 partial datasets with more complicated pipeline. To avoid confusion, we will only provide finetuning/continual learning APIs for users to finetune on their
own datasets. To reproduce the paper results, please refer to https://github.com/Project-MONAI/VISTA/tree/main/vista3d

# Installation Guide
Expand Down Expand Up @@ -68,7 +68,7 @@ Example code for 5 fold cross-validation generation can be found [here](data.md)
Note the data is not the absolute path to the image and label file. The actual image file will be `os.path.join(dataset_dir, data["training"][item]["image"])`, where `dataset_dir` is defined in `configs/train_continual.json`. Also 5-fold cross-validation is not required! `fold=0` is defined in train.json, which means any data item with fold==0 will be used as validation and other fold will be used for training. So if you only have train/val split, you can manually set validation data with "fold": 0 in its datalist and the other to be training by setting "fold" to any number other than 0.
```
## Step2: Changing hyperparameters
For continual learning, user can change `configs/train_continual.json`. More advanced users can change configurations in `configs/train.json`. Most hyperparameters are straighforward and user can tell based on their names. The users must manually change the following keys in `configs/train_continual.json`.
For continual learning, user can change `configs/train_continual.json`. More advanced users can change configurations in `configs/train.json`. Most hyperparameters are straightforward and user can tell based on their names. The users must manually change the following keys in `configs/train_continual.json`.
#### 1. `label_mappings`
```
"label_mappings": {
Expand All @@ -94,10 +94,10 @@ For continual learning, user can change `configs/train_continual.json`. More adv
Change `data_list_file_path` to the absolute path of your data json split. Change `dataset_dir` to the root folder that combines with the relative path in the data json split.

#### 3. Optional hyperparameters and details are [here](finetune.md).
Hyperparameteers finetuning is important and varies from task to task.
Hyperparameters finetuning is important and varies from task to task.

## Step3: Run finetuning
The hyperparameters in `configs/train_continual.json` will overwrite ones in `configs/train.json`. Configs in the back will overide the previous ones if they have the same key.
The hyperparameters in `configs/train_continual.json` will overwrite ones in `configs/train.json`. Configs in the back will override the previous ones if they have the same key.

Single-GPU:
```bash
Expand Down
2 changes: 1 addition & 1 deletion models/vista3d/docs/data.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Best practice to generate data list
User can use monai to generate the 5-fold data lists. Full exampls can be found in VISTA3D open source [codebase](https://github.com/Project-MONAI/VISTA/blob/main/vista3d/data/make_datalists.py)
User can use monai to generate the 5-fold data lists. Full examples can be found in VISTA3D open source [codebase](https://github.com/Project-MONAI/VISTA/blob/main/vista3d/data/make_datalists.py)
```python
from monai.data.utils import partition_dataset
from monai.bundle import ConfigParser
Expand Down
4 changes: 2 additions & 2 deletions models/vista3d/docs/finetune.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#### Best practice to set label_mapping

For a class that represent the same or similar class as the global index, directly map it to the global index. For example, "mouse left lung" (e.g. index 2 in the mouse dataset) can be mapped to the 28 "left lung upper lobe"(or 29 "left lung lower lobe") with [[2,28]]. After finetuning, 28 now represents "mouse left lung" and will be used for segmentation. If you want to segment 4 substructures of aorta, you can map one of the substructuress to 6 aorta and the rest to any value, [[1,6],[2,133],[3,134],[4,135]].
For a class that represent the same or similar class as the global index, directly map it to the global index. For example, "mouse left lung" (e.g. index 2 in the mouse dataset) can be mapped to the 28 "left lung upper lobe"(or 29 "left lung lower lobe") with [[2,28]]. After finetuning, 28 now represents "mouse left lung" and will be used for segmentation. If you want to segment 4 substructures of aorta, you can map one of the substructures to 6 aorta and the rest to any value, [[1,6],[2,133],[3,134],[4,135]].
```
NOTE: Do not map to global index value >= 255. `num_classes=255` in the config only represent the maximum mapping index, while the actual output class number only depends on your label_mapping definition. The 255 value in the inference output is also used to represent 'NaN' value.
```
Expand All @@ -18,7 +18,7 @@ Users can disable if the validation takes too long.
In `train_continual.json`, only `n_train_samples` and `n_val_samples` are used for training and validation.

#### `patch_size`
The patch size parameter is defined in `configs/train_continual.json`: `"patch_size": [128, 128, 128]`. For finetuning purposes, this value needs to be changed acccording to user's task and GPU memory. Usually a larger patch_size will give better final results. `[192,192,128]` is a good value for larger memory GPU.
The patch size parameter is defined in `configs/train_continual.json`: `"patch_size": [128, 128, 128]`. For finetuning purposes, this value needs to be changed according to user's task and GPU memory. Usually a larger patch_size will give better final results. `[192,192,128]` is a good value for larger memory GPU.

#### `resample_to_spacing`
The resample_to_spacing parameter is defined in `configs/train_continual.json` and it represents the resolution the model will be trained on. The `1.5,1.5,1.5` mm default is suitable for large CT organs, but for other tasks, this value should be changed to achive the optimal performance.
Expand Down
2 changes: 1 addition & 1 deletion models/vista3d/docs/inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ All the configurations for inference is stored in inference.json, change those p
- The `label_prompt` is a list of length `B`, which can perform `B` foreground objects segmentation, e.g. `[2,3,4,5]`. If `B>1`, Point prompts must NOT be provided.
- The `points` is of shape `[N, 3]` like `[[x1,y1,z1],[x2,y2,z2],...[xN,yN,zN]]`, representing `N` point coordinates **IN THE ORIGINAL IMAGE SPACE** of a single foreground object. `point_labels` is a list of length [N] like [1,1,0,-1,...], which
matches the `points`. 0 means background, 1 means foreground, -1 means ignoring this point. `points` and `point_labels` must pe provided together and match length.
- **B must be 1 if label_prompt and points are provided together**. The inferer only supports SINGLE OBJECT point click segmentatation.
- **B must be 1 if label_prompt and points are provided together**. The inferer only supports SINGLE OBJECT point click segmentation.
- If no prompt is provided, the model will use `everything_labels` to segment 117 classes:

```Python
Expand Down
8 changes: 4 additions & 4 deletions models/wholeBrainSeg_Large_UNEST_segmentation/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Fig.2 - The network architecture of UNEST Base model


## Data
The training data is from the Vanderbilt University and Vanderbilt University Medical Center with public released OASIS and CANDI datsets.
The training data is from the Vanderbilt University and Vanderbilt University Medical Center with public released OASIS and CANDI datasets.
Training and testing data are MRI T1-weighted (T1w) 3D volumes coming from 3 different sites. There are a total of 133 classes in the whole brain segmentation task.
Among 50 T1w MRI scans from Open Access Series on Imaging Studies (OASIS) (Marcus et al., 2007) dataset, 45 scans are used for training and the other 5 for validation.
The testing cohort contains Colin27 T1w scan (Aubert-Broche et al., 2006) and 13 T1w MRI scans from the Child and Adolescent Neuro Development Initiative (CANDI)
Expand All @@ -52,7 +52,7 @@ The data should be in the MNI305 space before inference.

If your images are already in MNI space, skip the registration step.

You could use any resitration tool to register image to MNI space. Here is an example using ants.
You could use any registration tool to register image to MNI space. Here is an example using ants.
Registration to MNI Space: Sample suggestion. E.g., use ANTS or other tools for registering T1 MRI image to MNI305 Space.

```
Expand Down Expand Up @@ -158,8 +158,8 @@ With 10 fine-tuned labels, the training process converges fast.
| 132 : Left-TTG---transverse-temporal-gyrus |


## Bundle Integration in MONAI Lable
The inference and training pipleine can be easily used by the MONAI Label server and 3D Slicer for fast labeling T1w MRI images in MNI space.
## Bundle Integration in MONAI Label
The inference and training pipeline can be easily used by the MONAI Label server and 3D Slicer for fast labeling T1w MRI images in MNI space.

![](./3DSlicer_use.png) <br>

Expand Down
Loading