Skip to content
Open
Show file tree
Hide file tree
Changes from all 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 Expand Up @@ -114,7 +114,7 @@ This result is benchmarked under:
## MONAI Bundle Commands
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.

For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
For more detailed usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).

### Execute Autoencoder Training

Expand Down
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -112,7 +112,7 @@ This result is benchmarked under:

In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.

For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
For more detailed usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).

### Execute Autoencoder Training

Expand Down
2 changes: 1 addition & 1 deletion models/brats_mri_segmentation/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ This result is benchmarked under:
## MONAI Bundle Commands
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.

For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
For more detailed usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).

#### Execute training:

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_inbody_classification/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ This result is benchmarked under:
## MONAI Bundle Commands
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.

For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
For more detailed usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).

#### Execute training:

Expand Down
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -92,7 +92,7 @@ This result is benchmarked under:
## MONAI Bundle Commands
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.

For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
For more detailed usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).

#### Execute training:

Expand Down
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -93,7 +93,7 @@ This result is benchmarked under:
## MONAI Bundle Commands
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.

For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
For more detailed usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).

#### Execute 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
2 changes: 1 addition & 1 deletion models/multi_organ_segmentation/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Mean Dice = 88.6%
## MONAI Bundle Commands
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.

For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
For more detailed usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).

#### Execute model searching:

Expand Down
6 changes: 3 additions & 3 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 Expand Up @@ -112,7 +112,7 @@ Users can install Graphviz for visualization of searched architectures (needed i
## MONAI Bundle Commands
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.

For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
For more detailed usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).

#### Execute model searching:

Expand Down
2 changes: 1 addition & 1 deletion models/pathology_nuclei_classification/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ This result is benchmarked under:
## MONAI Bundle Commands
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.

For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
For more detailed usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).

#### Execute training:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The model is trained to simultaneously segment and classify nuclei, and a two-st

There are two training modes in total. If "original" mode is specified, [270, 270] and [80, 80] are used for `patch_size` and `out_size` respectively. If "fast" mode is specified, [256, 256] and [164, 164] are used for `patch_size` and `out_size` respectively. The results shown below are based on the "fast" mode.

In this bundle, the first stage is trained with pre-trained weights from some internal data. The [original author's repo](https://github.com/vqdang/hover_net) and [torchvison](https://pytorch.org/vision/stable/_modules/torchvision/models/resnet.html#ResNet18_Weights) also provide pre-trained weights but for non-commercial use.
In this bundle, the first stage is trained with pre-trained weights from some internal data. The [original author's repo](https://github.com/vqdang/hover_net) and [torchvision](https://pytorch.org/vision/stable/_modules/torchvision/models/resnet.html#ResNet18_Weights) also provide pre-trained weights but for non-commercial use.
Each user is responsible for checking the content of models/datasets and the applicable licenses and determining if suitable for the intended use.

If you want to train the first stage with pre-trained weights, just specify `--network_def#pretrained_url <your pretrain weights URL>` in the training command below, such as [ImageNet](https://download.pytorch.org/models/resnet18-f37072fd.pth).
Expand All @@ -33,10 +33,10 @@ unzip consep_dataset.zip

### Preprocessing

After download the [datasets](https://warwick.ac.uk/fac/cross_fac/tia/data/hovernet/consep_dataset.zip), please run `scripts/prepare_patches.py` to prepare patches from tiles. Prepared patches are saved in `<your concep dataset path>`/Prepared. The implementation is referring to <https://github.com/vqdang/hover_net>. The command is like:
After download the [datasets](https://warwick.ac.uk/fac/cross_fac/tia/data/hovernet/consep_dataset.zip), please run `scripts/prepare_patches.py` to prepare patches from tiles. Prepared patches are saved in `<your consep dataset path>`/Prepared. The implementation is referring to <https://github.com/vqdang/hover_net>. The command is like:

```
python scripts/prepare_patches.py --root <your concep dataset path>
python scripts/prepare_patches.py --root <your consep dataset path>
```

## Training configuration
Expand Down Expand Up @@ -121,7 +121,7 @@ This result is benchmarked under:
## MONAI Bundle Commands
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.

For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
For more detailed usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).

#### Execute training, the evaluation during the training were evaluated on patches:
Please note that if the default dataset path is not modified with the actual path in the bundle config files, you can also override it by using `--dataset_dir`:
Expand Down
2 changes: 1 addition & 1 deletion models/pathology_nuclick_annotation/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ This result is benchmarked under:
## MONAI Bundle Commands
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.

For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
For more detailed usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).

#### Execute training:

Expand Down
Loading
Loading