Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
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
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Please refer to [MONAI Bundle Specification](https://docs.monai.io/en/latest/mb_

The [get started](https://github.com/Project-MONAI/tutorials/blob/main/bundle/get_started.md) notebook is a step-by-step tutorial to help developers easily get started to develop a bundle. And [bundle examples](https://github.com/Project-MONAI/tutorials/tree/main/bundle) show the typical bundle for 3D segmentation, how to use customized components in a bundle, and how to parse bundle in your own program as "hybrid" mode, etc.

As for the path related varibles within config files (such as "bundle_root"), we suggest to use path that do not include personal information (such as `"/home/your_name/"`).The following is an example of path using:
As for the path related variables within config files (such as "bundle_root"), we suggest using paths that do not include personal information (such as `"/home/your_name/"`). The following is an example of a path definition:

`"bundle_root": "/workspace/data/<bundle name>"`.

Expand Down Expand Up @@ -44,7 +44,7 @@ If a bundle has large files, please upload those files into a publicly accessibl
1. `path`, relative path of the large file in the bundle.
2. `url`, URL link that can download the file.
3. `hash_val`, (**optional**) expected hash value of the file.
4. `hash_type`, (**optional**) hash type. Supprted hash type includes "md5", "sha1", "sha256" and "sha512".
4. `hash_type`, (**optional**) hash type. Supported hash types include "md5", "sha1", "sha256" and "sha512".

The template is as follow, and you can also click [here](https://github.com/Project-MONAI/model-zoo/blob/dev/models/spleen_ct_segmentation/large_files.yml) to see an actual example of `spleen_ct_segmentation`:

Expand Down
8 changes: 4 additions & 4 deletions docs/readme_template.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Model Title

### **Authors**
*Anyone who should be attributed as part of the model. If multiple people or companies, use a comma seperated list*
*Anyone who should be attributed as part of the model. If multiple people or companies, use a comma separated list*

Example:

Firstname1 LastName1, Firstname2 Lastname2, Affiliation1

### **Tags**
*What tags describe the model and task performed? Use a comma seperated list*
*What tags describe the model and task performed? Use a comma separated list*

Example:

Expand Down Expand Up @@ -45,7 +45,7 @@ This model achieves the following results on COCO 2017 validation: a box AP (ave
For more details regarding evaluation results, we refer to table 5 of the original paper.


## **Additinal Usage Steps** (Optional)
## **Additional Usage Steps** (Optional)
*If your bundle requires steps outside the normal flow of usage, describe those here in bash style commands.*

Example:
Expand All @@ -67,7 +67,7 @@ Example:
The model was trained for 300 epochs on 16 V100 GPUs. This takes 3 days, with 4 images per GPU (hence a total batch size of 64).

## **Limitations** (Optional)
Are there general limitations of what this model should be used for? Has this been approved for use in any clinicial systems? Are there any things to watch out for when using this model?
Are there general limitations of what this model should be used for? Has this been approved for use in any clinical systems? Are there any things to watch out for when using this model?

Example:
*This training and inference pipeline was developed by NVIDIA. It is based on a segmentation model created by NVIDIA researchers. This research use only software that has not been cleared or approved by FDA or any regulatory agency. Clara’s pre-trained models are for developmental purposes only and cannot be used directly for clinical procedures.*
Expand Down
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
6 changes: 3 additions & 3 deletions models/maisi_ct_generative/scripts/find_masks.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def find_masks(
mask_foldername: str = "./datasets/masks/",
):
"""
Find candidate masks that fullfills all the requirements.
They shoud contain all the anatomies in `anatomy_list`.
Find candidate masks that fulfills all the requirements.
They should contain all the anatomies in `anatomy_list`.
If there is no tumor specified in `anatomy_list`, we also expect the candidate masks to be tumor free.
If check_spacing_and_output_size is True, the candidate masks need to have the expected `spacing` and `output_size`.
Args:
Expand All @@ -74,7 +74,7 @@ def find_masks(
database_filepath: path for the json file that stores the information of all the candidate masks.
mask_foldername: directory that saves all the candidate masks.
Return:
candidate_masks, list of dict, each dict contains information of one candidate mask that fullfills all the requirements.
candidate_masks, list of dict, each dict contains information of one candidate mask that fulfills all the requirements.
"""
# check and preprocess input
if isinstance(anatomy_list, int):
Expand Down
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -32,7 +32,7 @@ The neural architecture search was performed with the following:
- Initial Learning Rate: 0.025
- Loss: DiceCELoss

### Optimial Architecture Training Configuration
### Optimal Architecture Training Configuration
The training was performed with the following:

- AMP: True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

""" Nested Transformer (NesT) in PyTorch
"""Nested Transformer (NesT) in PyTorch
A PyTorch implement of Aggregating Nested Transformers as described in:
'Aggregating Nested Transformers'
- https://arxiv.org/abs/2105.12723
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
Loading
Loading