diff --git a/README.md b/README.md index 7a4a69e1e9..a36bf0ef2f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Its ambitions are: ## Features > _The codebase is currently under active development._ -> _Please see [the technical highlights](https://docs.monai.io/en/latest/highlights.html) of the current milestone release._ +> _Please see [the technical highlights](https://docs.monai.io/en/latest/highlights.html) and [What's New](https://docs.monai.io/en/latest/whatsnew.html) of the current milestone release._ - flexible pre-processing for multi-dimensional medical imaging data; - compositional & portable APIs for ease of integration in existing workflows; diff --git a/docs/images/deepgrow.png b/docs/images/deepgrow.png index ec675009d1..d006bd0d09 100644 Binary files a/docs/images/deepgrow.png and b/docs/images/deepgrow.png differ diff --git a/docs/images/deepgrow_scheme.png b/docs/images/deepgrow_scheme.png new file mode 100644 index 0000000000..9b4e400839 Binary files /dev/null and b/docs/images/deepgrow_scheme.png differ diff --git a/docs/source/highlights.md b/docs/source/highlights.md index 3cb5cf6c71..d6fcc473c6 100644 --- a/docs/source/highlights.md +++ b/docs/source/highlights.md @@ -1,8 +1,8 @@ -# Modules in v0.5.0 +# Modules overview MONAI aims at supporting deep learning in medical image analysis at multiple granularities. This figure shows a typical example of the end-to-end workflow in medical deep learning area: -![image](../images/end_to_end.png) +![an end to end workflow](../images/end_to_end.png) ## MONAI architecture The design principle of MONAI is to provide flexible and light APIs for users with varying expertise. @@ -12,7 +12,7 @@ The design principle of MONAI is to provide flexible and light APIs for users wi 4. Researchers contribute implementations based on the state-of-the-art for the latest research challenges, including COVID-19 image analysis, Model Parallel, etc. The overall architecture and modules are shown in the following figure: -![image](../images/arch_modules_v0.4.png) +![architecture overview](../images/arch_modules_v0.4.png) The rest of this page provides more details for each module. * [Data I/O, processing and augmentation](#medical-image-data-i-o-processing-and-augmentation) @@ -50,7 +50,7 @@ transformations. These currently include, for example: - `Rand3DElastic`: Random elastic deformation and affine in 3D [2D transforms tutorial](https://github.com/Project-MONAI/tutorials/blob/master/modules/transforms_demo_2d.ipynb) shows the detailed usage of several MONAI medical image specific transforms. -![image](../images/medical_transforms.png) +![2d transform examples](../images/medical_transforms.png) ### 3. Fused spatial transforms and GPU acceleration As medical image volumes are usually large (in multi-dimensional arrays), pre-processing performance affects the overall pipeline speed. MONAI provides affine transforms to execute fused spatial operations, supports GPU acceleration via native PyTorch for high performance. @@ -71,7 +71,7 @@ new_img = affine(image, spatial_size=(300, 400), mode='bilinear') Experiments and test results are available at [Fused transforms test](https://github.com/Project-MONAI/tutorials/blob/master/acceleration/transform_speed.ipynb). Currently all the geometric image transforms (Spacing, Zoom, Rotate, Resize, etc.) are designed based on the PyTorch native interfaces. [Geometric transforms tutorial](https://github.com/Project-MONAI/tutorials/blob/master/modules/3d_image_transforms.ipynb) indicates the usage of affine transforms with 3D medical images. -![image](../images/affine.png) +![3d transform examples](../images/affine.png) ### 4. Randomly crop out batch images based on positive/negative ratio Medical image data volume may be too large to fit into GPU memory. A widely-used approach is to randomly draw small size data samples during training and run a “sliding window” routine for inference. MONAI currently provides general random sampling strategies including class-balanced fixed ratio sampling which may help stabilize the patch-based training process. A typical example is in [Spleen 3D segmentation tutorial](https://github.com/Project-MONAI/tutorials/blob/master/3d_segmentation/spleen_segmentation_3d.ipynb), which achieves the class-balanced sampling with `RandCropByPosNegLabel` transform. @@ -99,7 +99,7 @@ monai.utils.set_determinism(seed=0, additional_settings=None) To apply different transforms on the same data and concatenate the results, MONAI provides `CopyItems` transform to make copies of specified items in the data dictionary and `ConcatItems` transform to combine specified items on the expected dimension, and also provides `DeleteItems` transform to delete unnecessary items to save memory. Typical usage is to scale the intensity of the same image into different ranges and concatenate the results together. -![image](../images/multi_transform_chains.png) +![multiple transform chains](../images/multi_transform_chains.png) ### 7. Debug transforms with DataStats When transforms are combined with the "compose" function, it's not easy to track the output of specific transform. To help debug errors in the composed transforms, MONAI provides utility transforms such as `DataStats` to print out intermediate data properties such as `data shape`, `value range`, `data value`, `Additional information`, etc. It's a self-contained transform and can be integrated into any transform chain. @@ -113,7 +113,7 @@ MONAI also provides post-processing transforms for handling the model outputs. C - Extracting contour of segmentation result, which can be used to map to original image and evaluate the model, as below figure (d) and (e). After applying the post-processing transforms, it's easier to compute metrics, save model output into files or visualize data in the TensorBoard. [Post transforms tutorial](https://github.com/Project-MONAI/tutorials/blob/master/modules/post_transforms.ipynb) shows an example with several main post transforms. -![image](../images/post_transforms.png) +![post-processing transforms](../images/post_transforms.png) ### 9. Integrate third-party transforms The design of MONAI transforms emphasis code readability and usability. It works for array data or dictionary-based data. MONAI also provides `Adaptor` tools to accommodate different data format for 3rd party transforms. To convert the data shapes or types, utility transforms such as `ToTensor`, `ToNumpy`, `SqueezeDim` are also provided. So it's easy to enhance the transform chain by seamlessly integrating transforms from external packages, including: `ITK`, `BatchGenerator`, `TorchIO` and `Rising`. @@ -122,11 +122,11 @@ For more details, please check out the tutorial: [integrate 3rd party transforms ### 10. IO factory for medical image formats Many popular image formats exist in the medical domain, and they are quite different with rich metadata information. To easily handle different medical image formats in the same pipeline, [MONAI provides `LoadImage` transform](https://github.com/Project-MONAI/tutorials/blob/master/modules/load_medical_images.ipynb), which can automatically choose image readers based on the supported suffixes and in below priority order: -- User-specified reader at runtime when call this loader. -- Registered readers from the latest to the first in list. +- User-specified reader at runtime when calling this loader. +- Registered readers from the latest to the first in the list. - Default readers: (nii, nii.gz -> NibabelReader), (png, jpg, bmp -> PILReader), (npz, npy -> NumpyReader), (others -> ITKReader). -The `ImageReader` API is quite straight-forward, users can easily extend for their own customized image readers. +The `ImageReader` API is quite straightforward, users can easily extend it for their own customized image readers. With these pre-defined image readers, MONAI can load images in formats: `NIfTI`, `DICOM`, `PNG`, `JPG`, `BMP`, `NPY/NPZ`, etc. @@ -144,21 +144,21 @@ If the pipeline includes random transformations, users may want to observe the e [Invert transforms and TTA tutorials](https://github.com/Project-MONAI/tutorials/blob/master/modules/inverse_transforms_and_test_time_augmentations.ipynb) introduce details about the API with usage examples. (1) The last column is the inverted data of model output: -![image](../images/invert_transforms.png) +![invert transform](../images/invert_transforms.png) (2) The TTA results of `mode`, `mean` and `standard deviation`: -![image](../images/tta.png) +![test time augmentation](../images/tta.png) ## Datasets ### 1. Cache IO and transforms data to accelerate training Users often need to train the model with many (potentially thousands of) epochs over the data to achieve the desired model quality. A native PyTorch implementation may repeatedly load data and run the same preprocessing steps for every epoch during training, which can be time-consuming and unnecessary, especially when the medical image volumes are large. MONAI provides a multi-threads `CacheDataset` and `LMDBDataset` to accelerate these transformation steps during training by storing the intermediate outcomes before the first randomized transform in the transform chain. Enabling this feature could potentially give 10x training speedups in the [Datasets experiment](https://github.com/Project-MONAI/tutorials/blob/master/acceleration/dataset_type_performance.ipynb). -![image](../images/cache_dataset.png) +![digital pathology](../images/cache_dataset.png) ### 2. Cache intermediate outcomes into persistent storage The `PersistentDataset` is similar to the CacheDataset, where the intermediate cache values are persisted to disk storage or LMDB for rapid retrieval between experimental runs (as is the case when tuning hyperparameters), or when the entire data set size exceeds available memory. The `PersistentDataset` could achieve similar performance when comparing to `CacheDataset` in [Datasets experiment](https://github.com/Project-MONAI/tutorials/blob/master/acceleration/dataset_type_performance.ipynb). -![image](../images/datasets_speed.png) +![cachedataset speed](../images/datasets_speed.png) ### 3. SmartCache mechanism for big datasets During training with very big volume dataset, an efficient approach is to only train with a subset of the dataset in an epoch and dynamically replace part of the subset in every epoch. It's the `SmartCache` mechanism in [NVIDIA Clara-train SDK](https://docs.nvidia.com/clara/tlt-mi/clara-train-sdk-v3.0/nvmidl/additional_features/smart_cache.html#smart-cache). @@ -208,7 +208,7 @@ To quickly get started with popular training data in the medical domain, MONAI p MONAI always welcome new contributions of public datasets, please refer to existing Datasets and leverage the download and extracting APIs, etc. [Public datasets tutorial](https://github.com/Project-MONAI/tutorials/blob/master/modules/public_datasets.ipynb) indicates how to quickly set up training workflows with `MedNISTDataset` and `DecathlonDataset` and how to create a new `Dataset` for public data. The common workflow of predefined datasets: -![image](../images/dataset_progress.png) +![pre-defined dataset](../images/dataset_progress.png) ### 7. Partition dataset for cross validation The `partition_dataset` utility in MONAI can perform several kinds of mechanism to partition dataset for training and validation or cross-validation. It supports shuffling based on a specified random seed, and will return a set of datasets, each dataset contains one partition. And it can split the dataset based on specified ratios or evenly split into `num_partitions`. For given class labels, it can also make sure the same ratio of classes in every partition. @@ -220,7 +220,7 @@ There are domain-specific loss functions in the medical imaging research which a MONAI provides several advanced features in optimizers to help accelerate the training or fine-tuning progress. For example, `Novograd` optimizer can be used to converge obviously faster than traditional optimizers. And users can easily define different learning rates for the model layers based [on the `generate_param_groups` utility API](https://github.com/Project-MONAI/tutorials/blob/master/modules/layer_wise_learning_rate.ipynb). Another important feature is `LearningRateFinder`. The learning rate range test increases the learning rate in a pre-training run between two boundaries in a linear or exponential manner. It provides valuable information on how well the network can be trained over a range of learning rates and what the optimal learning rates are. [LearningRateFinder tutorial](https://github.com/Project-MONAI/tutorials/blob/master/modules/learning_rate.ipynb) indicates the API usage examples. -![image](../images/lr_finder.png) +![learning rate finder plot](../images/lr_finder.png) ## Network architectures Some deep neural network architectures have shown to be particularly effective for medical imaging analysis tasks. MONAI implements reference networks with the aims of both flexibility and code readability. @@ -254,7 +254,7 @@ A typical process is: 2. Iteratively run batched window inferences until all windows are analyzed. 3. Aggregate the inference outputs to a single segmentation map. 4. Save the results to file or compute some evaluation metrics. -![image](../images/sliding_window.png) +![sliding window scheme](../images/sliding_window.png) The [Spleen 3D segmentation tutorial](https://github.com/Project-MONAI/tutorials/blob/master/3d_segmentation/spleen_segmentation_3d.ipynb) leverages `SlidingWindow` inference for validation. @@ -265,19 +265,19 @@ For example, `Mean Dice` score can be used for segmentation tasks, and the area ### 3. Metrics report generation During evaluation, users usually save the metrics of every input image, then analyze the bad cases to improve the deep learning pipeline. To save detailed information of metrics, MONAI provided a handler `MetricsSaver`, which can save the final metric values, raw metric of every model output channel of every input image, metrics summary report of operations: `mean`, `median`, `max`, `min`, `90percent`, `std`, etc. The `MeanDice` reports of validation with prostate dataset are as below: -![image](../images/metrics_report.png) +![metrics report example](../images/metrics_report.png) ## Visualization Beyond the simple point and curve plotting, MONAI provides intuitive interfaces to visualize multidimensional data as GIF animations in TensorBoard. This could provide a quick qualitative assessment of the model by visualizing, for example, the volumetric inputs, segmentation maps, and intermediate feature maps. A runnable example with visualization is available at [UNet training example](https://github.com/Project-MONAI/tutorials/blob/master/3d_segmentation/torch/unet_training_dict.py). And to visualize the class activation mapping for a trained classification model, MONAI provides CAM, GradCAM, GradCAM++ APIs for both 2D and 3D models: -![image](../images/cam.png) +![CAM visualization example](../images/cam.png) The above example is generated by computing [GradCAM/GradCAM++ from a lung CT lesion classification model](https://github.com/Project-MONAI/tutorials/tree/master/modules/interpretability). ## Result writing -Currently MONAI supports writing the model outputs as NIfTI files or PNG files for segmentation tasks, and as CSV files for classification tasks. And the writers can restore the data spacing, orientation or shape according to the `original_shape` or `original_affine` information from the input image. +Currently, MONAI supports writing the model outputs as NIfTI files or PNG files for segmentation tasks, and as CSV files for classification tasks. And the writers can restore the data spacing, orientation or shape according to the `original_shape` or `original_affine` information from the input image. A rich set of formats will be supported soon, along with relevant statistics and evaluation metrics automatically computed from the outputs. @@ -289,7 +289,7 @@ The trainers and evaluators of the workflows are compatible with pytorch-ignite ### 1. General workflows pipeline The workflow and some of MONAI event handlers are shown as below: -![image](../images/workflows.png) +![workflow pipeline](../images/workflows.png) The end-to-end training and evaluation examples are available at [Workflow examples](https://github.com/Project-MONAI/tutorials/tree/master/modules/engines). @@ -300,13 +300,13 @@ Models ensemble is a popular strategy in machine learning and deep learning area 3. Execute inference on the test data with all the K models. 4. Compute the average values with weights or vote the most common value as the final result. -![image](../images/models_ensemble.png) +![model ensemble](../images/models_ensemble.png) More details of practice is at [Model ensemble tutorial](https://github.com/Project-MONAI/tutorials/blob/master/modules/models_ensemble.ipynb). ### 3. Transfer learning for different input / output classes `Transfer-learning` is a very common and efficient training approach, especially in the medical-specific domain where obtaining large datasets for training can be difficult. So transfer-learning from a pre-trained checkpoint can significantly improve the model metrics and shorten training time. -MONAI provided `CheckpointLoader` to load a checkpoint for the workflow before training, and it allows some `layer names` of current network don't match the checkpoint, or some `layer shapes` don't match the checkpoint, which can be useful if the current task has different input image classes or output classes. +MONAI provided `CheckpointLoader` to load a checkpoint for the workflow before training, and it allows some `layer names` of the current network don't match the checkpoint, or some `layer shapes` don't match the checkpoint, which can be useful if the current task has different input image classes or output classes. ## Research There are several research prototypes in MONAI corresponding to the recently published papers that address advanced research problems. @@ -318,13 +318,13 @@ The generic patterns/modules identified from the research prototypes will be int [A reimplementation](https://monai.io/research/coplenet-pneumonia-lesion-segmentation) of the COPLE-Net originally proposed by: G. Wang, X. Liu, C. Li, Z. Xu, J. Ruan, H. Zhu, T. Meng, K. Li, N. Huang, S. Zhang. (2020) "A Noise-robust Framework for Automatic Segmentation of COVID-19 Pneumonia Lesions from CT Images." IEEE Transactions on Medical Imaging. 2020. [DOI: 10.1109/TMI.2020.3000314](https://doi.org/10.1109/TMI.2020.3000314) -![image](../images/coplenet.png) +![coplenet](../images/coplenet.png) ### 2. LAMP: Large Deep Nets with Automated Model Parallelism for Image Segmentation [A reimplementation](https://monai.io/research/lamp-automated-model-parallelism) of the LAMP system originally proposed by: Wentao Zhu, Can Zhao, Wenqi Li, Holger Roth, Ziyue Xu, and Daguang Xu (2020) "LAMP: Large Deep Nets with Automated Model Parallelism for Image Segmentation." MICCAI 2020 (Early Accept, paper link: https://arxiv.org/abs/2006.12575) -![image](../images/unet-pipe.png) +![LAMP UNet](../images/unet-pipe.png) ## GPU acceleration NVIDIA GPUs have been widely applied in many areas of deep learning training and evaluation, and the CUDA parallel computation shows obvious acceleration when comparing to traditional computation methods. To fully leverage GPU features, many popular mechanisms raised, like automatic mixed precision (AMP), distributed data parallel, etc. MONAI can support these features and provides rich examples. @@ -335,19 +335,19 @@ In 2017, NVIDIA researchers developed a methodology for mixed-precision training For the PyTorch 1.6 release, developers at NVIDIA and Facebook moved mixed precision functionality into PyTorch core as the AMP package, `torch.cuda.amp`. MONAI workflows can easily set `amp=True/False` in `SupervisedTrainer` or `SupervisedEvaluator` during training or evaluation to enable/disable AMP. And we tried to compare the training speed if AMP ON/OFF on NVIDIA V100 GPU with CUDA 11 and PyTorch 1.6, got some benchmark for reference: -![image](../images/amp_training_v100.png) +![amp v100 results](../images/amp_training_v100.png) We also executed the same test program on NVIDIA A100 GPU with the same software environment, got much faster benchmark for reference: -![image](../images/amp_training_a100.png) +![amp a100 results](../images/amp_training_a100.png) More details is available at [AMP training tutorial](https://github.com/Project-MONAI/tutorials/blob/master/acceleration/automatic_mixed_precision.ipynb). We also tried to combine AMP with `CacheDataset` and `Novograd` optimizer to achieve the fast training in MONAI, able to obtain approximately 12x speedup compared with a Pytorch native implementation when the training converges at a validation mean dice of 0.93. Benchmark for reference: -![image](../images/fast_training.png) +![fast training results](../images/fast_training.png) More details is available at [Fast training tutorial](https://github.com/Project-MONAI/tutorials/blob/master/acceleration/fast_training_tutorial.ipynb). ### 2. Distributed data parallel Distributed data parallel is an important feature of PyTorch to connect multiple GPU devices on single or multiple nodes to train or evaluate models. MONAI provides demos for reference: train/evaluate with PyTorch DDP, train/evaluate with Horovod, train/evaluate with Ignite DDP, partition dataset and train with SmartCacheDataset, as well as a real world training example based on Decathlon challenge Task01 - Brain Tumor segmentation. The demo contains distributed caching, training, and validation. We tried to train this example on NVIDIA NGC server, got some performance benchmarks for reference(PyTorch 1.6, CUDA 11, NVIDIA V100 GPUs): -![image](../images/distributed_training.png) +![distributed training results](../images/distributed_training.png) ### 3. C++/CUDA optimized modules To accelerate some heavy computation progress, C++/CUDA implementation can be an impressive method, which usually brings even hundreds of times faster performance. MONAI contains some C++/CUDA optimized modules, like `Resampler`, `Conditional random field (CRF)`, `Fast bilateral filtering using the permutohedral lattice`, and fully support C++/CUDA programs in CI/CD and building package. @@ -360,16 +360,16 @@ The research area of medical image deep learning is expanding fast. To apply the Sakinis, Tomas, et al. "Interactive segmentation of medical images through fully convolutional neural networks." arXiv preprint arXiv:1903.08205 (2019). -![image](../images/deepgrow.png) +![deepgrow scheme](../images/deepgrow.png) ### 2. Lesion detection in digital pathology [Implementation](https://github.com/Project-MONAI/MONAI/tree/master/monai/apps/pathology) of the pathology detection components, which includes efficient whole slide imaging IO and sampling with NVIDIA cuCIM library and SmartCache mechanism, FROC measurements for lesion and probabilistic post-processing for lesion detection. -![image](../images/pathology.png) +![digital pathology](../images/pathology.png) ### 3. Learning-based image registration Starting from v0.5.0, MONAI provides experimental features for building learning-based 2D/3D registration workflows. These include image similarity measures as loss functions, bending energy as model regularization, network architectures, warping modules. The components can be used to build the major unsupervised and weakly-supervised algorithms. The following figure shows the registration of CT images acquired at different time points for a single patient using MONAI: -![3dreg](../images/3d_paired.png) +![3d registration](../images/3d_paired.png) diff --git a/docs/source/index.rst b/docs/source/index.rst index 23146ae69e..143c407a72 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -45,6 +45,7 @@ Technical documentation is available at `docs.monai.io `_ :maxdepth: 1 :caption: Feature highlights + whatsnew.md highlights.md .. toctree:: diff --git a/docs/source/whatsnew.md b/docs/source/whatsnew.md new file mode 100644 index 0000000000..e7cbcd5b39 --- /dev/null +++ b/docs/source/whatsnew.md @@ -0,0 +1,73 @@ +# What's new in 0.5.0 🎉 + +## Invert spatial transforms and test-time augmentations +It is often desirable to invert the previously applied spatial transforms (resize, flip, rotate, zoom, crop, pad, etc.) with the deep learning workflows, for example, to resume to the original imaging space after processing the image data in a normalized data space. We enhance almost all the spatial transforms with an `inverse` operation and release this experimental feature in v0.5.0. Users can easily invert all the spatial transforms for one transformed data item or a batch of data items. It also can be achieved within the workflows by using the `TransformInverter` handler. + +If the pipeline includes random transformations, users may want to observe the effect that these transformations have on the output. The typical approach is that we pass the same input through the transforms multiple times with different random realizations. Then use the inverse transforms to move all the results to a common space, and calculate the metrics. MONAI provided `TestTimeAugmentation` for this feature, which by default will calculate the `mode`, `mean`, `standard deviation` and `volume variation coefficient`. + +[Invert transforms and TTA tutorials](https://github.com/Project-MONAI/tutorials/blob/master/modules/inverse_transforms_and_test_time_augmentations.ipynb) introduce details about the API with examples. + +(1) The last column is the inverted data of model output: +![invert transform](../images/invert_transforms.png) + +(2) The TTA results of `mode`, `mean` and `standard deviation`: +![test time augmentation](../images/tta.png) + +## Lesion detection in digital pathology +MONAI starts to support digital pathology deep learning tasks. The initial [implementation](https://github.com/Project-MONAI/MONAI/tree/master/monai/apps/pathology) of the pathology detection components includes: +- Efficient whole slide imaging IO with NVIDIA cuCIM library +- Patch-based sampling and training strategies with the SmartCache mechanism +- FROC measurements for lesion detection +- Probabilistic post-processing for lesion ROIs. + +![digital pathology](../images/pathology.png) + +## DeepGrow modules for interactive segmentation +Towards an interactive workflow with manual input during training and inference, +[a reimplementation](https://github.com/Project-MONAI/MONAI/tree/master/monai/apps/deepgrow) of the DeepGrow components is included in this release. +DeepGrow is a deep learning based semi-automated segmentation approach that aims to be a "smart" interactive tool for regions of interest delineation in medical images. + +![deepgrow scheme](../images/deepgrow_scheme.png) + +An end-to-end example is presented at [`project-monai/tutorials`](https://github.com/Project-MONAI/tutorials/tree/master/deepgrow/ignite). +![deepgrow end-to-end](../images/deepgrow.png) + +## Learning-based image registration +Starting from v0.5.0, MONAI provides experimental features for building learning-based 2D/3D registration workflows. These include image similarity measures as loss functions, bending energy as model regularization, network architectures, warping modules. The components can be used to build the major unsupervised and weakly-supervised algorithms. + +The following figure shows the registration of CT images acquired at different time points for a single patient using MONAI: + +![3d registration](../images/3d_paired.png) + +## Various usability improvements +### IO factory for medical image formats +Many popular image formats exist in the medical domain, and they are quite different with rich metadata information. To easily handle different medical image formats in the same pipeline, [MONAI provides `LoadImage` transform](https://github.com/Project-MONAI/tutorials/blob/master/modules/load_medical_images.ipynb), which can automatically choose image readers based on the supported suffixes and in the below priority order: +- User-specified reader at runtime when call this loader. +- Registered readers from the latest to the first in list. +- Default readers: (nii, nii.gz -> NibabelReader), (png, jpg, bmp -> PILReader), (npz, npy -> NumpyReader), (others -> ITKReader). + +The `ImageReader` API is quite straight-forward, users can easily extend for their own customized image readers. + +With these pre-defined image readers, MONAI can load images in formats: `NIfTI`, `DICOM`, `PNG`, `JPG`, `BMP`, `NPY/NPZ`, etc. + +### Save transform data into NIfTI or PNG files +To convert images into files or debug the transform chain, MONAI provides `SaveImage` transform. Users can inject this transform into the transform chain to save the results. + +### Automatically ensure `channel-first` data shape +Medical images have different shape formats. They can be `channel-last`, `channel-first` or even `no-channel`. We may, for example, want to load several `no-channel` images and stack them as `channel-first` data. To improve the user experience, MONAI provided an `EnsureChannelFirst` transform to automatically detect data shape according to the meta information and convert it to the `channel-first` format consistently. + +### Network architectures +Various ready-to-use architectures with pretrained model weights from `torch.hub`. + +### Result writing +Currently MONAI supports writing the model outputs as NIfTI files or PNG files for segmentation tasks, and as CSV files for classification tasks. And the writers can restore the data spacing, orientation or shape according to the `original_shape` or `original_affine` information from the input image. + +A rich set of formats will be supported soon, along with relevant statistics and evaluation metrics automatically computed from the outputs. + +### Transfer learning for different input / output classes +`Transfer-learning` is a very common and efficient training approach, especially in the medical-specific domain where obtaining large datasets for training can be difficult. So transfer-learning from a pre-trained checkpoint can significantly improve the model metrics and shorten training time. + +MONAI provided `CheckpointLoader` to load a checkpoint for the workflow before training, and it allows some `layer names` of current network don't match the checkpoint, or some `layer shapes` don't match the checkpoint, which can be useful if the current task has different input image classes or output classes. + +### C++/CUDA optimized modules +To accelerate some heavy computation progress, C++/CUDA implementation can be an impressive method, which usually brings even hundreds of times faster performance. MONAI contains some C++/CUDA optimized modules, like `Resampler`, `Conditional random field (CRF)`, `Fast bilateral filtering using the permutohedral lattice`, and fully support C++/CUDA programs in CI/CD and building package.