Copy disabled (too large)
Download .txt
Showing preview only (11,519K chars total). Download the full file to get everything.
Repository: Project-MONAI/MONAI
Branch: dev
Commit: 5b715471af0b
Files: 1461
Total size: 10.7 MB
Directory structure:
gitextract_ts7o095u/
├── .clang-format
├── .coderabbit.yaml
├── .deepsource.toml
├── .dockerignore
├── .gitattributes
├── .github/
│ ├── CODEOWNERS
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── feature_request.md
│ │ └── question.md
│ ├── codecov.yml
│ ├── dco.yml
│ ├── dependabot.yml
│ ├── pull_request_template.md
│ └── workflows/
│ ├── blossom-ci.yml
│ ├── chatops.yml
│ ├── codeql-analysis.yml
│ ├── conda.yml
│ ├── cron-ngc-bundle.yml
│ ├── cron.yml
│ ├── docker.yml
│ ├── integration.yml
│ ├── pythonapp-gpu.yml
│ ├── pythonapp-min.yml
│ ├── pythonapp.yml
│ ├── release.yml
│ ├── setupapp.yml
│ └── weekly-preview.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .readthedocs.yml
├── CHANGELOG.md
├── CITATION.cff
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Dockerfile
├── Dockerfile.slim
├── LICENSE
├── MANIFEST.in
├── README.md
├── SECURITY.md
├── docs/
│ ├── .readthedocs.yaml
│ ├── Makefile
│ ├── _static/
│ │ └── custom.css
│ ├── requirements.txt
│ └── source/
│ ├── api.rst
│ ├── apidocs/
│ │ ├── modules.rst
│ │ └── monai.rst
│ ├── applications.md
│ ├── apps.rst
│ ├── auto3dseg.rst
│ ├── bundle.rst
│ ├── bundle_intro.rst
│ ├── conf.py
│ ├── config_syntax.md
│ ├── contrib.rst
│ ├── data.rst
│ ├── engines.rst
│ ├── fl.rst
│ ├── handlers.rst
│ ├── highlights.rst
│ ├── index.rst
│ ├── inferers.rst
│ ├── installation.md
│ ├── lazy_resampling.rst
│ ├── losses.rst
│ ├── mb_properties.rst
│ ├── mb_specification.rst
│ ├── metrics.rst
│ ├── modules.md
│ ├── networks.rst
│ ├── optimizers.rst
│ ├── precision_accelerating.md
│ ├── transforms.rst
│ ├── transforms_idx.rst
│ ├── utils.rst
│ ├── visualize.rst
│ ├── whatsnew.rst
│ ├── whatsnew_0_5.md
│ ├── whatsnew_0_6.md
│ ├── whatsnew_0_7.md
│ ├── whatsnew_0_8.md
│ ├── whatsnew_0_9.md
│ ├── whatsnew_1_0.md
│ ├── whatsnew_1_1.md
│ ├── whatsnew_1_2.md
│ ├── whatsnew_1_3.md
│ ├── whatsnew_1_4.md
│ ├── whatsnew_1_5.md
│ ├── whatsnew_1_5_1.md
│ └── whatsnew_1_5_2.md
├── environment-dev.yml
├── monai/
│ ├── README.md
│ ├── __init__.py
│ ├── _extensions/
│ │ ├── __init__.py
│ │ ├── gmm/
│ │ │ ├── gmm.cpp
│ │ │ ├── gmm.h
│ │ │ ├── gmm_cpu.cpp
│ │ │ ├── gmm_cuda.cu
│ │ │ └── gmm_cuda_linalg.cuh
│ │ └── loader.py
│ ├── _version.py
│ ├── apps/
│ │ ├── __init__.py
│ │ ├── auto3dseg/
│ │ │ ├── __init__.py
│ │ │ ├── __main__.py
│ │ │ ├── auto_runner.py
│ │ │ ├── bundle_gen.py
│ │ │ ├── data_analyzer.py
│ │ │ ├── ensemble_builder.py
│ │ │ ├── hpo_gen.py
│ │ │ ├── transforms.py
│ │ │ └── utils.py
│ │ ├── datasets.py
│ │ ├── deepedit/
│ │ │ ├── __init__.py
│ │ │ ├── interaction.py
│ │ │ └── transforms.py
│ │ ├── deepgrow/
│ │ │ ├── __init__.py
│ │ │ ├── dataset.py
│ │ │ ├── interaction.py
│ │ │ └── transforms.py
│ │ ├── detection/
│ │ │ ├── __init__.py
│ │ │ ├── metrics/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── coco.py
│ │ │ │ └── matching.py
│ │ │ ├── networks/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── retinanet_detector.py
│ │ │ │ └── retinanet_network.py
│ │ │ ├── transforms/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── array.py
│ │ │ │ ├── box_ops.py
│ │ │ │ └── dictionary.py
│ │ │ └── utils/
│ │ │ ├── ATSS_matcher.py
│ │ │ ├── __init__.py
│ │ │ ├── anchor_utils.py
│ │ │ ├── box_coder.py
│ │ │ ├── box_selector.py
│ │ │ ├── detector_utils.py
│ │ │ ├── hard_negative_sampler.py
│ │ │ └── predict_utils.py
│ │ ├── generation/
│ │ │ ├── __init__.py
│ │ │ └── maisi/
│ │ │ ├── __init__.py
│ │ │ └── networks/
│ │ │ ├── __init__.py
│ │ │ ├── autoencoderkl_maisi.py
│ │ │ ├── controlnet_maisi.py
│ │ │ └── diffusion_model_unet_maisi.py
│ │ ├── mmars/
│ │ │ ├── __init__.py
│ │ │ ├── mmars.py
│ │ │ └── model_desc.py
│ │ ├── nnunet/
│ │ │ ├── __init__.py
│ │ │ ├── __main__.py
│ │ │ ├── nnunet_bundle.py
│ │ │ ├── nnunetv2_runner.py
│ │ │ └── utils.py
│ │ ├── nuclick/
│ │ │ ├── __init__.py
│ │ │ └── transforms.py
│ │ ├── pathology/
│ │ │ ├── __init__.py
│ │ │ ├── engines/
│ │ │ │ ├── __init__.py
│ │ │ │ └── utils.py
│ │ │ ├── handlers/
│ │ │ │ ├── __init__.py
│ │ │ │ └── utils.py
│ │ │ ├── inferers/
│ │ │ │ ├── __init__.py
│ │ │ │ └── inferer.py
│ │ │ ├── losses/
│ │ │ │ ├── __init__.py
│ │ │ │ └── hovernet_loss.py
│ │ │ ├── metrics/
│ │ │ │ ├── __init__.py
│ │ │ │ └── lesion_froc.py
│ │ │ ├── transforms/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── post/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── array.py
│ │ │ │ │ └── dictionary.py
│ │ │ │ └── stain/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── array.py
│ │ │ │ └── dictionary.py
│ │ │ └── utils.py
│ │ ├── reconstruction/
│ │ │ ├── __init__.py
│ │ │ ├── complex_utils.py
│ │ │ ├── fastmri_reader.py
│ │ │ ├── mri_utils.py
│ │ │ ├── networks/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── blocks/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── varnetblock.py
│ │ │ │ └── nets/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── coil_sensitivity_model.py
│ │ │ │ ├── complex_unet.py
│ │ │ │ ├── utils.py
│ │ │ │ └── varnet.py
│ │ │ └── transforms/
│ │ │ ├── __init__.py
│ │ │ ├── array.py
│ │ │ └── dictionary.py
│ │ ├── tcia/
│ │ │ ├── __init__.py
│ │ │ ├── label_desc.py
│ │ │ └── utils.py
│ │ ├── utils.py
│ │ └── vista3d/
│ │ ├── __init__.py
│ │ ├── inferer.py
│ │ ├── sampler.py
│ │ └── transforms.py
│ ├── auto3dseg/
│ │ ├── __init__.py
│ │ ├── algo_gen.py
│ │ ├── analyzer.py
│ │ ├── operations.py
│ │ ├── seg_summarizer.py
│ │ └── utils.py
│ ├── bundle/
│ │ ├── __init__.py
│ │ ├── __main__.py
│ │ ├── config_item.py
│ │ ├── config_parser.py
│ │ ├── properties.py
│ │ ├── reference_resolver.py
│ │ ├── scripts.py
│ │ ├── utils.py
│ │ └── workflows.py
│ ├── config/
│ │ ├── __init__.py
│ │ ├── deviceconfig.py
│ │ └── type_definitions.py
│ ├── csrc/
│ │ ├── ext.cpp
│ │ ├── filtering/
│ │ │ ├── bilateral/
│ │ │ │ ├── bilateral.cpp
│ │ │ │ ├── bilateral.h
│ │ │ │ ├── bilateralfilter_cpu.cpp
│ │ │ │ ├── bilateralfilter_cpu_phl.cpp
│ │ │ │ ├── bilateralfilter_cuda.cu
│ │ │ │ └── bilateralfilter_cuda_phl.cu
│ │ │ ├── filtering.h
│ │ │ ├── permutohedral/
│ │ │ │ ├── hash_table.cuh
│ │ │ │ ├── permutohedral.cpp
│ │ │ │ ├── permutohedral.h
│ │ │ │ ├── permutohedral_cpu.cpp
│ │ │ │ └── permutohedral_cuda.cu
│ │ │ ├── trainable_bilateral/
│ │ │ │ ├── bf_layer_cpu_backward.cpp
│ │ │ │ ├── bf_layer_cpu_forward.cpp
│ │ │ │ ├── bf_layer_gpu_backward.cu
│ │ │ │ ├── bf_layer_gpu_forward.cu
│ │ │ │ ├── trainable_bilateral.cpp
│ │ │ │ └── trainable_bilateral.h
│ │ │ └── trainable_joint_bilateral/
│ │ │ ├── jbf_layer_cpu_backward.cpp
│ │ │ ├── jbf_layer_cpu_forward.cpp
│ │ │ ├── jbf_layer_gpu_backward.cu
│ │ │ ├── jbf_layer_gpu_forward.cu
│ │ │ ├── trainable_joint_bilateral.cpp
│ │ │ └── trainable_joint_bilateral.h
│ │ ├── lltm/
│ │ │ ├── lltm.h
│ │ │ ├── lltm_cpu.cpp
│ │ │ └── lltm_cuda.cu
│ │ ├── resample/
│ │ │ ├── bounds_common.h
│ │ │ ├── interpolation_common.h
│ │ │ ├── pushpull.h
│ │ │ ├── pushpull_cpu.cpp
│ │ │ └── pushpull_cuda.cu
│ │ └── utils/
│ │ ├── common_utils.h
│ │ ├── meta_macros.h
│ │ ├── resample_utils.h
│ │ ├── tensor_description.h
│ │ └── tensor_indexing.h
│ ├── data/
│ │ ├── __init__.py
│ │ ├── box_utils.py
│ │ ├── csv_saver.py
│ │ ├── dataloader.py
│ │ ├── dataset.py
│ │ ├── dataset_summary.py
│ │ ├── decathlon_datalist.py
│ │ ├── fft_utils.py
│ │ ├── folder_layout.py
│ │ ├── grid_dataset.py
│ │ ├── image_dataset.py
│ │ ├── image_reader.py
│ │ ├── image_writer.py
│ │ ├── iterable_dataset.py
│ │ ├── itk_torch_bridge.py
│ │ ├── meta_obj.py
│ │ ├── meta_tensor.py
│ │ ├── samplers.py
│ │ ├── synthetic.py
│ │ ├── test_time_augmentation.py
│ │ ├── thread_buffer.py
│ │ ├── torchscript_utils.py
│ │ ├── ultrasound_confidence_map.py
│ │ ├── utils.py
│ │ ├── video_dataset.py
│ │ ├── wsi_datasets.py
│ │ └── wsi_reader.py
│ ├── engines/
│ │ ├── __init__.py
│ │ ├── evaluator.py
│ │ ├── trainer.py
│ │ ├── utils.py
│ │ └── workflow.py
│ ├── fl/
│ │ ├── __init__.py
│ │ ├── client/
│ │ │ ├── __init__.py
│ │ │ ├── client_algo.py
│ │ │ └── monai_algo.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── constants.py
│ │ ├── exchange_object.py
│ │ └── filters.py
│ ├── handlers/
│ │ ├── __init__.py
│ │ ├── average_precision.py
│ │ ├── calibration.py
│ │ ├── checkpoint_loader.py
│ │ ├── checkpoint_saver.py
│ │ ├── classification_saver.py
│ │ ├── clearml_handlers.py
│ │ ├── confusion_matrix.py
│ │ ├── decollate_batch.py
│ │ ├── earlystop_handler.py
│ │ ├── garbage_collector.py
│ │ ├── hausdorff_distance.py
│ │ ├── ignite_metric.py
│ │ ├── logfile_handler.py
│ │ ├── lr_schedule_handler.py
│ │ ├── mean_dice.py
│ │ ├── mean_iou.py
│ │ ├── metric_logger.py
│ │ ├── metrics_reloaded_handler.py
│ │ ├── metrics_saver.py
│ │ ├── mlflow_handler.py
│ │ ├── nvtx_handlers.py
│ │ ├── panoptic_quality.py
│ │ ├── parameter_scheduler.py
│ │ ├── postprocessing.py
│ │ ├── probability_maps.py
│ │ ├── regression_metrics.py
│ │ ├── roc_auc.py
│ │ ├── smartcache_handler.py
│ │ ├── stats_handler.py
│ │ ├── surface_distance.py
│ │ ├── tensorboard_handlers.py
│ │ ├── trt_handler.py
│ │ ├── utils.py
│ │ └── validation_handler.py
│ ├── inferers/
│ │ ├── __init__.py
│ │ ├── inferer.py
│ │ ├── merger.py
│ │ ├── splitter.py
│ │ └── utils.py
│ ├── losses/
│ │ ├── __init__.py
│ │ ├── adversarial_loss.py
│ │ ├── barlow_twins.py
│ │ ├── cldice.py
│ │ ├── contrastive.py
│ │ ├── deform.py
│ │ ├── dice.py
│ │ ├── ds_loss.py
│ │ ├── focal_loss.py
│ │ ├── giou_loss.py
│ │ ├── hausdorff_loss.py
│ │ ├── image_dissimilarity.py
│ │ ├── multi_scale.py
│ │ ├── nacl_loss.py
│ │ ├── perceptual.py
│ │ ├── spatial_mask.py
│ │ ├── spectral_loss.py
│ │ ├── ssim_loss.py
│ │ ├── sure_loss.py
│ │ ├── tversky.py
│ │ ├── unified_focal_loss.py
│ │ └── utils.py
│ ├── metrics/
│ │ ├── __init__.py
│ │ ├── active_learning_metrics.py
│ │ ├── average_precision.py
│ │ ├── calibration.py
│ │ ├── confusion_matrix.py
│ │ ├── cumulative_average.py
│ │ ├── f_beta_score.py
│ │ ├── fid.py
│ │ ├── froc.py
│ │ ├── generalized_dice.py
│ │ ├── hausdorff_distance.py
│ │ ├── loss_metric.py
│ │ ├── meandice.py
│ │ ├── meaniou.py
│ │ ├── metric.py
│ │ ├── mmd.py
│ │ ├── panoptic_quality.py
│ │ ├── regression.py
│ │ ├── rocauc.py
│ │ ├── surface_dice.py
│ │ ├── surface_distance.py
│ │ ├── utils.py
│ │ └── wrapper.py
│ ├── networks/
│ │ ├── __init__.py
│ │ ├── blocks/
│ │ │ ├── __init__.py
│ │ │ ├── acti_norm.py
│ │ │ ├── activation.py
│ │ │ ├── activation_checkpointing.py
│ │ │ ├── aspp.py
│ │ │ ├── attention_utils.py
│ │ │ ├── backbone_fpn_utils.py
│ │ │ ├── cablock.py
│ │ │ ├── convolutions.py
│ │ │ ├── crf.py
│ │ │ ├── crossattention.py
│ │ │ ├── denseblock.py
│ │ │ ├── dints_block.py
│ │ │ ├── downsample.py
│ │ │ ├── dynunet_block.py
│ │ │ ├── encoder.py
│ │ │ ├── fcn.py
│ │ │ ├── feature_pyramid_network.py
│ │ │ ├── fft_utils_t.py
│ │ │ ├── localnet_block.py
│ │ │ ├── mednext_block.py
│ │ │ ├── mlp.py
│ │ │ ├── patchembedding.py
│ │ │ ├── pos_embed_utils.py
│ │ │ ├── regunet_block.py
│ │ │ ├── rel_pos_embedding.py
│ │ │ ├── segresnet_block.py
│ │ │ ├── selfattention.py
│ │ │ ├── spade_norm.py
│ │ │ ├── spatialattention.py
│ │ │ ├── squeeze_and_excitation.py
│ │ │ ├── text_embedding.py
│ │ │ ├── transformerblock.py
│ │ │ ├── unetr_block.py
│ │ │ ├── upsample.py
│ │ │ └── warp.py
│ │ ├── layers/
│ │ │ ├── __init__.py
│ │ │ ├── conjugate_gradient.py
│ │ │ ├── convutils.py
│ │ │ ├── drop_path.py
│ │ │ ├── factories.py
│ │ │ ├── filtering.py
│ │ │ ├── gmm.py
│ │ │ ├── simplelayers.py
│ │ │ ├── spatial_transforms.py
│ │ │ ├── utils.py
│ │ │ ├── vector_quantizer.py
│ │ │ └── weight_init.py
│ │ ├── nets/
│ │ │ ├── __init__.py
│ │ │ ├── ahnet.py
│ │ │ ├── attentionunet.py
│ │ │ ├── autoencoder.py
│ │ │ ├── autoencoderkl.py
│ │ │ ├── basic_unet.py
│ │ │ ├── basic_unetplusplus.py
│ │ │ ├── cell_sam_wrapper.py
│ │ │ ├── classifier.py
│ │ │ ├── controlnet.py
│ │ │ ├── daf3d.py
│ │ │ ├── densenet.py
│ │ │ ├── diffusion_model_unet.py
│ │ │ ├── dints.py
│ │ │ ├── dynunet.py
│ │ │ ├── efficientnet.py
│ │ │ ├── flexible_unet.py
│ │ │ ├── fullyconnectednet.py
│ │ │ ├── generator.py
│ │ │ ├── highresnet.py
│ │ │ ├── hovernet.py
│ │ │ ├── masked_autoencoder_vit.py
│ │ │ ├── mednext.py
│ │ │ ├── milmodel.py
│ │ │ ├── netadapter.py
│ │ │ ├── patchgan_discriminator.py
│ │ │ ├── quicknat.py
│ │ │ ├── regressor.py
│ │ │ ├── regunet.py
│ │ │ ├── resnet.py
│ │ │ ├── restormer.py
│ │ │ ├── segresnet.py
│ │ │ ├── segresnet_ds.py
│ │ │ ├── senet.py
│ │ │ ├── spade_autoencoderkl.py
│ │ │ ├── spade_diffusion_model_unet.py
│ │ │ ├── spade_network.py
│ │ │ ├── swin_unetr.py
│ │ │ ├── torchvision_fc.py
│ │ │ ├── transchex.py
│ │ │ ├── transformer.py
│ │ │ ├── unet.py
│ │ │ ├── unetr.py
│ │ │ ├── varautoencoder.py
│ │ │ ├── vista3d.py
│ │ │ ├── vit.py
│ │ │ ├── vitautoenc.py
│ │ │ ├── vnet.py
│ │ │ ├── voxelmorph.py
│ │ │ └── vqvae.py
│ │ ├── schedulers/
│ │ │ ├── __init__.py
│ │ │ ├── ddim.py
│ │ │ ├── ddpm.py
│ │ │ ├── pndm.py
│ │ │ ├── rectified_flow.py
│ │ │ └── scheduler.py
│ │ ├── trt_compiler.py
│ │ └── utils.py
│ ├── optimizers/
│ │ ├── __init__.py
│ │ ├── lr_finder.py
│ │ ├── lr_scheduler.py
│ │ ├── novograd.py
│ │ └── utils.py
│ ├── py.typed
│ ├── torch.patch
│ ├── transforms/
│ │ ├── __init__.py
│ │ ├── adaptors.py
│ │ ├── compose.py
│ │ ├── croppad/
│ │ │ ├── __init__.py
│ │ │ ├── array.py
│ │ │ ├── batch.py
│ │ │ ├── dictionary.py
│ │ │ └── functional.py
│ │ ├── intensity/
│ │ │ ├── __init__.py
│ │ │ ├── array.py
│ │ │ └── dictionary.py
│ │ ├── inverse.py
│ │ ├── inverse_batch_transform.py
│ │ ├── io/
│ │ │ ├── __init__.py
│ │ │ ├── array.py
│ │ │ └── dictionary.py
│ │ ├── lazy/
│ │ │ ├── __init__.py
│ │ │ ├── array.py
│ │ │ ├── dictionary.py
│ │ │ ├── functional.py
│ │ │ └── utils.py
│ │ ├── meta_utility/
│ │ │ ├── __init__.py
│ │ │ └── dictionary.py
│ │ ├── nvtx.py
│ │ ├── post/
│ │ │ ├── __init__.py
│ │ │ ├── array.py
│ │ │ └── dictionary.py
│ │ ├── regularization/
│ │ │ ├── __init__.py
│ │ │ ├── array.py
│ │ │ └── dictionary.py
│ │ ├── signal/
│ │ │ ├── __init__.py
│ │ │ ├── array.py
│ │ │ └── dictionary.py
│ │ ├── smooth_field/
│ │ │ ├── __init__.py
│ │ │ ├── array.py
│ │ │ └── dictionary.py
│ │ ├── spatial/
│ │ │ ├── __init__.py
│ │ │ ├── array.py
│ │ │ ├── dictionary.py
│ │ │ └── functional.py
│ │ ├── traits.py
│ │ ├── transform.py
│ │ ├── utility/
│ │ │ ├── __init__.py
│ │ │ ├── array.py
│ │ │ └── dictionary.py
│ │ ├── utils.py
│ │ ├── utils_create_transform_ims.py
│ │ ├── utils_morphological_ops.py
│ │ └── utils_pytorch_numpy_unification.py
│ ├── utils/
│ │ ├── __init__.py
│ │ ├── component_store.py
│ │ ├── decorators.py
│ │ ├── deprecate_utils.py
│ │ ├── dist.py
│ │ ├── enums.py
│ │ ├── jupyter_utils.py
│ │ ├── misc.py
│ │ ├── module.py
│ │ ├── nvtx.py
│ │ ├── ordering.py
│ │ ├── profiling.py
│ │ ├── state_cacher.py
│ │ ├── tf32.py
│ │ └── type_conversion.py
│ └── visualize/
│ ├── __init__.py
│ ├── class_activation_maps.py
│ ├── gradient_based.py
│ ├── img2tensorboard.py
│ ├── occlusion_sensitivity.py
│ ├── utils.py
│ └── visualizer.py
├── pyproject.toml
├── requirements-dev.txt
├── requirements-min.txt
├── requirements.txt
├── runtests.sh
├── setup.cfg
├── setup.py
├── tests/
│ ├── __init__.py
│ ├── apps/
│ │ ├── __init__.py
│ │ ├── deepedit/
│ │ │ ├── __init__.py
│ │ │ └── test_deepedit_transforms.py
│ │ ├── deepgrow/
│ │ │ ├── __init__.py
│ │ │ ├── test_deepgrow_dataset.py
│ │ │ └── transforms/
│ │ │ ├── __init__.py
│ │ │ ├── test_deepgrow_interaction.py
│ │ │ └── test_deepgrow_transforms.py
│ │ ├── detection/
│ │ │ ├── __init__.py
│ │ │ ├── metrics/
│ │ │ │ ├── __init__.py
│ │ │ │ └── test_detection_coco_metrics.py
│ │ │ ├── networks/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_retinanet.py
│ │ │ │ └── test_retinanet_detector.py
│ │ │ ├── test_box_transform.py
│ │ │ └── utils/
│ │ │ ├── __init__.py
│ │ │ ├── test_anchor_box.py
│ │ │ ├── test_atss_box_matcher.py
│ │ │ ├── test_box_coder.py
│ │ │ ├── test_detector_boxselector.py
│ │ │ ├── test_detector_utils.py
│ │ │ └── test_hardnegsampler.py
│ │ ├── maisi/
│ │ │ └── networks/
│ │ │ ├── __init__.py
│ │ │ ├── test_autoencoderkl_maisi.py
│ │ │ ├── test_controlnet_maisi.py
│ │ │ └── test_diffusion_model_unet_maisi.py
│ │ ├── nuclick/
│ │ │ ├── __init__.py
│ │ │ └── test_nuclick_transforms.py
│ │ ├── pathology/
│ │ │ ├── __init__.py
│ │ │ ├── handlers/
│ │ │ │ ├── __init__.py
│ │ │ │ └── test_from_engine_hovernet.py
│ │ │ ├── test_lesion_froc.py
│ │ │ ├── test_pathology_prob_nms.py
│ │ │ ├── test_prepare_batch_hovernet.py
│ │ │ ├── test_sliding_window_hovernet_inference.py
│ │ │ └── transforms/
│ │ │ ├── __init__.py
│ │ │ ├── post/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_generate_distance_map.py
│ │ │ │ ├── test_generate_distance_mapd.py
│ │ │ │ ├── test_generate_instance_border.py
│ │ │ │ ├── test_generate_instance_borderd.py
│ │ │ │ ├── test_generate_instance_centroid.py
│ │ │ │ ├── test_generate_instance_centroidd.py
│ │ │ │ ├── test_generate_instance_contour.py
│ │ │ │ ├── test_generate_instance_contourd.py
│ │ │ │ ├── test_generate_instance_type.py
│ │ │ │ ├── test_generate_instance_typed.py
│ │ │ │ ├── test_generate_succinct_contour.py
│ │ │ │ ├── test_generate_succinct_contourd.py
│ │ │ │ ├── test_generate_watershed_markers.py
│ │ │ │ ├── test_generate_watershed_markersd.py
│ │ │ │ ├── test_generate_watershed_mask.py
│ │ │ │ ├── test_generate_watershed_maskd.py
│ │ │ │ ├── test_hovernet_instance_map_post_processing.py
│ │ │ │ ├── test_hovernet_instance_map_post_processingd.py
│ │ │ │ ├── test_hovernet_nuclear_type_post_processing.py
│ │ │ │ ├── test_watershed.py
│ │ │ │ └── test_watershedd.py
│ │ │ ├── test_pathology_he_stain.py
│ │ │ └── test_pathology_he_stain_dict.py
│ │ ├── reconstruction/
│ │ │ ├── __init__.py
│ │ │ ├── nets/
│ │ │ │ ├── __init__.py
│ │ │ │ └── test_recon_net_utils.py
│ │ │ ├── test_complex_utils.py
│ │ │ ├── test_fastmri_reader.py
│ │ │ ├── test_mri_utils.py
│ │ │ └── transforms/
│ │ │ ├── __init__.py
│ │ │ ├── test_kspace_mask.py
│ │ │ ├── test_reference_based_normalize_intensity.py
│ │ │ └── test_reference_based_spatial_cropd.py
│ │ ├── test_auto3dseg.py
│ │ ├── test_auto3dseg_bundlegen.py
│ │ ├── test_check_hash.py
│ │ ├── test_cross_validation.py
│ │ ├── test_decathlondataset.py
│ │ ├── test_download_and_extract.py
│ │ ├── test_download_url_yandex.py
│ │ ├── test_mednistdataset.py
│ │ ├── test_mmar_download.py
│ │ ├── test_tciadataset.py
│ │ └── vista3d/
│ │ ├── __init__.py
│ │ ├── test_point_based_window_inferer.py
│ │ ├── test_vista3d_sampler.py
│ │ └── test_vista3d_transforms.py
│ ├── bundle/
│ │ ├── __init__.py
│ │ ├── test_bundle_ckpt_export.py
│ │ ├── test_bundle_download.py
│ │ ├── test_bundle_get_data.py
│ │ ├── test_bundle_push_to_hf_hub.py
│ │ ├── test_bundle_trt_export.py
│ │ ├── test_bundle_utils.py
│ │ ├── test_bundle_verify_metadata.py
│ │ ├── test_bundle_verify_net.py
│ │ ├── test_bundle_workflow.py
│ │ ├── test_component_locator.py
│ │ ├── test_config_item.py
│ │ ├── test_config_parser.py
│ │ └── test_reference_resolver.py
│ ├── clang_format_utils.py
│ ├── config/
│ │ ├── __init__.py
│ │ ├── test_cv2_dist.py
│ │ └── test_print_info.py
│ ├── croppers.py
│ ├── data/
│ │ ├── meta_tensor/
│ │ │ ├── test_meta_tensor.py
│ │ │ └── test_to_from_meta_tensord.py
│ │ ├── test_arraydataset.py
│ │ ├── test_box_utils.py
│ │ ├── test_cachedataset.py
│ │ ├── test_cachedataset_parallel.py
│ │ ├── test_cachedataset_persistent_workers.py
│ │ ├── test_cachentransdataset.py
│ │ ├── test_check_missing_files.py
│ │ ├── test_create_cross_validation_datalist.py
│ │ ├── test_csv_dataset.py
│ │ ├── test_csv_iterable_dataset.py
│ │ ├── test_csv_saver.py
│ │ ├── test_dataloader.py
│ │ ├── test_dataset.py
│ │ ├── test_dataset_func.py
│ │ ├── test_dataset_summary.py
│ │ ├── test_fft_utils.py
│ │ ├── test_folder_layout.py
│ │ ├── test_gdsdataset.py
│ │ ├── test_grid_dataset.py
│ │ ├── test_handler_smartcache.py
│ │ ├── test_hashing.py
│ │ ├── test_header_correct.py
│ │ ├── test_image_dataset.py
│ │ ├── test_image_rw.py
│ │ ├── test_init_reader.py
│ │ ├── test_is_supported_format.py
│ │ ├── test_iterable_dataset.py
│ │ ├── test_itk_torch_bridge.py
│ │ ├── test_itk_writer.py
│ │ ├── test_list_data_collate.py
│ │ ├── test_lmdbdataset.py
│ │ ├── test_lmdbdataset_dist.py
│ │ ├── test_load_decathlon_datalist.py
│ │ ├── test_make_nifti.py
│ │ ├── test_mapping_file.py
│ │ ├── test_masked_patch_wsi_dataset.py
│ │ ├── test_nifti_header_revise.py
│ │ ├── test_nifti_rw.py
│ │ ├── test_npzdictitemdataset.py
│ │ ├── test_nrrd_reader.py
│ │ ├── test_numpy_reader.py
│ │ ├── test_partition_dataset.py
│ │ ├── test_partition_dataset_classes.py
│ │ ├── test_patch_dataset.py
│ │ ├── test_patch_wsi_dataset.py
│ │ ├── test_persistentdataset.py
│ │ ├── test_persistentdataset_dist.py
│ │ ├── test_pil_reader.py
│ │ ├── test_png_rw.py
│ │ ├── test_resample_datalist.py
│ │ ├── test_sampler_dist.py
│ │ ├── test_select_cross_validation_folds.py
│ │ ├── test_shuffle_buffer.py
│ │ ├── test_sliding_patch_wsi_dataset.py
│ │ ├── test_smartcachedataset.py
│ │ ├── test_synthetic.py
│ │ ├── test_thread_buffer.py
│ │ ├── test_threadcontainer.py
│ │ ├── test_video_datasets.py
│ │ ├── test_weighted_random_sampler_dist.py
│ │ ├── test_zipdataset.py
│ │ └── utils/
│ │ ├── test_decollate.py
│ │ ├── test_dev_collate.py
│ │ ├── test_file_basename.py
│ │ ├── test_ori_ras_lps.py
│ │ └── test_zoom_affine.py
│ ├── engines/
│ │ ├── __init__.py
│ │ ├── test_ensemble_evaluator.py
│ │ ├── test_prepare_batch_default.py
│ │ ├── test_prepare_batch_default_dist.py
│ │ ├── test_prepare_batch_diffusion.py
│ │ └── test_prepare_batch_extra_input.py
│ ├── fl/
│ │ ├── __init__.py
│ │ ├── monai_algo/
│ │ │ ├── __init__.py
│ │ │ ├── test_fl_monai_algo.py
│ │ │ └── test_fl_monai_algo_dist.py
│ │ ├── test_fl_monai_algo_stats.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ └── test_fl_exchange_object.py
│ ├── handlers/
│ │ ├── __init__.py
│ │ ├── test_handler_average_precision.py
│ │ ├── test_handler_calibration_error.py
│ │ ├── test_handler_checkpoint_loader.py
│ │ ├── test_handler_checkpoint_saver.py
│ │ ├── test_handler_classification_saver.py
│ │ ├── test_handler_classification_saver_dist.py
│ │ ├── test_handler_clearml_image.py
│ │ ├── test_handler_clearml_stats.py
│ │ ├── test_handler_confusion_matrix.py
│ │ ├── test_handler_confusion_matrix_dist.py
│ │ ├── test_handler_decollate_batch.py
│ │ ├── test_handler_early_stop.py
│ │ ├── test_handler_garbage_collector.py
│ │ ├── test_handler_hausdorff_distance.py
│ │ ├── test_handler_ignite_metric.py
│ │ ├── test_handler_lr_scheduler.py
│ │ ├── test_handler_mean_dice.py
│ │ ├── test_handler_mean_iou.py
│ │ ├── test_handler_metrics_reloaded.py
│ │ ├── test_handler_metrics_saver.py
│ │ ├── test_handler_metrics_saver_dist.py
│ │ ├── test_handler_mlflow.py
│ │ ├── test_handler_nvtx.py
│ │ ├── test_handler_panoptic_quality.py
│ │ ├── test_handler_parameter_scheduler.py
│ │ ├── test_handler_post_processing.py
│ │ ├── test_handler_prob_map_producer.py
│ │ ├── test_handler_regression_metrics.py
│ │ ├── test_handler_regression_metrics_dist.py
│ │ ├── test_handler_rocauc.py
│ │ ├── test_handler_rocauc_dist.py
│ │ ├── test_handler_stats.py
│ │ ├── test_handler_surface_distance.py
│ │ ├── test_handler_tb_image.py
│ │ ├── test_handler_tb_stats.py
│ │ ├── test_handler_validation.py
│ │ ├── test_trt_compile.py
│ │ └── test_write_metrics_reports.py
│ ├── hvd_evenly_divisible_all_gather.py
│ ├── inferers/
│ │ ├── __init__.py
│ │ ├── test_avg_merger.py
│ │ ├── test_controlnet_inferers.py
│ │ ├── test_diffusion_inferer.py
│ │ ├── test_latent_diffusion_inferer.py
│ │ ├── test_patch_inferer.py
│ │ ├── test_saliency_inferer.py
│ │ ├── test_slice_inferer.py
│ │ ├── test_sliding_window_inference.py
│ │ ├── test_sliding_window_splitter.py
│ │ ├── test_wsi_sliding_window_splitter.py
│ │ └── test_zarr_avg_merger.py
│ ├── integration/
│ │ ├── __init__.py
│ │ ├── test_auto3dseg_ensemble.py
│ │ ├── test_auto3dseg_hpo.py
│ │ ├── test_deepedit_interaction.py
│ │ ├── test_hovernet_nuclear_type_post_processingd.py
│ │ ├── test_integration_autorunner.py
│ │ ├── test_integration_bundle_run.py
│ │ ├── test_integration_classification_2d.py
│ │ ├── test_integration_determinism.py
│ │ ├── test_integration_fast_train.py
│ │ ├── test_integration_gpu_customization.py
│ │ ├── test_integration_lazy_samples.py
│ │ ├── test_integration_nnunet_bundle.py
│ │ ├── test_integration_nnunetv2_runner.py
│ │ ├── test_integration_segmentation_3d.py
│ │ ├── test_integration_sliding_window.py
│ │ ├── test_integration_stn.py
│ │ ├── test_integration_unet_2d.py
│ │ ├── test_integration_workers.py
│ │ ├── test_integration_workflows.py
│ │ ├── test_integration_workflows_adversarial.py
│ │ ├── test_integration_workflows_gan.py
│ │ ├── test_loader_semaphore.py
│ │ ├── test_mapping_filed.py
│ │ ├── test_meta_affine.py
│ │ ├── test_metatensor_integration.py
│ │ ├── test_module_list.py
│ │ ├── test_one_of.py
│ │ ├── test_pad_collation.py
│ │ ├── test_reg_loss_integration.py
│ │ ├── test_retinanet_predict_utils.py
│ │ ├── test_seg_loss_integration.py
│ │ ├── test_spatial_combine_transforms.py
│ │ ├── test_testtimeaugmentation.py
│ │ ├── test_vis_gradbased.py
│ │ └── test_vista3d_utils.py
│ ├── lazy_transforms_utils.py
│ ├── losses/
│ │ ├── __init__.py
│ │ ├── deform/
│ │ │ ├── __init__.py
│ │ │ ├── test_bending_energy.py
│ │ │ └── test_diffusion_loss.py
│ │ ├── image_dissimilarity/
│ │ │ ├── __init__.py
│ │ │ ├── test_global_mutual_information_loss.py
│ │ │ └── test_local_normalized_cross_correlation_loss.py
│ │ ├── test_adversarial_loss.py
│ │ ├── test_barlow_twins_loss.py
│ │ ├── test_cldice_loss.py
│ │ ├── test_contrastive_loss.py
│ │ ├── test_dice_ce_loss.py
│ │ ├── test_dice_focal_loss.py
│ │ ├── test_dice_loss.py
│ │ ├── test_ds_loss.py
│ │ ├── test_focal_loss.py
│ │ ├── test_generalized_dice_focal_loss.py
│ │ ├── test_generalized_dice_loss.py
│ │ ├── test_generalized_wasserstein_dice_loss.py
│ │ ├── test_giou_loss.py
│ │ ├── test_hausdorff_loss.py
│ │ ├── test_masked_dice_loss.py
│ │ ├── test_masked_loss.py
│ │ ├── test_multi_scale.py
│ │ ├── test_nacl_loss.py
│ │ ├── test_perceptual_loss.py
│ │ ├── test_spectral_loss.py
│ │ ├── test_ssim_loss.py
│ │ ├── test_sure_loss.py
│ │ ├── test_tversky_loss.py
│ │ └── test_unified_focal_loss.py
│ ├── metrics/
│ │ ├── __init__.py
│ │ ├── test_calibration_metric.py
│ │ ├── test_compute_average_precision.py
│ │ ├── test_compute_confusion_matrix.py
│ │ ├── test_compute_f_beta.py
│ │ ├── test_compute_fid_metric.py
│ │ ├── test_compute_froc.py
│ │ ├── test_compute_generalized_dice.py
│ │ ├── test_compute_meandice.py
│ │ ├── test_compute_meaniou.py
│ │ ├── test_compute_mmd_metric.py
│ │ ├── test_compute_multiscalessim_metric.py
│ │ ├── test_compute_panoptic_quality.py
│ │ ├── test_compute_regression_metrics.py
│ │ ├── test_compute_roc_auc.py
│ │ ├── test_compute_variance.py
│ │ ├── test_cumulative.py
│ │ ├── test_cumulative_average.py
│ │ ├── test_cumulative_average_dist.py
│ │ ├── test_hausdorff_distance.py
│ │ ├── test_label_quality_score.py
│ │ ├── test_loss_metric.py
│ │ ├── test_metrics_reloaded.py
│ │ ├── test_ssim_metric.py
│ │ ├── test_surface_dice.py
│ │ └── test_surface_distance.py
│ ├── min_tests.py
│ ├── networks/
│ │ ├── __init__.py
│ │ ├── blocks/
│ │ │ ├── __init__.py
│ │ │ ├── dints_block/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_acn_block.py
│ │ │ │ ├── test_factorized_increase.py
│ │ │ │ ├── test_factorized_reduce.py
│ │ │ │ └── test_p3d_block.py
│ │ │ ├── test_CABlock.py
│ │ │ ├── test_adn.py
│ │ │ ├── test_convolutions.py
│ │ │ ├── test_crf_cpu.py
│ │ │ ├── test_crf_cuda.py
│ │ │ ├── test_crossattention.py
│ │ │ ├── test_denseblock.py
│ │ │ ├── test_downsample_block.py
│ │ │ ├── test_dynunet_block.py
│ │ │ ├── test_fpn_block.py
│ │ │ ├── test_localnet_block.py
│ │ │ ├── test_mlp.py
│ │ │ ├── test_patchembedding.py
│ │ │ ├── test_regunet_block.py
│ │ │ ├── test_se_block.py
│ │ │ ├── test_se_blocks.py
│ │ │ ├── test_segresnet_block.py
│ │ │ ├── test_selfattention.py
│ │ │ ├── test_simple_aspp.py
│ │ │ ├── test_spatialattention.py
│ │ │ ├── test_subpixel_upsample.py
│ │ │ ├── test_text_encoding.py
│ │ │ ├── test_transformerblock.py
│ │ │ ├── test_unetr_block.py
│ │ │ ├── test_upsample_block.py
│ │ │ └── warp/
│ │ │ ├── __init__.py
│ │ │ ├── test_dvf2ddf.py
│ │ │ └── test_warp.py
│ │ ├── layers/
│ │ │ ├── __init__.py
│ │ │ ├── filtering/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_bilateral_approx_cpu.py
│ │ │ │ ├── test_bilateral_approx_cuda.py
│ │ │ │ ├── test_bilateral_precise.py
│ │ │ │ ├── test_phl_cpu.py
│ │ │ │ ├── test_phl_cuda.py
│ │ │ │ ├── test_trainable_bilateral.py
│ │ │ │ └── test_trainable_joint_bilateral.py
│ │ │ ├── test_affine_transform.py
│ │ │ ├── test_apply_filter.py
│ │ │ ├── test_channel_pad.py
│ │ │ ├── test_conjugate_gradient.py
│ │ │ ├── test_drop_path.py
│ │ │ ├── test_gaussian.py
│ │ │ ├── test_gaussian_filter.py
│ │ │ ├── test_get_layers.py
│ │ │ ├── test_gmm.py
│ │ │ ├── test_grid_pull.py
│ │ │ ├── test_hilbert_transform.py
│ │ │ ├── test_lltm.py
│ │ │ ├── test_median_filter.py
│ │ │ ├── test_polyval.py
│ │ │ ├── test_preset_filters.py
│ │ │ ├── test_savitzky_golay_filter.py
│ │ │ ├── test_separable_filter.py
│ │ │ ├── test_skip_connection.py
│ │ │ ├── test_vector_quantizer.py
│ │ │ └── test_weight_init.py
│ │ ├── nets/
│ │ │ ├── __init__.py
│ │ │ ├── dints/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_dints_cell.py
│ │ │ │ └── test_dints_mixop.py
│ │ │ ├── regunet/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_localnet.py
│ │ │ │ └── test_regunet.py
│ │ │ ├── test_ahnet.py
│ │ │ ├── test_attentionunet.py
│ │ │ ├── test_autoencoder.py
│ │ │ ├── test_autoencoderkl.py
│ │ │ ├── test_basic_unet.py
│ │ │ ├── test_basic_unetplusplus.py
│ │ │ ├── test_bundle_init_bundle.py
│ │ │ ├── test_cell_sam_wrapper.py
│ │ │ ├── test_checkpointunet.py
│ │ │ ├── test_controlnet.py
│ │ │ ├── test_daf3d.py
│ │ │ ├── test_densenet.py
│ │ │ ├── test_diffusion_model_unet.py
│ │ │ ├── test_dints_network.py
│ │ │ ├── test_discriminator.py
│ │ │ ├── test_dynunet.py
│ │ │ ├── test_efficientnet.py
│ │ │ ├── test_flexible_unet.py
│ │ │ ├── test_fullyconnectednet.py
│ │ │ ├── test_generator.py
│ │ │ ├── test_globalnet.py
│ │ │ ├── test_highresnet.py
│ │ │ ├── test_hovernet.py
│ │ │ ├── test_masked_autoencoder_vit.py
│ │ │ ├── test_mednext.py
│ │ │ ├── test_milmodel.py
│ │ │ ├── test_net_adapter.py
│ │ │ ├── test_network_consistency.py
│ │ │ ├── test_patch_gan_dicriminator.py
│ │ │ ├── test_quicknat.py
│ │ │ ├── test_resnet.py
│ │ │ ├── test_restormer.py
│ │ │ ├── test_segresnet.py
│ │ │ ├── test_segresnet_ds.py
│ │ │ ├── test_senet.py
│ │ │ ├── test_spade_autoencoderkl.py
│ │ │ ├── test_spade_diffusion_model_unet.py
│ │ │ ├── test_spade_vaegan.py
│ │ │ ├── test_swin_unetr.py
│ │ │ ├── test_torchvision_fc_model.py
│ │ │ ├── test_transchex.py
│ │ │ ├── test_transformer.py
│ │ │ ├── test_unet.py
│ │ │ ├── test_unetr.py
│ │ │ ├── test_varautoencoder.py
│ │ │ ├── test_vista3d.py
│ │ │ ├── test_vit.py
│ │ │ ├── test_vitautoenc.py
│ │ │ ├── test_vnet.py
│ │ │ ├── test_voxelmorph.py
│ │ │ ├── test_vqvae.py
│ │ │ └── test_vqvaetransformer_inferer.py
│ │ ├── schedulers/
│ │ │ ├── __init__.py
│ │ │ ├── test_scheduler_ddim.py
│ │ │ ├── test_scheduler_ddpm.py
│ │ │ ├── test_scheduler_pndm.py
│ │ │ └── test_scheduler_rflow.py
│ │ ├── test_bundle_onnx_export.py
│ │ ├── test_convert_to_onnx.py
│ │ ├── test_convert_to_torchscript.py
│ │ ├── test_convert_to_trt.py
│ │ ├── test_save_state.py
│ │ ├── test_to_onehot.py
│ │ ├── test_varnet.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── test_copy_model_state.py
│ │ ├── test_eval_mode.py
│ │ ├── test_freeze_layers.py
│ │ ├── test_pixelunshuffle.py
│ │ ├── test_replace_module.py
│ │ └── test_train_mode.py
│ ├── nonconfig_workflow.py
│ ├── optimizers/
│ │ ├── __init__.py
│ │ ├── test_generate_param_groups.py
│ │ ├── test_lr_finder.py
│ │ ├── test_lr_scheduler.py
│ │ └── test_optim_novograd.py
│ ├── padders.py
│ ├── profile_subclass/
│ │ ├── README.md
│ │ ├── __init__.py
│ │ ├── cprofile_profiling.py
│ │ ├── min_classes.py
│ │ ├── profiling.py
│ │ └── pyspy_profiling.py
│ ├── runner.py
│ ├── test_call_dist.py
│ ├── test_query_memory.py
│ ├── test_timedcall_dist.py
│ ├── test_utils.py
│ ├── testing_data/
│ │ ├── 1D_BP_bwd.txt
│ │ ├── 1D_BP_fwd.txt
│ │ ├── CT_DICOM/
│ │ │ ├── 7106
│ │ │ ├── 7136
│ │ │ ├── 7166
│ │ │ └── 7196
│ │ ├── anatomical.nii
│ │ ├── bundle_test_network.py
│ │ ├── config_fl_evaluate.json
│ │ ├── config_fl_filters.json
│ │ ├── config_fl_stats_1.json
│ │ ├── config_fl_stats_2.json
│ │ ├── config_fl_train.json
│ │ ├── cpp_resample_answers.py
│ │ ├── data_config.json
│ │ ├── fl_infer_properties.json
│ │ ├── inference.json
│ │ ├── inference.yaml
│ │ ├── integration_answers.py
│ │ ├── logging.conf
│ │ ├── metadata.json
│ │ ├── multi_gpu_evaluate.json
│ │ ├── multi_gpu_train.json
│ │ ├── python_workflow_properties.json
│ │ ├── reoriented_anat_moved.nii
│ │ ├── responsive_inference.json
│ │ ├── signal.npy
│ │ ├── transform_metatensor_cases.yaml
│ │ └── ultrasound_confidence_map/
│ │ ├── femur_result.npy
│ │ └── neck_result.npy
│ ├── transforms/
│ │ ├── __init__.py
│ │ ├── compose/
│ │ │ ├── __init__.py
│ │ │ ├── test_compose.py
│ │ │ └── test_some_of.py
│ │ ├── croppad/
│ │ │ ├── __init__.py
│ │ │ ├── test_pad_nd_dtypes.py
│ │ │ ├── test_rand_weighted_crop.py
│ │ │ └── test_rand_weighted_cropd.py
│ │ ├── functional/
│ │ │ ├── __init__.py
│ │ │ ├── test_apply.py
│ │ │ └── test_resample.py
│ │ ├── intensity/
│ │ │ ├── __init__.py
│ │ │ ├── test_compute_ho_ver_maps.py
│ │ │ ├── test_compute_ho_ver_maps_d.py
│ │ │ ├── test_foreground_mask.py
│ │ │ ├── test_foreground_maskd.py
│ │ │ ├── test_rand_histogram_shiftd.py
│ │ │ ├── test_scale_intensity_range_percentiles.py
│ │ │ └── test_scale_intensity_range_percentilesd.py
│ │ ├── inverse/
│ │ │ ├── __init__.py
│ │ │ ├── test_inverse.py
│ │ │ ├── test_inverse_array.py
│ │ │ ├── test_inverse_dict.py
│ │ │ ├── test_invert.py
│ │ │ ├── test_invertd.py
│ │ │ └── test_traceable_transform.py
│ │ ├── post/
│ │ │ ├── __init__.py
│ │ │ ├── test_label_filterd.py
│ │ │ ├── test_probnms.py
│ │ │ ├── test_probnmsd.py
│ │ │ └── test_remove_small_objects.py
│ │ ├── spatial/
│ │ │ ├── __init__.py
│ │ │ ├── test_convert_box_points.py
│ │ │ ├── test_grid_patch.py
│ │ │ ├── test_grid_patchd.py
│ │ │ ├── test_rand_grid_patch.py
│ │ │ ├── test_rand_grid_patchd.py
│ │ │ └── test_spatial_resampled.py
│ │ ├── test_activations.py
│ │ ├── test_activationsd.py
│ │ ├── test_adaptors.py
│ │ ├── test_add_coordinate_channels.py
│ │ ├── test_add_coordinate_channelsd.py
│ │ ├── test_add_extreme_points_channel.py
│ │ ├── test_add_extreme_points_channeld.py
│ │ ├── test_adjust_contrast.py
│ │ ├── test_adjust_contrastd.py
│ │ ├── test_affine.py
│ │ ├── test_affine_grid.py
│ │ ├── test_affined.py
│ │ ├── test_as_channel_last.py
│ │ ├── test_as_channel_lastd.py
│ │ ├── test_as_discrete.py
│ │ ├── test_as_discreted.py
│ │ ├── test_border_pad.py
│ │ ├── test_border_padd.py
│ │ ├── test_bounding_rect.py
│ │ ├── test_bounding_rectd.py
│ │ ├── test_cast_to_type.py
│ │ ├── test_cast_to_typed.py
│ │ ├── test_center_scale_crop.py
│ │ ├── test_center_scale_cropd.py
│ │ ├── test_center_spatial_crop.py
│ │ ├── test_center_spatial_cropd.py
│ │ ├── test_classes_to_indices.py
│ │ ├── test_classes_to_indicesd.py
│ │ ├── test_clip_intensity_percentiles.py
│ │ ├── test_clip_intensity_percentilesd.py
│ │ ├── test_compose_get_number_conversions.py
│ │ ├── test_concat_itemsd.py
│ │ ├── test_convert_to_multi_channel.py
│ │ ├── test_convert_to_multi_channeld.py
│ │ ├── test_copy_itemsd.py
│ │ ├── test_create_grid_and_affine.py
│ │ ├── test_crop_foreground.py
│ │ ├── test_crop_foregroundd.py
│ │ ├── test_cucim_dict_transform.py
│ │ ├── test_cucim_transform.py
│ │ ├── test_data_stats.py
│ │ ├── test_data_statsd.py
│ │ ├── test_delete_itemsd.py
│ │ ├── test_detect_envelope.py
│ │ ├── test_distance_transform_edt.py
│ │ ├── test_divisible_pad.py
│ │ ├── test_divisible_padd.py
│ │ ├── test_ensure_channel_first.py
│ │ ├── test_ensure_channel_firstd.py
│ │ ├── test_ensure_type.py
│ │ ├── test_ensure_typed.py
│ │ ├── test_fg_bg_to_indices.py
│ │ ├── test_fg_bg_to_indicesd.py
│ │ ├── test_fill_holes.py
│ │ ├── test_fill_holesd.py
│ │ ├── test_flatten_sub_keysd.py
│ │ ├── test_flip.py
│ │ ├── test_flipd.py
│ │ ├── test_fourier.py
│ │ ├── test_gaussian_sharpen.py
│ │ ├── test_gaussian_sharpend.py
│ │ ├── test_gaussian_smooth.py
│ │ ├── test_gaussian_smoothd.py
│ │ ├── test_generate_heatmap.py
│ │ ├── test_generate_heatmapd.py
│ │ ├── test_generate_label_classes_crop_centers.py
│ │ ├── test_generate_pos_neg_label_crop_centers.py
│ │ ├── test_generate_spatial_bounding_box.py
│ │ ├── test_get_extreme_points.py
│ │ ├── test_gibbs_noise.py
│ │ ├── test_gibbs_noised.py
│ │ ├── test_grid_distortion.py
│ │ ├── test_grid_distortiond.py
│ │ ├── test_grid_split.py
│ │ ├── test_grid_splitd.py
│ │ ├── test_histogram_normalize.py
│ │ ├── test_histogram_normalized.py
│ │ ├── test_image_filter.py
│ │ ├── test_intensity_stats.py
│ │ ├── test_intensity_statsd.py
│ │ ├── test_inverse_collation.py
│ │ ├── test_k_space_spike_noise.py
│ │ ├── test_k_space_spike_noised.py
│ │ ├── test_keep_largest_connected_component.py
│ │ ├── test_keep_largest_connected_componentd.py
│ │ ├── test_label_filter.py
│ │ ├── test_label_to_contour.py
│ │ ├── test_label_to_contourd.py
│ │ ├── test_label_to_mask.py
│ │ ├── test_label_to_maskd.py
│ │ ├── test_load_image.py
│ │ ├── test_load_imaged.py
│ │ ├── test_load_spacing_orientation.py
│ │ ├── test_map_and_generate_sampling_centers.py
│ │ ├── test_map_binary_to_indices.py
│ │ ├── test_map_classes_to_indices.py
│ │ ├── test_map_label_value.py
│ │ ├── test_map_label_valued.py
│ │ ├── test_map_transform.py
│ │ ├── test_mask_intensity.py
│ │ ├── test_mask_intensityd.py
│ │ ├── test_mean_ensemble.py
│ │ ├── test_mean_ensembled.py
│ │ ├── test_median_smooth.py
│ │ ├── test_median_smoothd.py
│ │ ├── test_morphological_ops.py
│ │ ├── test_nifti_endianness.py
│ │ ├── test_normalize_intensity.py
│ │ ├── test_normalize_intensityd.py
│ │ ├── test_nvtx_decorator.py
│ │ ├── test_nvtx_transform.py
│ │ ├── test_orientation.py
│ │ ├── test_orientationd.py
│ │ ├── test_rand_adjust_contrast.py
│ │ ├── test_rand_adjust_contrastd.py
│ │ ├── test_rand_affine.py
│ │ ├── test_rand_affine_grid.py
│ │ ├── test_rand_affined.py
│ │ ├── test_rand_axis_flip.py
│ │ ├── test_rand_axis_flipd.py
│ │ ├── test_rand_bias_field.py
│ │ ├── test_rand_bias_fieldd.py
│ │ ├── test_rand_coarse_dropout.py
│ │ ├── test_rand_coarse_dropoutd.py
│ │ ├── test_rand_coarse_shuffle.py
│ │ ├── test_rand_coarse_shuffled.py
│ │ ├── test_rand_crop_by_label_classes.py
│ │ ├── test_rand_crop_by_label_classesd.py
│ │ ├── test_rand_crop_by_pos_neg_label.py
│ │ ├── test_rand_crop_by_pos_neg_labeld.py
│ │ ├── test_rand_cucim_dict_transform.py
│ │ ├── test_rand_cucim_transform.py
│ │ ├── test_rand_deform_grid.py
│ │ ├── test_rand_elastic_2d.py
│ │ ├── test_rand_elastic_3d.py
│ │ ├── test_rand_elasticd_2d.py
│ │ ├── test_rand_elasticd_3d.py
│ │ ├── test_rand_flip.py
│ │ ├── test_rand_flipd.py
│ │ ├── test_rand_gaussian_noise.py
│ │ ├── test_rand_gaussian_noised.py
│ │ ├── test_rand_gaussian_sharpen.py
│ │ ├── test_rand_gaussian_sharpend.py
│ │ ├── test_rand_gaussian_smooth.py
│ │ ├── test_rand_gaussian_smoothd.py
│ │ ├── test_rand_gibbs_noise.py
│ │ ├── test_rand_gibbs_noised.py
│ │ ├── test_rand_grid_distortion.py
│ │ ├── test_rand_grid_distortiond.py
│ │ ├── test_rand_histogram_shift.py
│ │ ├── test_rand_k_space_spike_noise.py
│ │ ├── test_rand_k_space_spike_noised.py
│ │ ├── test_rand_rician_noise.py
│ │ ├── test_rand_rician_noised.py
│ │ ├── test_rand_rotate.py
│ │ ├── test_rand_rotate90.py
│ │ ├── test_rand_rotate90d.py
│ │ ├── test_rand_rotated.py
│ │ ├── test_rand_scale_crop.py
│ │ ├── test_rand_scale_cropd.py
│ │ ├── test_rand_scale_intensity.py
│ │ ├── test_rand_scale_intensity_fixed_mean.py
│ │ ├── test_rand_scale_intensity_fixed_meand.py
│ │ ├── test_rand_scale_intensityd.py
│ │ ├── test_rand_shift_intensity.py
│ │ ├── test_rand_shift_intensityd.py
│ │ ├── test_rand_simulate_low_resolution.py
│ │ ├── test_rand_simulate_low_resolutiond.py
│ │ ├── test_rand_spatial_crop.py
│ │ ├── test_rand_spatial_crop_samples.py
│ │ ├── test_rand_spatial_crop_samplesd.py
│ │ ├── test_rand_spatial_cropd.py
│ │ ├── test_rand_std_shift_intensity.py
│ │ ├── test_rand_std_shift_intensityd.py
│ │ ├── test_rand_torchio.py
│ │ ├── test_rand_torchiod.py
│ │ ├── test_rand_zoom.py
│ │ ├── test_rand_zoomd.py
│ │ ├── test_randidentity.py
│ │ ├── test_random_order.py
│ │ ├── test_randtorchvisiond.py
│ │ ├── test_regularization.py
│ │ ├── test_remove_repeated_channel.py
│ │ ├── test_remove_repeated_channeld.py
│ │ ├── test_repeat_channel.py
│ │ ├── test_repeat_channeld.py
│ │ ├── test_resample_backends.py
│ │ ├── test_resample_to_match.py
│ │ ├── test_resample_to_matchd.py
│ │ ├── test_resampler.py
│ │ ├── test_resize.py
│ │ ├── test_resize_with_pad_or_crop.py
│ │ ├── test_resize_with_pad_or_cropd.py
│ │ ├── test_resized.py
│ │ ├── test_rotate.py
│ │ ├── test_rotate90.py
│ │ ├── test_rotate90d.py
│ │ ├── test_rotated.py
│ │ ├── test_save_classificationd.py
│ │ ├── test_save_image.py
│ │ ├── test_save_imaged.py
│ │ ├── test_savitzky_golay_smooth.py
│ │ ├── test_savitzky_golay_smoothd.py
│ │ ├── test_scale_intensity.py
│ │ ├── test_scale_intensity_fixed_mean.py
│ │ ├── test_scale_intensity_range.py
│ │ ├── test_scale_intensity_ranged.py
│ │ ├── test_scale_intensityd.py
│ │ ├── test_select_itemsd.py
│ │ ├── test_shift_intensity.py
│ │ ├── test_shift_intensityd.py
│ │ ├── test_signal_continuouswavelet.py
│ │ ├── test_signal_fillempty.py
│ │ ├── test_signal_fillemptyd.py
│ │ ├── test_signal_rand_add_gaussiannoise.py
│ │ ├── test_signal_rand_add_sine.py
│ │ ├── test_signal_rand_add_sine_partial.py
│ │ ├── test_signal_rand_add_squarepulse.py
│ │ ├── test_signal_rand_add_squarepulse_partial.py
│ │ ├── test_signal_rand_drop.py
│ │ ├── test_signal_rand_scale.py
│ │ ├── test_signal_rand_shift.py
│ │ ├── test_signal_remove_frequency.py
│ │ ├── test_smooth_field.py
│ │ ├── test_sobel_gradient.py
│ │ ├── test_sobel_gradientd.py
│ │ ├── test_spacing.py
│ │ ├── test_spacingd.py
│ │ ├── test_spatial_crop.py
│ │ ├── test_spatial_cropd.py
│ │ ├── test_spatial_pad.py
│ │ ├── test_spatial_padd.py
│ │ ├── test_spatial_resample.py
│ │ ├── test_squeezedim.py
│ │ ├── test_squeezedimd.py
│ │ ├── test_std_shift_intensity.py
│ │ ├── test_std_shift_intensityd.py
│ │ ├── test_threshold_intensity.py
│ │ ├── test_threshold_intensityd.py
│ │ ├── test_to_contiguous.py
│ │ ├── test_to_cupy.py
│ │ ├── test_to_cupyd.py
│ │ ├── test_to_device.py
│ │ ├── test_to_deviced.py
│ │ ├── test_to_numpy.py
│ │ ├── test_to_numpyd.py
│ │ ├── test_to_pil.py
│ │ ├── test_to_pild.py
│ │ ├── test_to_tensor.py
│ │ ├── test_to_tensord.py
│ │ ├── test_torchio.py
│ │ ├── test_torchiod.py
│ │ ├── test_torchvision.py
│ │ ├── test_torchvisiond.py
│ │ ├── test_transform.py
│ │ ├── test_transpose.py
│ │ ├── test_transposed.py
│ │ ├── test_ultrasound_confidence_map_transform.py
│ │ ├── test_utils_pytorch_numpy_unification.py
│ │ ├── test_vote_ensemble.py
│ │ ├── test_vote_ensembled.py
│ │ ├── test_with_allow_missing_keys.py
│ │ ├── test_zoom.py
│ │ ├── test_zoomd.py
│ │ ├── transform/
│ │ │ ├── __init__.py
│ │ │ ├── test_randomizable.py
│ │ │ └── test_randomizable_transform_type.py
│ │ ├── utility/
│ │ │ ├── __init__.py
│ │ │ ├── test_apply_transform_to_points.py
│ │ │ ├── test_apply_transform_to_pointsd.py
│ │ │ ├── test_identity.py
│ │ │ ├── test_identityd.py
│ │ │ ├── test_lambda.py
│ │ │ ├── test_lambdad.py
│ │ │ ├── test_rand_lambda.py
│ │ │ ├── test_rand_lambdad.py
│ │ │ ├── test_simulatedelay.py
│ │ │ ├── test_simulatedelayd.py
│ │ │ ├── test_splitdim.py
│ │ │ └── test_splitdimd.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── test_correct_crop_centers.py
│ │ ├── test_get_unique_labels.py
│ │ ├── test_print_transform_backends.py
│ │ └── test_soft_clip.py
│ ├── utils/
│ │ ├── __init__.py
│ │ ├── enums/
│ │ │ ├── __init__.py
│ │ │ ├── test_hovernet_loss.py
│ │ │ ├── test_ordering.py
│ │ │ └── test_wsireader.py
│ │ ├── misc/
│ │ │ ├── __init__.py
│ │ │ ├── test_ensure_tuple.py
│ │ │ ├── test_monai_env_vars.py
│ │ │ ├── test_monai_utils_misc.py
│ │ │ ├── test_str2bool.py
│ │ │ └── test_str2list.py
│ │ ├── test_alias.py
│ │ ├── test_component_store.py
│ │ ├── test_deprecated.py
│ │ ├── test_enum_bound_interp.py
│ │ ├── test_evenly_divisible_all_gather_dist.py
│ │ ├── test_get_package_version.py
│ │ ├── test_handler_logfile.py
│ │ ├── test_handler_metric_logger.py
│ │ ├── test_list_to_dict.py
│ │ ├── test_look_up_option.py
│ │ ├── test_optional_import.py
│ │ ├── test_pad_mode.py
│ │ ├── test_profiling.py
│ │ ├── test_rankfilter_dist.py
│ │ ├── test_require_pkg.py
│ │ ├── test_sample_slices.py
│ │ ├── test_set_determinism.py
│ │ ├── test_squeeze_unsqueeze.py
│ │ ├── test_state_cacher.py
│ │ ├── test_torchscript_utils.py
│ │ ├── test_version.py
│ │ ├── test_version_after.py
│ │ └── type_conversion/
│ │ ├── __init__.py
│ │ ├── test_convert_data_type.py
│ │ ├── test_get_equivalent_dtype.py
│ │ └── test_safe_dtype_range.py
│ └── visualize/
│ ├── __init__.py
│ ├── test_img2tensorboard.py
│ ├── test_occlusion_sensitivity.py
│ ├── test_plot_2d_or_3d_image.py
│ ├── test_vis_cam.py
│ ├── test_vis_gradcam.py
│ └── utils/
│ ├── __init__.py
│ ├── test_blend_images.py
│ └── test_matshow3d.py
└── versioneer.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .clang-format
================================================
---
AccessModifierOffset: -1
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ForEachMacros: [ FOR_EACH_RANGE, FOR_EACH, ]
IncludeCategories:
- Regex: '^<.*\.h(pp)?>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IndentCaseLabels: true
IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 2000000
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
...
================================================
FILE: .coderabbit.yaml
================================================
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# This file configures CodeRabbit with the various options described in https://docs.coderabbit.ai/configure-coderabbit.
# CodeRabbit also has a set of commands here: https://docs.coderabbit.ai/guides/commands/
language: "en-US"
early_access: false
tone_instructions: "Be terse and to the point in all statements and commentary."
reviews:
# chill is less verbose, assertive is more verbose with more nitpick feedback
profile: chill
high_level_summary: false
high_level_summary_placeholder: "@coderabbitai summary"
sequence_diagrams: false
auto_apply_labels: false
suggested_reviewers: false
changed_files_summary: false
suggested_labels: false
abort_on_close: true
poem: false
path_instructions:
- path: '**/*.md'
instructions: Remember that documentation must be updated with the latest information.
- path: '**/*.rst'
instructions: Remember that documentation must be updated with the latest information.
- path: '**/*.py'
instructions: >-
Review the Python code for quality and correctness. Ensure variable names adhere to PEP8 style guides, are
sensible and informative in regards to their function, though permitting simple names for loop and comprehension
variables. Ensure routine names are meaningful in regards to their function and use verbs, adjectives, and
nouns in a semantically appropriate way. Docstrings should be present for all definition which describe each
variable, return value, and raised exception in the appropriate section of the Google-style of docstrings.
Examine code for logical error or inconsistencies, and suggest what may be changed to addressed these. Suggest
any enhancements for code improving efficiency, maintainability, comprehensibility, and correctness. Ensure new
or modified definitions will be covered by existing or new unit tests.
auto_review:
# Automatic Review | Automatic code review
enabled: true
# Review draft PRs/MRs.
drafts: false
# ignore PRs with these in the title, these sorts of PRs should be drafts anyway
ignore_title_keywords:
- "WIP"
- "DO NOT MERGE"
# opt out for now until it's clear this isn't too much info and is useful
knowledge_base:
opt_out: true
# chat is allowed
chat:
auto_reply: true
================================================
FILE: .deepsource.toml
================================================
version = 1
test_patterns = ["tests/**"]
exclude_patterns = [
"monai/_version.py",
"versioneer.py"
]
[[analyzers]]
name = "python"
enabled = true
[analyzers.meta]
runtime_version = "3.x.x"
[[analyzers]]
name = "test-coverage"
enabled = true
[[analyzers]]
name = "docker"
enabled = true
[[analyzers]]
name = "shell"
enabled = true
================================================
FILE: .dockerignore
================================================
# Ignore the following files/folders during docker build
__pycache__/
docs/
.vscode
.git
.mypy_cache
.ruff_cache
.pytype
.coverage
.coverage.*
.coverage/
coverage.xml
.readthedocs.yml
!README.md
================================================
FILE: .gitattributes
================================================
monai/_version.py export-subst
================================================
FILE: .github/CODEOWNERS
================================================
/monai/ @KumoLiu @ericspod @Nic-Ma
/docs/ @KumoLiu @ericspod @Nic-Ma
/tests/ @KumoLiu @ericspod @Nic-Ma
/.github/ @KumoLiu
/monai/networks/schedulers/ @virginiafdez
/monai/inferers/inferer.py @virginiafdez
/monai/losses/adversarial_loss.py @virginiafdez
/monai/losses/perceptual.py @virginiafdez
/monai/networks/blocks/spade_norm.py @virginiafdez
/monai/networks/nets/autoencoderkl.py @virginiafdez
/monai/networks/nets/controlnet.py @virginiafdez
/monai/networks/nets/diffusion_model_unet.py @virginiafdez
/monai/networks/nets/patchgan_discriminator.py @virginiafdez
/monai/networks/nets/spade_autoencoderkl.py @virginiafdez
/monai/networks/nets/spade_diffusion_model_unet.py @virginiafdez
/monai/networks/nets/spade_network.py @virginiafdez
/monai/networks/nets/vqvae.py @virginiafdez
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Install '....'
3. Run commands '....'
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment**
Ensuring you use the relevant python executable, please paste the output of:
```
python -c "import monai; monai.config.print_debug_info()"
```
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/ISSUE_TEMPLATE/question.md
================================================
---
name: Question (please use the Discussion tab)
about: https://github.com/Project-MONAI/MONAI/discussions
title: 'Please use MONAI Discussion tab for questions'
labels: ''
assignees: ''
---
**Please use MONAI's Discussions tab**
For questions relating to MONAI usage, please do not create an issue.
Instead, use [MONAI's GitHub Discussions tab](https://github.com/Project-MONAI/MONAI/discussions). This can be found next to Issues and Pull Requests along the top of our repository.
================================================
FILE: .github/codecov.yml
================================================
coverage:
status:
project:
default:
target: 70%
threshold: 10
base: parent
if_no_uploads: error
if_not_found: success
if_ci_failed: error
only_pulls: false
flags: null
paths: null
patch:
default:
target: auto
# Allows PRs without tests, overall stats count
threshold: 100
base: auto
if_no_uploads: error
if_not_found: success
if_ci_failed: error
only_pulls: false
flags: null
paths: null
comment: # enable code coverage comment on PR
layout: "diff, flags, files"
behavior: default
require_changes: false
require_base: false
require_head: true
hide_project_coverage: true
ignore:
- "versioneer.py"
- "monai/_version.py"
================================================
FILE: .github/dco.yml
================================================
allowRemediationCommits:
individual: true
================================================
FILE: .github/dependabot.yml
================================================
# Set update schedule for GitHub Actions
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "monthly"
================================================
FILE: .github/pull_request_template.md
================================================
Fixes # .
### Description
A few sentences describing the changes proposed in this pull request.
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not applicable items -->
- [x] Non-breaking change (fix or new feature that would not break existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/` folder.
================================================
FILE: .github/workflows/blossom-ci.yml
================================================
# A workflow to trigger ci on hybrid infra (github + self hosted runner)
name: Blossom-CI
on:
issue_comment:
types: [created]
workflow_dispatch:
inputs:
platform:
description: 'runs-on argument'
required: false
args:
description: 'argument'
required: false
permissions:
actions: write
checks: write
contents: write
issues: write
pull-requests: write
repository-projects: write
statuses: write
jobs:
Authorization:
name: Authorization
runs-on: blossom
outputs:
args: ${{ env.args }}
# This job only runs for pull request comments
if: |
github.event.comment.body == '/build' &&
(
github.actor == 'Nic-Ma' ||
github.actor == 'wyli' ||
github.actor == 'wendell-hom' ||
github.actor == 'KumoLiu'
)
steps:
- name: Check if comment is issued by authorized person
run: blossom-ci
env:
OPERATION: 'AUTH'
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_KEY_DATA: ${{ secrets.BLOSSOM_KEY }}
Vulnerability-scan:
name: Vulnerability scan
needs: [Authorization]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
repository: ${{ fromJson(needs.Authorization.outputs.args).repo }}
ref: ${{ fromJson(needs.Authorization.outputs.args).ref }}
lfs: 'true'
# repo specific steps
#- name: Setup java
# uses: actions/setup-java@v1
# with:
# java-version: '1.8'
# add blackduck properties https://synopsys.atlassian.net/wiki/spaces/INTDOCS/pages/631308372/Methods+for+Configuring+Analysis#Using-a-configuration-file
#- name: Setup blackduck properties
# run: |
# PROJECTS=$(mvn -am dependency:tree | grep maven-dependency-plugin | awk '{ out="com.nvidia:"$(NF-1);print out }' | grep rapids | xargs | sed -e 's/ /,/g')
# echo detect.maven.build.command="-pl=$PROJECTS -am" >> application.properties
# echo detect.maven.included.scopes=compile >> application.properties
- name: Setup blackduck properties
run: |
echo detect.excluded.detector.types=PIP >> application.properties
- name: Run blossom action
uses: NVIDIA/blossom-action@main
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_KEY_DATA: ${{ secrets.BLOSSOM_KEY }}
with:
args1: ${{ fromJson(needs.Authorization.outputs.args).args1 }}
args2: ${{ fromJson(needs.Authorization.outputs.args).args2 }}
args3: ${{ fromJson(needs.Authorization.outputs.args).args3 }}
Job-trigger:
name: Start ci job
needs: [Vulnerability-scan]
runs-on: blossom
steps:
- name: Start ci job
run: blossom-ci
env:
OPERATION: 'START-CI-JOB'
CI_SERVER: ${{ secrets.CI_SERVER }}
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Post-processing:
name: Post processing
runs-on: blossom
if : github.event_name == 'workflow_dispatch'
steps:
- name: Start post processing
run: blossom-ci
env:
OPERATION: 'POST-PROCESSING'
CI_SERVER: ${{ secrets.CI_SERVER }}
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/chatops.yml
================================================
# triggering the workflows by commenting `/black` and `/integration-test`
name: chatops
# currently dispatches /black command to project-monai/monai-code-formatter
on:
issue_comment:
types: [created, edited]
jobs:
dispatch_command:
runs-on: ubuntu-latest
steps:
- name: dispatch
uses: peter-evans/slash-command-dispatch@v5.0.2
with:
token: ${{ secrets.PR_MAINTAIN }}
reaction-token: ${{ secrets.GITHUB_TOKEN }}
reactions: false
config: >
[
{
"command": "black",
"permission": "none",
"issue_type": "pull-request",
"allow_edits": true,
"repository": "project-monai/monai-code-formatter"
},
{
"command": "integration-test",
"permission": "none",
"issue_type": "pull-request",
"allow_edits": true
}
]
================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ dev, main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ dev ]
schedule:
- cron: '18 1 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
- name: Build
run: |
rm -rf /opt/hostedtoolcache/{node,go,Ruby,Java*}
ls -al /opt/hostedtoolcache
rm -rf /usr/share/dotnet/
python -m pip install -U pip wheel
python -m pip install -r requirements-dev.txt
BUILD_MONAI=1 ./runtests.sh --build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
================================================
FILE: .github/workflows/conda.yml
================================================
# daily tests for different OS with conda
name: cron-conda
on:
schedule:
- cron: "0 3 * * *" # at 03:00 UTC
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
# automatically cancel the previously triggered workflows when there's a newer version
group: conda-tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
cron-conda:
if: github.repository == 'Project-MONAI/MONAI'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10"]
runs-on: ${{ matrix.os }}
timeout-minutes: 46 # equal to max + 3*std over the last 600 successful runs
env:
QUICKTEST: True
steps:
- if: runner.os == 'windows'
name: Config pagefile (Windows only)
uses: al-cheb/configure-pagefile-action@v1.5
with:
minimum-size: 8GB
maximum-size: 16GB
disk-root: "D:"
- uses: actions/checkout@v6
- name: Clean up disk space
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
rm -rf /usr/share/dotnet/
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
auto-activate-base: false
environment-file: environment-dev.yml
activate-environment: monai
- name: Env info (CPU ${{ runner.os }})
shell: bash -el {0}
run: |
conda info
conda list
- if: runner.os == 'windows'
name: Windows only install
shell: bash -el {0}
run: |
conda activate monai
# this `cpuonly` and -c conda-forge is needed to reduce the paging file size on a github instance
# force to install `cpuonly==2.0.0` is to fix the same issue as:
# https://github.com/pytorch/vision/issues/4240
conda install pytorch torchvision torchaudio cpuonly==2.0.0 -c pytorch -c conda-forge
conda deactivate
- name: Test env (CPU ${{ runner.os }})
shell: bash -el {0}
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
conda activate monai
$(pwd)/runtests.sh --build --unittests
conda deactivate
================================================
FILE: .github/workflows/cron-ngc-bundle.yml
================================================
# daily tests for ngc bundles
name: cron-ngc-bundle
on:
schedule:
- cron: "0 2 * * *" # at 02:00 UTC
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
# automatically cancel the previously triggered workflows when there's a newer version
group: bundle-tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
cron-load:
if: github.repository == 'Project-MONAI/MONAI'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: cache weekly timestamp
id: pip-cache
run: echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
- name: cache for pip
uses: actions/cache@v5
id: cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install dependencies
run: |
rm -rf /github/home/.cache/torch/hub/bundle/
python -m pip install --upgrade pip wheel
python -m pip install -r requirements-dev.txt
- name: Loading Bundles
run: |
# clean up temporary files
$(pwd)/runtests.sh --build --clean
# run tests
python -m tests.ngc_bundle_download
================================================
FILE: .github/workflows/cron.yml
================================================
# nightly: Jenkinsfile.monai-pytorch-versions, monai-latest-image, monai-pip, monai-latest-docker, monai-notebooks
name: nightly-crons
on:
# schedule:
# - cron: "0 2 * * *" # at 02:00 UTC
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
cron-gpu:
if: github.repository == 'Project-MONAI/MONAI'
strategy:
matrix:
environment:
- "PT230+CUDA121"
- "PT240+CUDA126"
- "PTLATEST+CUDA126"
include:
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes
- environment: PT230+CUDA121
pytorch: "pytorch==2.3.0 torchvision==0.18.0 --extra-index-url https://download.pytorch.org/whl/cu121"
base: "nvcr.io/nvidia/pytorch:23.08-py3" # CUDA 12.1
- environment: PT240+CUDA126
pytorch: "pytorch==2.4.0 torchvision==0.19.0 --extra-index-url https://download.pytorch.org/whl/cu121"
base: "nvcr.io/nvidia/pytorch:24.08-py3" # CUDA 12.6
- environment: PTLATEST+CUDA126
pytorch: "-U torch torchvision --extra-index-url https://download.pytorch.org/whl/cu121"
base: "nvcr.io/nvidia/pytorch:24.10-py3" # CUDA 12.6
container:
image: ${{ matrix.base }}
options: "--gpus all"
runs-on: [self-hosted, linux, x64, common]
steps:
- uses: actions/checkout@v6
- name: apt install
run: |
apt-get update
apt-get install -y wget
- name: Install the dependencies
run: |
which python
python -m pip install --upgrade pip wheel
python -m pip uninstall -y torch torchvision
python -m pip install ${{ matrix.pytorch }}
python -m pip install -r requirements-dev.txt
python -m pip list
- name: Run tests report coverage
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
export LAUNCH_DELAY=$[ $RANDOM % 16 * 60 ]
echo "Sleep $LAUNCH_DELAY"
sleep $LAUNCH_DELAY
nvidia-smi
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
echo $CUDA_VISIBLE_DEVICES
trap 'if pgrep python; then pkill python; fi;' ERR
python -c $'import torch\na,b=torch.zeros(1,device="cuda:0"),torch.zeros(1,device="cuda:1");\nwhile True:print(a,b)' > /dev/null &
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))'
BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with coverage report
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
shell: bash
- name: Upload coverage
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false
files: ./coverage.xml
cron-pt-image:
if: github.repository == 'Project-MONAI/MONAI'
strategy:
matrix:
container: ["pytorch:23.08", "pytorch:24.08", "pytorch:24.10"]
container:
image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image
options: "--gpus all"
runs-on: [self-hosted, linux, x64, integration]
steps:
- uses: actions/checkout@v6
- name: Install APT dependencies
run: |
apt-get update
DEBIAN_FRONTEND="noninteractive" apt-get install -y libopenslide0
- name: Install Python dependencies
run: |
which python
python -m pip install --upgrade pip wheel
python -m pip install -r requirements-dev.txt
python -m pip list
- name: Run tests report coverage
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
export LAUNCH_DELAY=$[ $RANDOM % 16 * 60 ]
echo "Sleep $LAUNCH_DELAY"
sleep $LAUNCH_DELAY
nvidia-smi
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
echo $CUDA_VISIBLE_DEVICES
trap 'if pgrep python; then pkill python; fi;' ERR
python -c $'import torch\na,b=torch.zeros(1,device="cuda:0"),torch.zeros(1,device="cuda:1");\nwhile True:print(a,b)' > /dev/null &
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))'
BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with coverage report
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
shell: bash
- name: Upload coverage
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false
files: ./coverage.xml
cron-pip:
# pip install monai[all] and use it to run unit tests
if: github.repository == 'Project-MONAI/MONAI'
strategy:
matrix:
container: ["pytorch:24.10"]
container:
image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image
options: "--gpus all"
runs-on: [self-hosted, linux, x64, integration]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install the dependencies
run: |
which python
python -m pip install --upgrade pip wheel twine
python -m pip list
- name: Run tests report coverage
shell: bash
run: |
pip uninstall monai
pip list | grep -iv monai
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
root_dir=$PWD
echo "$root_dir"
set -e
# build tar.gz and wheel
bash runtests.sh --clean # clear any existing dev temp files
python -m pip uninstall -y torch torchvision
python setup.py check -m -s
python setup.py sdist bdist_wheel
python -m twine check dist/*
# move packages to a temp dir
tmp_dir=$(mktemp -d)
cp dist/monai* "$tmp_dir"
rm -r build dist monai.egg-info
cd "$tmp_dir"
ls -al
# install from tar.gz
name=$(ls *.tar.gz | head -n1)
echo $name
python -m pip install $name[all]
python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
python -c 'import monai; print(monai.__file__)'
# run tests
cp $root_dir/requirements*.txt "$tmp_dir"
cp -r $root_dir/tests "$tmp_dir"
pwd
ls -al
export LAUNCH_DELAY=$[ $RANDOM % 16 * 60 ]
echo "Sleep $LAUNCH_DELAY"
sleep $LAUNCH_DELAY
nvidia-smi
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
echo $CUDA_VISIBLE_DEVICES
trap 'if pgrep python; then pkill python; fi;' ERR
python -c $'import torch\na,b=torch.zeros(1,device="cuda:0"),torch.zeros(1,device="cuda:1");\nwhile True:print(a,b)' > /dev/null &
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
python -m pip install -r requirements-dev.txt
PYTHONPATH="$tmp_dir":$PYTHONPATH BUILD_MONAI=1 python ./tests/runner.py -p 'test_((?!integration).)' # unit tests
if pgrep python; then pkill python; fi
cron-docker:
if: github.repository == 'Project-MONAI/MONAI'
container:
image: docker://projectmonai/monai:latest # this might be slow and has the pull count limitations
options: "--gpus all"
runs-on: [self-hosted, linux, x64, integration]
steps:
- name: Run tests report coverage
# The docker image process has done the compilation.
# BUILD_MONAI=1 is necessary for triggering the USE_COMPILED flag.
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
cd /opt/monai
nvidia-smi
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
echo $CUDA_VISIBLE_DEVICES
trap 'if pgrep python; then pkill python; fi;' ERR
python -c $'import torch\na,b=torch.zeros(1,device="cuda:0"),torch.zeros(1,device="cuda:1");\nwhile True:print(a,b)' > /dev/null &
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
python -c 'import torch; print(torch.rand(5,3, device=torch.device("cuda:0")))'
ngc --version
BUILD_MONAI=1 ./runtests.sh --build --coverage --pytype --unittests --disttests # unit tests with pytype checks, coverage report
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
shell: bash
- name: Upload coverage
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false
files: ./coverage.xml
cron-tutorial-notebooks:
if: github.repository == 'Project-MONAI/MONAI'
needs: cron-gpu # so that monai itself is verified first
container:
image: nvcr.io/nvidia/pytorch:24.10-py3 # testing with the latest pytorch base image
options: "--gpus all --ipc=host"
runs-on: [self-hosted, linux, x64, integration]
steps:
- uses: actions/checkout@v6
- name: Install MONAI
id: monai-install
run: |
which python
python -m pip install --upgrade pip wheel
python -m pip install -r requirements-dev.txt
BUILD_MONAI=1 python setup.py develop # install monai
nvidia-smi
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
echo $CUDA_VISIBLE_DEVICES
echo "devices=$CUDA_VISIBLE_DEVICES" >> $GITHUB_OUTPUT
- name: Checkout tutorials and install their requirements
run: |
cd /opt
git clone --depth 1 --branch main --single-branch https://github.com/Project-MONAI/tutorials.git # latest commit of main branch
cd tutorials
python -m pip install -r requirements.txt
- name: Run tutorial notebooks
timeout-minutes: 150
run: |
export CUDA_VISIBLE_DEVICES=${{ steps.monai-install.outputs.devices }}
echo $CUDA_VISIBLE_DEVICES
trap 'if pgrep python; then pkill python; fi;' ERR
python -c $'import torch\na,b=torch.zeros(1,device="cuda:0"),torch.zeros(1,device="cuda:1");\nwhile True:print(a,b)' > /dev/null &
cd /opt/tutorials
python -c 'import monai; monai.config.print_debug_info()'
$(pwd)/runner.sh
python -c 'import monai; monai.config.print_debug_info()'
if pgrep python; then pkill python; fi
shell: bash
================================================
FILE: .github/workflows/docker.yml
================================================
# this is the docker image releasing pipeline, pushing to https://hub.docker.com/r/projectmonai/monai
name: docker
# versioning: compute a static version file
# local_docker: use the version file to build docker images
# docker_test_latest: test the latest internal docker image (has flake)
# docker_test_dockerhub: test the latest dockerhub release (no flake)
on:
# dev only docker deployment and quick tests
push:
branches:
- dev
# Allows you to run this workflow manually from the Actions tab
# This is to trigger building/testing docker image from dev only.
workflow_dispatch:
jobs:
versioning_dev:
# compute versioning file from python setup.py
# upload as artifact
# if: github.repository == 'Project-MONAI/MONAI'
if: ${{ false }} # disable docker build job project-monai/monai#7450
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# full history so that we can git describe
with:
ref: dev
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
- shell: bash
run: |
git describe
python -m pip install -U pip wheel setuptools
python setup.py build
cat build/lib/monai/_version.py
- name: Upload version
uses: actions/upload-artifact@v6
with:
name: _version.py
path: build/lib/monai/_version.py
- name: Clean up directory
shell: bash
run: |
ls -al
rm -rf {*,.[^.]*}
docker_build_dev:
# if: github.repository == 'Project-MONAI/MONAI'
if: ${{ false }} # disable docker build job project-monai/monai#7450
needs: versioning_dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: dev
- name: Download version
uses: actions/download-artifact@v6
with:
name: _version.py
- name: docker_build
shell: bash
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
docker --version
# get tag info for versioning
cat _version.py
mv _version.py monai/
# build "latest": remove flake package as it is not needed on hub.docker.com
sed -i '/flake/d' requirements-dev.txt
docker build -t projectmonai/monai:latest -f Dockerfile .
# distribute as always w/ tag "latest" to hub.docker.com
echo "${{ secrets.DOCKER_PW }}" | docker login -u projectmonai --password-stdin
docker push projectmonai/monai:latest
docker logout
docker image prune -f
docker_test_dockerhub:
# if: github.repository == 'Project-MONAI/MONAI'
if: ${{ false }} # disable self-hosted job project-monai/monai#7039
needs: docker_build_dev
container:
image: docker://projectmonai/monai:latest
options: "--shm-size=4g --ipc=host"
runs-on: [self-hosted, linux, X64, docker]
steps:
- name: Import
run: |
export OMP_NUM_THREADS=4 MKL_NUM_THREADS=4 CUDA_VISIBLE_DEVICES= # cpu-only
python -c 'import monai; monai.config.print_debug_info()'
cd /opt/monai
ls -al
ngc --version
./runtests.sh --min
shell: bash
env:
QUICKTEST: True
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
================================================
FILE: .github/workflows/integration.yml
================================================
# manually trigger integration with the latest pytorch
name: integration
on:
repository_dispatch:
type: [integration-test-command]
jobs:
integration-auto3dseg:
container:
image: nvcr.io/nvidia/pytorch:22.04-py3 # CUDA 11.6 py38
options: --gpus "device=1" --ipc host # shm-size 4g works fine
runs-on: [self-hosted, linux, x64, command]
steps:
# checkout the pull request branch
- uses: actions/checkout@v6
with:
token: ${{ secrets.PR_MAINTAIN }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
- name: cache weekly timestamp
id: pip-cache
run: echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
- name: cache for pip
uses: actions/cache@v5
id: cache
with:
path: |
~/.cache/pip
~/.cache/torch
key: docker-py3-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install the dependencies
run: |
pwd && git log -1 && which python
python -m pip install --upgrade pip wheel
pip uninstall -y monai
pip uninstall -y monai
pip uninstall -y monai-weekly
pip uninstall -y monai-weekly
python -m pip install --upgrade torch torchvision torchaudio torchtext
python -m pip install -r requirements-dev.txt
rm -rf /github/home/.cache/torch/hub/mmars/
- name: Clean directory
run: |
python -m pip list
git config --global --add safe.directory /__w/MONAI/MONAI
git clean -ffdx && git reset --hard HEAD
nvidia-smi
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils -c 1 | tail -n 1)
echo $CUDA_VISIBLE_DEVICES
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
python -c 'import torch; print(torch.rand(5,3, device=torch.device("cuda:0")))'
- name: Auto3dseg tag algo
shell: bash
env:
BUILD_MONAI: 0
run: |
pwd && git log -1 && which python
./runtests.sh -b
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
python -m tests.test_auto3dseg_bundlegen
python -m tests.test_auto3dseg_ensemble
python -m tests.test_auto3dseg_hpo
python -m tests.test_integration_autorunner
python -m tests.test_integration_gpu_customization
- name: Integration tests
shell: bash
env:
BUILD_MONAI: 1
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: ./runtests.sh --build --net
- name: Add reaction
uses: peter-evans/create-or-update-comment@v5
with:
token: ${{ secrets.PR_MAINTAIN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reactions: rocket
integration-unit:
container:
image: nvcr.io/nvidia/pytorch:22.04-py3 # CUDA 11.6 py38
options: --gpus "device=2" --ipc host # shm-size 4g works fine
runs-on: [self-hosted, linux, x64, command1]
steps:
# checkout the pull request branch
- uses: actions/checkout@v6
with:
token: ${{ secrets.PR_MAINTAIN }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
- name: cache weekly timestamp
id: pip-cache
run: echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
- name: cache for pip
uses: actions/cache@v5
id: cache
with:
path: |
~/.cache/pip
~/.cache/torch
key: docker-py3-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install the dependencies
run: |
pwd && git log -1 && which python
python -m pip install --upgrade pip wheel
pip uninstall -y monai
pip uninstall -y monai
pip uninstall -y monai-weekly
pip uninstall -y monai-weekly
python -m pip install --upgrade torch torchvision torchaudio torchtext
python -m pip install -r requirements-dev.txt
rm -rf /github/home/.cache/torch/hub/mmars/
- name: Clean directory
run: |
python -m pip list
git config --global --add safe.directory /__w/MONAI/MONAI
git clean -ffdx && git reset --hard HEAD
nvidia-smi
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils -c 1 | tail -n 1)
echo $CUDA_VISIBLE_DEVICES
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
python -c 'import torch; print(torch.rand(5,3, device=torch.device("cuda:0")))'
- name: Auto3dseg latest algo
shell: bash
env:
BUILD_MONAI: 0
run: |
pwd
cd ../
rm -rf research-contributions
rm -rf algorithm_templates
git clone --depth 1 --branch main --single-branch https://github.com/Project-MONAI/research-contributions.git
ls research-contributions/
cp -r research-contributions/auto3dseg/algorithm_templates MONAI/
cd research-contributions && git log -1 && cd ../MONAI
pwd
ls -ll
export OMP_NUM_THREADS=4
export MKL_NUM_THREADS=4
export MONAI_TESTING_ALGO_TEMPLATE=algorithm_templates
pwd && git log -1 && which python
./runtests.sh -b
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
python -m tests.test_auto3dseg_ensemble
python -m tests.test_auto3dseg_hpo
python -m tests.test_integration_autorunner
python -m tests.test_integration_gpu_customization
- name: Add reaction
uses: peter-evans/create-or-update-comment@v5
with:
token: ${{ secrets.PR_MAINTAIN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reactions: +1
================================================
FILE: .github/workflows/pythonapp-gpu.yml
================================================
# Jenkinsfile.monai-premerge
name: premerge-gpu
on:
# quick tests for pull requests and the releasing branches
push:
branches:
- main
- releasing/*
pull_request:
types: [opened, synchronize, closed]
concurrency:
# automatically cancel the previously triggered workflows when there's a newer version
group: build-gpu-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
GPU-quick-py3: # GPU with full dependencies
# if: ${{ github.repository == 'Project-MONAI/MONAI' && github.event.pull_request.merged != true }}
if: ${{ false }} # disable self-hosted job project-monai/monai#7039
strategy:
matrix:
environment:
- "PT230+CUDA124DOCKER"
- "PT240+CUDA125DOCKER"
- "PT250+CUDA126DOCKER"
include:
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes
- environment: PT230+CUDA124DOCKER
# 24.04: 2.3.0a0+6ddf5cf85e
pytorch: "-h" # we explicitly set pytorch to -h to avoid pip install error
base: "nvcr.io/nvidia/pytorch:24.04-py3"
- environment: PT240+CUDA125DOCKER
# 24.06: 2.4.0a0+f70bd71a48
pytorch: "-h" # we explicitly set pytorch to -h to avoid pip install error
base: "nvcr.io/nvidia/pytorch:24.06-py3"
- environment: PT250+CUDA126DOCKER
# 24.08: 2.5.0a0+872d972e41
pytorch: "-h" # we explicitly set pytorch to -h to avoid pip install error
base: "nvcr.io/nvidia/pytorch:24.08-py3"
container:
image: ${{ matrix.base }}
options: --gpus all --env NVIDIA_DISABLE_REQUIRE=true # workaround for unsatisfied condition: cuda>=11.6
runs-on: [self-hosted, linux, x64, common]
steps:
- uses: actions/checkout@v6
- name: apt install
if: github.event.pull_request.merged != true
run: |
apt-get update
apt-get install -y wget
if [ ${{ matrix.environment }} = "PT230+CUDA124" ]
then
PYVER=3.9 PYSFX=3 DISTUTILS=python3-distutils && \
apt-get update && apt-get install -y --no-install-recommends \
curl \
pkg-config \
python$PYVER \
python$PYVER-dev \
python$PYSFX-pip \
$DISTUTILS \
rsync \
swig \
unzip \
zip \
zlib1g-dev \
libboost-locale-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-thread-dev \
libboost-test-dev \
libgoogle-glog-dev \
libjsoncpp-dev \
cmake \
git && \
rm -rf /var/lib/apt/lists/* && \
export PYTHONIOENCODING=utf-8 LC_ALL=C.UTF-8 && \
rm -f /usr/bin/python && \
rm -f /usr/bin/python`echo $PYVER | cut -c1-1` && \
ln -s /usr/bin/python$PYVER /usr/bin/python && \
ln -s /usr/bin/python$PYVER /usr/bin/python`echo $PYVER | cut -c1-1` &&
curl -O https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
rm get-pip.py;
fi
- name: Install dependencies
if: github.event.pull_request.merged != true
run: |
which python
python -m pip install --upgrade pip wheel
# fixes preinstalled ruamel_yaml error from the docker image
rm -rf $(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/ruamel*
rm -rf $(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/llvmlite* #6377
python -m pip install ${{ matrix.pytorch }}
python -m pip install -r requirements-dev.txt
python -m pip list
- name: Run quick tests (GPU)
if: github.event.pull_request.merged != true
run: |
git clone --depth 1 \
https://github.com/Project-MONAI/MONAI-extra-test-data.git /MONAI-extra-test-data
export MONAI_EXTRA_TEST_DATA="/MONAI-extra-test-data"
nvidia-smi
export LAUNCH_DELAY=$(python -c "import numpy; print(numpy.random.randint(30) * 10)")
echo "Sleep $LAUNCH_DELAY"
sleep $LAUNCH_DELAY
export CUDA_VISIBLE_DEVICES=$(coverage run -m tests.utils | tail -n 1)
echo $CUDA_VISIBLE_DEVICES
trap 'if pgrep python; then pkill python; fi;' ERR
python -c $'import torch\na,b=torch.zeros(1,device="cuda:0"),torch.zeros(1,device="cuda:1");\nwhile True:print(a,b)' > /dev/null &
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))'
python -c "import monai; monai.config.print_config()"
# build for the current self-hosted CI Tesla V100
BUILD_MONAI=1 TORCH_CUDA_ARCH_LIST="7.0" ./runtests.sh --build --disttests
./runtests.sh --quick --unittests
if [ ${{ matrix.environment }} = "PT230+CUDA124" ]; then
# test the clang-format tool downloading once
coverage run -m tests.clang_format_utils
fi
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
shell: bash
- name: Upload coverage
if: ${{ github.head_ref != 'dev' && github.event.pull_request.merged != true }}
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
================================================
FILE: .github/workflows/pythonapp-min.yml
================================================
# Jenkinsfile.monai-premerge
name: premerge-min
on:
# quick tests for pull requests and the releasing branches
push:
branches:
- dev
- main
- releasing/*
pull_request:
head_ref-ignore:
- dev
concurrency:
# automatically cancel the previously triggered workflows when there's a newer version
group: build-min-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# caching of these jobs:
# - docker-py3-pip- (shared)
# - ubuntu py37 pip-
# - os-latest-pip- (shared)
min-dep-os: # min dependencies installed tests for different OS
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
timeout-minutes: 40
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Prepare pip wheel
run: |
which python
python -m pip install --upgrade pip wheel
- name: cache weekly timestamp
id: pip-cache
run: |
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
shell: bash
- name: cache for pip
uses: actions/cache@v5
id: cache
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ matrix.os }}-latest-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install the dependencies
run: |
# min. requirements
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
python -m pip install -r requirements-min.txt
python -m pip list
BUILD_MONAI=0 python setup.py develop # no compile of extensions
shell: bash
- name: Run quick tests (CPU ${{ runner.os }})
run: |
python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
python -c "import monai; monai.config.print_config()"
./runtests.sh --min
shell: bash
env:
QUICKTEST: True
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
min-dep-py3: # min dependencies installed tests for different python
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
timeout-minutes: 40
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Prepare pip wheel
run: |
which python
python -m pip install --user --upgrade pip setuptools wheel
python -m pip install --user more-itertools>=8.0
- name: cache weekly timestamp
id: pip-cache
run: |
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
shell: bash
- name: cache for pip
uses: actions/cache@v5
id: cache
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ubuntu-latest-latest-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install the dependencies
run: |
# min. requirements
python -m pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
python -m pip install -r requirements-min.txt
python -m pip list
BUILD_MONAI=0 python setup.py develop # no compile of extensions
shell: bash
- name: Run quick tests (CPU ${{ runner.os }})
run: |
python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
python -c "import monai; monai.config.print_config()"
./runtests.sh --min
env:
QUICKTEST: True
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
min-dep-pytorch: # min dependencies installed tests for different pytorch
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pytorch-version: ['2.5.1', '2.6.0', '2.7.1', '2.8.0']
timeout-minutes: 40
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Prepare pip wheel
run: |
which python
python -m pip install --user --upgrade pip setuptools wheel
python -m pip install --user more-itertools>=8.0
- name: cache weekly timestamp
id: pip-cache
run: |
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
shell: bash
- name: cache for pip
uses: actions/cache@v5
id: cache
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ubuntu-latest-latest-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install the dependencies
run: |
# min. requirements
python -m pip install torch==${{ matrix.pytorch-version }}
python -m pip install -r requirements-min.txt
python -m pip list
BUILD_MONAI=0 python setup.py develop # no compile of extensions
shell: bash
- name: Run quick tests (pytorch ${{ matrix.pytorch-version }})
run: |
python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
python -c "import monai; monai.config.print_config()"
./runtests.sh --min
env:
QUICKTEST: True
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
================================================
FILE: .github/workflows/pythonapp.yml
================================================
# Jenkinsfile.monai-premerge
name: premerge
on:
# quick tests for pull requests and the releasing branches
push:
branches:
- dev
- main
- releasing/*
pull_request:
head_ref-ignore:
- dev
concurrency:
# automatically cancel the previously triggered workflows when there's a newer version
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# caching of these jobs:
# - docker-py3-pip- (shared)
# - ubuntu py37 pip-
# - os-latest-pip- (shared)
flake8-py3:
runs-on: ubuntu-latest
strategy:
matrix:
opt: ["codeformat", "pytype", "mypy"]
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
cache: 'pip'
- name: Install dependencies
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
python -m pip install --upgrade pip wheel
python -m pip install --no-build-isolation -r requirements-dev.txt
- name: Lint and type check
run: |
# clean up temporary files
$(pwd)/runtests.sh --build --clean
# Github actions have 2 cores, so parallelize pytype
$(pwd)/runtests.sh --build --${{ matrix.opt }} -j 2
quick-py3: # full dependencies installed tests for different OS
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
timeout-minutes: 120
steps:
- if: runner.os == 'windows'
name: Config pagefile (Windows only)
uses: al-cheb/configure-pagefile-action@v1.5
with:
minimum-size: 8GB
maximum-size: 16GB
disk-root: "D:"
- uses: actions/checkout@v6
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
cache: 'pip'
- name: Prepare pip wheel
run: |
which python
python -m pip install --upgrade pip wheel
- if: runner.os == 'windows'
name: Install torch cpu from pytorch.org (Windows only)
run: |
python -m pip install torch==2.5.1 torchvision==0.20.1+cpu --index-url https://download.pytorch.org/whl/cpu
- if: runner.os == 'Linux'
name: Install itk pre-release (Linux only)
run: |
python -m pip install --pre -U itk
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
- name: Install the dependencies
run: |
python -m pip install --user --upgrade pip wheel
python -m pip install torch==2.5.1 torchvision==0.20.1
cat "requirements-dev.txt"
python -m pip install --no-build-isolation -r requirements-dev.txt
python -m pip list
python -m pip install -e . # test no compile installation
shell: bash
- name: Run compiled (${{ runner.os }})
run: |
python -m pip uninstall -y monai
BUILD_MONAI=1 python -m pip install -e . # compile the cpp extensions
shell: bash
- name: Run quick tests (CPU ${{ runner.os }})
run: |
python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
python -c "import monai; monai.config.print_config()"
python -m unittest -v
env:
QUICKTEST: True
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python # https://github.com/Project-MONAI/MONAI/issues/4354
packaging:
runs-on: ubuntu-latest
env:
QUICKTEST: True
shell: bash
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
cache: 'pip'
- name: Install dependencies
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
python -m pip install --user --upgrade pip setuptools wheel twine packaging
# install the latest pytorch for testing
# however, "pip install monai*.tar.gz" will build cpp/cuda with an isolated
# fresh torch installation according to pyproject.toml
python -m pip install torch>=2.5.1 torchvision --extra-index-url https://download.pytorch.org/whl/cpu
- name: Check packages
run: |
pip uninstall monai
pip list | grep -iv monai
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
set -e
# build tar.gz and wheel
python setup.py check -m -s
python setup.py sdist bdist_wheel
python -m twine check dist/*
- run: echo "pwd=$PWD" >> $GITHUB_OUTPUT
id: root
- run: echo "tmp_dir=$(mktemp -d)" >> $GITHUB_OUTPUT
id: mktemp
- name: Move packages
run: |
printf ${{ steps.root.outputs.pwd }}
printf ${{ steps.mktemp.outputs.tmp_dir }}
# move packages to a temp dir
cp dist/monai* "${{ steps.mktemp.outputs.tmp_dir }}"
rm -r build dist monai.egg-info
cd "${{ steps.mktemp.outputs.tmp_dir }}"
ls -al
- name: Install wheel file
working-directory: ${{ steps.mktemp.outputs.tmp_dir }}
run: |
# install from wheel
python -m pip install monai*.whl --extra-index-url https://download.pytorch.org/whl/cpu
python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
python -c 'import monai; print(monai.__file__)'
python -m pip uninstall -y monai
rm monai*.whl
- name: Install source archive
working-directory: ${{ steps.mktemp.outputs.tmp_dir }}
run: |
# install from tar.gz
name=$(ls *.tar.gz | head -n1)
echo $name
python -m pip install $name[all] --extra-index-url https://download.pytorch.org/whl/cpu
python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
python -c 'import monai; print(monai.__file__)'
- name: Quick test
working-directory: ${{ steps.mktemp.outputs.tmp_dir }}
run: |
# run min tests
cp ${{ steps.root.outputs.pwd }}/requirements*.txt .
cp -r ${{ steps.root.outputs.pwd }}/tests .
ls -al
python -m pip install --no-build-isolation -r requirements-dev.txt --extra-index-url https://download.pytorch.org/whl/cpu
python -m unittest -v
env:
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python # https://github.com/Project-MONAI/MONAI/issues/4354
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r docs/requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu
- name: Make html
run: |
cd docs/
make clean
make html 2>&1 | tee tmp_log
if [[ $(grep -c "ERROR:" tmp_log) != 0 ]]; then echo "found errors"; grep "ERROR:" tmp_log; exit 1; fi
sed '/WARNING.*pip/d' tmp_log > tmp_log1; mv tmp_log1 tmp_log # monai#7133
if [[ $(grep -c "WARNING:" tmp_log) != 0 ]]; then echo "found warnings"; grep "WARNING:" tmp_log; exit 1; fi
shell: bash
================================================
FILE: .github/workflows/release.yml
================================================
name: release
# generating and testing package artefacts from the main branch
on:
push:
branches:
- main
tags:
- '*'
jobs:
packaging:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install setuptools
run: |
python -m pip install --user --upgrade setuptools wheel packaging
- name: Build and test source archive and wheel file
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
root_dir=$PWD
echo "$root_dir"
set -e
# build tar.gz and wheel
python setup.py sdist bdist_wheel --build-number $(date +'%Y%m%d%H%M')
tmp_dir=$(mktemp -d)
cp dist/monai* "$tmp_dir"
cd "$tmp_dir"
ls -al
# install from tar.gz
python -m pip install monai*.tar.gz
python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
python -c 'import monai; print(monai.__file__)'
python -m pip uninstall -y monai
rm monai*.tar.gz
# install from wheel
python -m pip install monai*.whl
python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
python -c 'import monai; print(monai.__file__)'
# clean up
cd "$root_dir"
rm -r "$tmp_dir"
rm -rf monai/
ls -al .
- name: Quick test installed
run: |
python -m pip install -r requirements-min.txt
python -m tests.min_tests
env:
QUICKTEST: True
- if: matrix.python-version == '3.9' && startsWith(github.ref, 'refs/tags/')
name: Upload artifacts
uses: actions/upload-artifact@v6
with:
name: dist
path: dist/
- if: matrix.python-version == '3.9' && startsWith(github.ref, 'refs/tags/')
name: Check artifacts
run: |
ls -al dist/
rm dist/monai*.tar.gz
ls -al dist/
# remove publishing to Test PyPI as it is moved to blossom
# - if: matrix.python-version == '3.9' && startsWith(github.ref, 'refs/tags/')
# name: Publish to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.TEST_PYPI }}
# repository-url: https://test.pypi.org/legacy/
versioning:
# compute versioning file from python setup.py
# upload as artifact
if: github.repository == 'Project-MONAI/MONAI'
needs: packaging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# full history so that we can git describe
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
- shell: bash
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
git describe
python -m pip install --user --upgrade setuptools wheel packaging
python setup.py build
cat build/lib/monai/_version.py
- name: Upload version
uses: actions/upload-artifact@v6
with:
name: _version.py
path: build/lib/monai/_version.py
- name: Clean up directory
shell: bash
run: |
ls -al
rm -rf {*,.[^.]*}
release_tag_docker:
# if: github.repository == 'Project-MONAI/MONAI'
if: ${{ false }}
needs: versioning
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Download version
uses: actions/download-artifact@v6
with:
name: _version.py
- name: Set tag
id: versioning
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Check tag
env:
RELEASE_VERSION: ${{ steps.versioning.outputs.tag }}
run: |
echo "$RELEASE_VERSION"
cat _version.py
- if: startsWith(github.ref, 'refs/tags/')
name: build with the tag
env:
RELEASE_VERSION: ${{ steps.versioning.outputs.tag }}
shell: bash
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
# get tag info for versioning
mv _version.py monai/
# version checks
target=" \"version\": \"$RELEASE_VERSION\""
local=`grep "\"version\"" monai/_version.py`
echo "$target"
echo "$local"
if [[ "$local" == "$target" ]]; then
echo "matched version string"
else
echo "unmatched version string, please check the tagging branch."
exit 1
fi
# remove flake package as it is not needed on hub.docker.com
sed -i '/flake/d' requirements-dev.txt
docker build -t projectmonai/monai:"$RELEASE_VERSION" -f Dockerfile .
# distribute with a tag to hub.docker.com
echo "${{ secrets.DOCKER_PW }}" | docker login -u projectmonai --password-stdin
docker push projectmonai/monai:"$RELEASE_VERSION"
docker logout
================================================
FILE: .github/workflows/setupapp.yml
================================================
# Jenkinsfile.monai-postmerge
name: deploy
on:
# full tests for all the important branches
push:
branches:
- main
- releasing/*
- feature/*
- dev
concurrency:
# automatically cancel the previously triggered workflows when there's a newer version
group: deploy-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# caching of these jobs:
# - docker-py3-pip- (shared)
# - ubuntu 37 38 39 310-pip-
# - os-latest-pip (shared)
coverage-py3:
# if: github.repository == 'Project-MONAI/MONAI'
if: ${{ false }} # disable self-hosted job project-monai/monai#7039
container:
image: nvcr.io/nvidia/pytorch:22.04-py3
options: --gpus all
runs-on: [self-hosted, linux, x64, integration]
steps:
- uses: actions/checkout@v6
- name: cache weekly timestamp
id: pip-cache
run: |
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
- name: cache for pip
if: ${{ startsWith(github.ref, 'refs/heads/dev') }}
uses: actions/cache@v5
id: cache
with:
path: |
~/.cache/pip
~/.cache/torch
key: docker-py3-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install the dependencies
run: |
which python
python -m pip install --upgrade pip wheel
python -m pip install --upgrade torch torchvision
python -m pip install -r requirements-dev.txt
- name: Run unit tests report coverage
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
python -m pip list
git config --global --add safe.directory /__w/MONAI/MONAI
git clean -ffdx
df -h
# python -m pip cache info
nvidia-smi
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
echo $CUDA_VISIBLE_DEVICES
trap 'if pgrep python; then pkill python; fi;' ERR
python -c $'import torch\na,b=torch.zeros(1,device="cuda:0"),torch.zeros(1,device="cuda:1");\nwhile True:print(a,b)' > /dev/null &
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))'
BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with coverage report
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
shell: bash
- name: Upload coverage
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false
files: ./coverage.xml
test-py3x:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: cache weekly timestamp
id: pip-cache
run: |
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
- name: cache for pip
uses: actions/cache@v5
id: cache
with:
path: |
~/.cache/pip
~/.cache/torch
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install the dependencies
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
python -m pip install --upgrade pip wheel
python -m pip install -r requirements-dev.txt
- name: Run quick tests CPU ubuntu
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
python -m pip list
python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
BUILD_MONAI=0 ./runtests.sh --build --quick --unittests
BUILD_MONAI=1 ./runtests.sh --build --quick --min
coverage xml --ignore-errors
- name: Upload coverage
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false
files: ./coverage.xml
install: # pip install from github url, the default branch is dev
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: cache weekly timestamp
id: pip-cache
run: |
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
- name: cache for pip
uses: actions/cache@v5
id: cache
with:
path: |
~/.cache/pip
~/.cache/torch
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install the default branch no build (dev branch only)
if: github.ref == 'refs/heads/dev'
run: |
BUILD_MONAI=0 pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI
python -c 'import monai; monai.config.print_config()'
cd $(python -c 'import monai; import os; print(os.path.dirname(monai.__file__))')
ls .
pip uninstall -y monai
- name: Install the default branch with build (dev branch only)
if: github.ref == 'refs/heads/dev'
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
BUILD_MONAI=1 pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI
python -c 'import monai; monai.config.print_config()'
- name: Get the test cases (dev branch only)
if: github.ref == 'refs/heads/dev'
uses: actions/checkout@v6
with:
ref: dev
- name: Quick test installed (dev branch only)
if: github.ref == 'refs/heads/dev'
run: |
cd $GITHUB_WORKSPACE
rm -rf monai/
ls -al .
python -m pip install -r requirements-min.txt
python -m tests.min_tests
env:
QUICKTEST: True
================================================
FILE: .github/workflows/weekly-preview.yml
================================================
name: weekly-preview
on:
schedule:
- cron: "0 2 * * 0" # 02:00 of every Sunday
jobs:
flake8-py3:
runs-on: ubuntu-latest
strategy:
matrix:
opt: ["codeformat", "pytype", "mypy"]
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: cache weekly timestamp
id: pip-cache
run: |
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
- name: cache for pip
uses: actions/cache@v5
id: cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install dependencies
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
python -m pip install --upgrade pip wheel
python -m pip install -r requirements-dev.txt
- name: Lint and type check
run: |
# clean up temporary files
$(pwd)/runtests.sh --build --clean
# Github actions have 2 cores, so parallelize pytype
$(pwd)/runtests.sh --build --${{ matrix.opt }} -j 2
packaging:
if: github.repository == 'Project-MONAI/MONAI'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: dev
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Install setuptools
run: |
python -m pip install --user --upgrade setuptools wheel packaging
- name: Build distribution
run: |
export HEAD_COMMIT_ID=$(git rev-parse HEAD)
sed -i 's/name\ =\ monai$/name\ =\ monai-weekly/g' setup.cfg
echo "__commit_id__ = \"$HEAD_COMMIT_ID\"" >> monai/__init__.py
git diff setup.cfg monai/__init__.py
git config user.name "CI Builder"
git config user.email "monai.contact@gmail.com"
git add setup.cfg monai/__init__.py
git commit -m "Weekly build at $HEAD_COMMIT_ID"
export YEAR_WEEK=$(date +'%y%U')
echo "Year week for tag is ${YEAR_WEEK}"
if ! [[ $YEAR_WEEK =~ ^[0-9]{4}$ ]] ; then echo "Wrong 'year week' format. Should be 4 digits."; exit 1 ; fi
git tag "1.6.dev${YEAR_WEEK}"
git log -1
git tag --list
python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.coverage/
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# temporary unittest artifacts
tests/testing_data/temp_*
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/build/
docs/source/_gen
docs/source/*_properties.csv
_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# pytype cache
.pytype/
# mypy
.mypy_cache/
examples/scd_lvsegs.npz
temp/
.idea/
.dmypy.json
*~
# Remove .pyre temporary config files
.pyre
.pyre_configuration
# temporary editor files that should not be in git
*.orig
*.bak
*.swp
.DS_Store
# temporary testing data MedNIST
tests/testing_data/MedNIST*
tests/testing_data/*Hippocampus*
tests/testing_data/*.tiff
tests/testing_data/schema.json
tests/testing_data/endo.mp4
tests/testing_data/ultrasound.avi
tests/testing_data/train_data_stats.yaml
tests/testing_data/eval_data_stats.yaml
tests/testing_data/train_data_stats_by_case.yaml
tests/testing_data/eval_data_stats_by_case.yaml
tests/testing_data/CT_2D_head_fixed.mha
tests/testing_data/CT_2D_head_moving.mha
tests/testing_data/config_executed.json
tests/testing_data/eval
tests/testing_data/nrrd_example.nrrd
# clang format tool
.clang-format-bin/
# ctags
tags
# VSCode
.vscode/
*.zip
# profiling results
*.prof
runs
*.gz
*.pth
*zarr/*
================================================
FILE: .pre-commit-config.yaml
================================================
default_language_version:
python: python3
ci:
autofix_prs: true
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
autoupdate_schedule: quarterly
# submodules: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-toml
- id: check-case-conflict
- id: check-added-large-files
args: ['--maxkb=1024']
- id: detect-private-key
- id: forbid-new-submodules
- id: pretty-format-json
args: ['--autofix', '--no-sort-keys', '--indent=4']
- id: end-of-file-fixer
- id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.11
hooks:
- id: ruff-check
args: ["--fix"]
exclude: |
(?x)(
^versioneer.py|
^monai/_version.py
)
- repo: https://github.com/hadialqattan/pycln
rev: v2.6.0
hooks:
- id: pycln
args: [--config=pyproject.toml]
================================================
FILE: .readthedocs.yml
================================================
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml
# Optionally build your docs in additional formats such as PDF and ePub
# formats: all
# Optionally set the version of Python and requirements required to build your docs
python:
version: 3
install:
- requirements: docs/requirements.txt
# system_packages: true
build:
image: stable
================================================
FILE: CHANGELOG.md
================================================
# Changelog
All notable changes to MONAI are documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
## [Unreleased]
## [1.5.2] - 2026-01-28
## What's Changed
### Fixed
* Fix Zip Slip vulnerability in NGC private bundle download (#8682)
## [1.5.1] - 2025-09-22
## What's Changed
### Added
* PyTorch 2.7 and 2.8 support (#8429, #8530)
* Create SECURITY.md (#8546)
* Add kwargs in array and functional file (#8508)
* Add .coderabbit.yaml File (#8513)
* Add input validation to ImageStats class (#8501)
* Add support for optional conditioning in PatchInferer, SliceInferer, and SlidingWindowInferer (#8400)
* Add classifier free guidance unconditioned value (#8562)
* Improved `DiffusionModelEncoder` to support output linear layers of different dimensions (#8578, #8580)
### Fixed
* Fix for insecure zip file extraction to address [GHSA-x6ww-pf9m-m73m](https://github.com/Project-MONAI/MONAI/security/advisories/GHSA-x6ww-pf9m-m73m) (#8568)
* Fix for insecure use of `torch.load` and `pickle` to address [GHSA-6vm5-6jv9-rjpj](https://github.com/Project-MONAI/MONAI/security/advisories/GHSA-6vm5-6jv9-rjpj) and [GHSA-p8cm-mm2v-gwjm](https://github.com/Project-MONAI/MONAI/security/advisories/GHSA-p8cm-mm2v-gwjm) (#8566)
* Torchvision fix for loading pretrained weights using current syntax (#8563)
* Fix bug in MAISI vae (#8517)
* Throw exception on invalid images in retinanet detector (#8515)
* Fix: HistogramNormalized doc (#8543)
* Fix build failure by pinning pyamg to versions below 5.3.0 (#8548)
* Fix hardcoded input dim in DiffusionModelEncoder (#8514)
* Fix for gdown downloading fails (#8576)
### Changed
* Update README badges to add research paper citations number (#8494)
* CI: Add custom timeout to ci job in order to save resources (#8504)
* Improve documentation on the datalist format (#8539)
* Tests Cleanup and refactor (#8405, #8535)
* Improve Orientation transform to use the "space" (LPS vs RAS) of a metatensor by default (#8473)
* Updated supported version of Huggingface Transformers (#8574)
## [1.5.0] - 2025-06-13
## What's Changed
### Added
* Add platform-specific constraints to setup.cfg (#8260)
* Add PythonicWorkflow (#8151)
* Add SM architecture version check (#8199)
* Add MedNext implementation (#8004)
* Added a top button to CONSTRIBUTING.md (#8163)
* Adding CODEOWNERS (#8457)
* Restormer Implementation (#8312)
* Add rectified flow noise scheduler for accelerated diffusion model (#8374)
* Add prediction type for rflow scheduler (#8386)
* Add Average Precision to metrics (#8089)
* Implementation of a Masked Autoencoder for representation learning (#8152)
* Implement TorchIO transforms wrapper analogous to TorchVision transfo… (#7579)
* 8328 nnunet bundle integration (#8329)
* Adding Support Policy + Doc Updates (#8458)
* Classifier free guidance (#8460)
### Fixed
* Fix Ruff Numpy2 deprecation rules (#8179)
* Fix `torch.load()` frequently warning in PersistentDataset and GDSDataset (#8177)
* Fix the logging of a nested dictionary metric in MLflow (#8169)
* Fix ImageFilter to allow Gaussian filter without filter_size (#8189)
* Fix fold_constants, test_handler switched to onnx (#8211)
* Fix TypeError in meshgrid (#8252)
* Fix PatchMerging duplicate merging (#8285)
* Fix test load image issue (#8297)
* Fix bundle download error from ngc source (#8307)
* Fix deprecated usage in zarr (#8313, #8477)
* Fix DataFrame subsets indexing in CSVDataset() (#8351)
* Fix `packaging` imports in version comparison logic (#8347)
* Fix CommonKeys docstring (#8342)
* Fix: correctly apply fftshift to real-valued data inputs (#8407)
* Fix OptionalImportError: required package `openslide` is not installed (#8419)
* Fix cosine noise scheduler (#8427)
* Fix AutoencoderKL docstrings. (#8445)
* Inverse Threading Fix (#8418)
* Fix normalize intensity (#8286)
* Fix path at test onnx trt export (#8361)
* Fix broken urls (#8481, #8483)
### Changed
* [DOC] Update README.md (#8157)
* Streamlined Rearrange in SpatialAttentionBlock (#8130)
* Optimize VISTA3D (#8123)
* Skip torch trt convert test with torch newer than or equal to 2.5.0 (#8165)
* Enable redirection of all loggers by configuring a FileHandler within the bundle (#8142)
* Apply pyupgrade fixes for Python 3.9+ syntax (#8150)
* Update base image to 2410 (#8164)
* TRT support for MAISI (#8153)
* 8134 Add unit test for responsive inference (#8146)
* SwinUNETR refactor to accept additional parameters (#8212)
* Allow an arbitrary mask to be used in the self attention (#8235)
* Bump codecov/codecov-action from 4 to 5 (#8245)
* Docs: update brats classes description (#8246)
* Change default value of `patch_norm` to False in `SwinUNETR` (#8249)
* Modify Dice, Jaccard and Tversky losses (#8138)
* Modify Workflow to Allow IterableDataset Inputs (#8263)
* Enhance download_and_extract (#8216)
* Relax gpu load check (#8282, #8275)
* Using LocalStore in Zarr v3 (#8299)
* Enable gpu load nifti (#8188)
* update pydicom reader to enable gpu load (#8283)
* Zarr compression tests only with versions before 3.0 (#8319)
* Changing utils.py to test_utils.py (#8335)
* Refactor testd (#8231)
* Recursive Item Mapping for Nested Lists in Compose (#8187)
* Bump min torch to 1.13.1 to mitigate CVE-2022-45907 unsafe usage of eval (#8296)
* Inferer modification - save_intermediates clashes with latent shape adjustment in latent diffusion inferers (#8343)
* Solves path problem in test_bundle_trt_export.py (#8357)
* Modify ControlNet inferer so that it takes in context when the diffus… (#8360)
* Update monaihosting download method (#8364)
* Bump torch minimum to mitigate CVE-2024-31580 & CVE-2024-31583 and enable numpy 2 compatibility (#8368)
* Auto3DSeg algo_template hash update (#8378)
* Enable Pytorch 2.6 (#8309)
* Auto3DSeg algo_template hash update (#8393, #8397)
* Update Dice Metric Docs (#8388)
* Auto3DSeg algo_template hash update (#8406)
* Update bundle download API (#8403)
* Add Skip test in TestTranschex (#8416)
* Update get latest bundle version function (#8420)
* Temporarily Restrict setuptools Version to 79.0.1 (#8441)
* Update default overlap value in occlusion_sensitivity to 0.6 (#8446)
* Enable code coverage comments on PRs in codecov configuration (#8402)
* Migrate to modern Python Logger API (#8449)
### Deprecated
### Removed
* Remove deprecated functionality for v1.5 (#8430)
* Remove deprecated `return_state_dict ` in bundle `load` (#8454)
* Remove deprecated `net_name` in test file (#8461)
* Remove unused test cases in bundle load (#8463)
* selfattention block: Remove the fc linear layer if it is not used (#8325)
* Removed outdated `torch` version checks from transform functions (#8359)
## [1.4.0] - 2024-10-17
## What's Changed
### Added
* Implemented Conjugate Gradient Solver to generate confidence maps. (#7876)
* Added norm parameter to `ResNet` (#7752, #7805)
* Introduced alpha parameter to `DiceFocalLoss` for improved flexibility (#7841)
* Integrated Tailored ControlNet Implementations (#7875)
* Integrated Tailored Auto-Encoder Model (#7861)
* Integrated Tailored Diffusion U-Net Model (7867)
* Added Maisi morphological functions (#7893)
* Added support for downloading bundles from NGC private registry (#7907, #7929, #8076)
* Integrated generative refactor into the core (#7886, #7962)
* Made `ViT` and `UNETR` models compatible with TorchScript (#7937)
* Implemented post-download checks for MONAI bundles and compatibility warnings (#7938)
* Added NGC prefix argument when downloading bundles (#7974)
* Added flash attention support in the attention block for improved performance (#7977)
* Enhanced `MLPBlock` for compatibility with VISTA-3D (#7995)
* Added support for Neighbor-Aware Calibration Loss (NACL) for calibrated models in segmentation tasks (#7819)
* Added label_smoothing parameter to `DiceCELoss` for enhanced model calibration (#8000)
* Add `include_fc` and `use_combined_linear` argument in the `SABlock` (#7996)
* Added utilities, networks, and an inferer specific to VISTA-3D (#7999, #7987, #8047, #8059, #8021)
* Integrated a new network, `CellSamWrapper`, for cell-based applications (#7981)
* Introduced `WriteFileMapping` transform to map between input image paths and their corresponding output paths (#7769)
* Added `TrtHandler` to accelerate models using TensorRT (#7990, #8064)
* Added box and points conversion transforms for more flexible spatial manipulation (#8053)
* Enhanced `RandSimulateLowResolutiond` transform with deterministic support (#8057)
* Added a contiguous argument to the `Fourier` class to facilitate contiguous tensor outputs (#7969)
* Allowed `ApplyTransformToPointsd` to receive a sequence of reference keys for more versatile point manipulation (#8063)
* Made `MetaTensor` an optional print in `DataStats` and `DataStatsd` for more concise logging (#7814)
#### misc.
* Refactored Dataset to utilize Compose for handling transforms. (#7784)
* Combined `map_classes_to_indices` and `generate_label_classes_crop_centers` into a unified function (#7712)
* Introduced metadata schema directly into the codebase for improved structure and validation (#7409)
* Renamed `optional_packages_version` to `required_packages_version` for clearer package dependency management. (#7253)
* Replaced `pkg_resources` with the more modern packaging module for package handling (#7953)
* Refactored MAISI-related networks to align with the new generative components (#7989, #7993, #8005)
* Added a badge displaying monthly download statistics to enhance project visibility (#7891)
### Fixed
#### transforms
* Ensured deterministic behavior in `MixUp`, `CutMix`, and `CutOut` transforms (#7813)
* Applied a minor correction to `AsDiscrete` transform (#7984)
* Fixed handling of integer weightmaps in `RandomWeightedCrop` (#8097)
* Resolved data type bug in `ScaleIntensityRangePercentile` (#8109)
#### data
* Fixed negative strides issue in the `NrrdReader` (#7809)
* Addressed wsireader issue with retrieving MPP (7921)
* Ensured location is returned as a tuple in wsireader (#8007)
* Corrected interpretation of space directions in nrrd reader (#8091)
#### metrics and losses
* Improved memory management for `NACLLoss` (#8020)
* Fixed reduction logic in `GeneralizedDiceScore` (#7970)
#### networks
* Resolved issue with loading pre-trained weights in `ResNet` (#7924)
* Fixed error where `torch.device` object had no attribute gpu_id during TensorRT export (#8019)
* Corrected function for loading older weights in `DiffusionModelUNet` (#8031)
* Switched to `torch_tensorrt.Device` instead of `torch.device` during TensorRT compilation (#8051)
#### engines and handlers
* Attempted to resolve the "experiment already exists" issue in `MLFlowHandler` (#7916)
* Refactored the model export process for conversion and saving (#7934)
#### misc.
* Adjusted requirements to exclude Numpy version 2.0 (#7859)
* Updated deprecated `scipy.ndimage` namespaces in optional imports (#7847, #7897)
* Resolved `load_module()` deprecation in Python 3.12 (#7881)
* Fixed Ruff type check issues (#7885)
* Cleaned disk space in the conda test pipeline (#7902)
* Replaced deprecated `pkgutil.find_loader` usage (#7906)
* Enhanced docstrings in various modules (#7913, #8055)
* Test cases fixing (#7905, #7794, #7808)
* Fix mypy issue introduced in 1.11.0 (#7941)
* Cleaned up warnings during test collection (#7914)
* Fix incompatible types in assignment issue (#7950)
* Fix outdated link in the docs (#7971)
* Addressed CI issues (#7983, #8013)
* Fix module can not import correctly issue (#8015)
* Fix AttributeError when using torch.min and max (#8041)
* Ensure synchronization by adding `cuda.synchronize` (#8058)
* Ignore warning from nptyping as workaround (#8062)
* Suppress deprecated warning when importing monai (#8067)
* Fix link in test bundle under MONAI-extra-test-data (#8092)
### Changed
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:24.08-py3` from `nvcr.io/nvidia/pytorch:23.08-py3`
* Change blossom-ci to ACL security format (#7843)
* Move PyType test to weekly test (#8025)
* Adjusted to meet Numpy 2.0 requirements (#7857)
### Deprecated
* Dropped support for Python 3.8 (#7909)
* Remove deprecated arguments and class for v1.4 (#8079)
### Removed
* Remove use of deprecated python 3.12 strtobool (#7900)
* Removed the pipeline for publishing to testpypi (#8086)
* Cleaning up some very old and now obsolete infrastructure (#8113, #8118, #8121)
## [1.3.2] - 2024-06-25
### Fixed
#### misc.
* Updated Numpy version constraint to < 2.0 (#7859)
## [1.3.1] - 2024-05-17
### Added
* Support for `by_measure` argument in `RemoveSmallObjects` (#7137)
* Support for `pretrained` flag in `ResNet` (#7095)
* Support for uploading and downloading bundles to and from the Hugging Face Hub (#6454)
* Added weight parameter in DiceLoss to apply weight to voxels of each class (#7158)
* Support for returning dice for each class in `DiceMetric` (#7163)
* Introduced `ComponentStore` for storage purposes (#7159)
* Added utilities used in MONAI Generative (#7134)
* Enabled Python 3.11 support for `convert_to_torchscript` and `convert_to_onnx` (#7182)
* Support for MLflow in `AutoRunner` (#7176)
* `fname_regex` option in PydicomReader (#7181)
* Allowed setting AutoRunner parameters from config (#7175)
* `VoxelMorphUNet` and `VoxelMorph` (#7178)
* Enabled `cache` option in `GridPatchDataset` (#7180)
* Introduced `class_labels` option in `write_metrics_reports` for improved readability (#7249)
* `DiffusionLoss` for image registration task (#7272)
* Supported specifying `filename` in `Saveimage` (#7318)
* Compile support in `SupervisedTrainer` and `SupervisedEvaluator` (#7375)
* `mlflow_experiment_name` support in `Auto3DSeg` (#7442)
* Arm support (#7500)
* `BarlowTwinsLoss` for representation learning (#7530)
* `SURELoss` and `ConjugateGradient` for diffusion models (#7308)
* Support for `CutMix`, `CutOut`, and `MixUp` augmentation techniques (#7198)
* `meta_file` and `logging_file` options to `BundleWorkflow` (#7549)
* `properties_path` option to `BundleWorkflow` for customized properties (#7542)
* Support for both soft and hard clipping in `ClipIntensityPercentiles` (#7535)
* Support for not saving artifacts in `MLFlowHandler` (#7604)
* Support for multi-channel images in `PerceptualLoss` (#7568)
* Added ResNet backbone for `FlexibleUNet` (#7571)
* Introduced `dim_head` option in `SABlock` to set dimensions for each head (#7664)
* Direct links to github source code to docs (#7738, #7779)
#### misc.
* Refactored `list_data_collate` and `collate_meta_tensor` to utilize the latest PyTorch API (#7165)
* Added __str__ method in `Metric` base class (#7487)
* Made enhancements for testing files (#7662, #7670, #7663, #7671, #7672)
* Improved documentation for bundles (#7116)
### Fixed
#### transforms
* Addressed issue where lazy mode was ignored in `SpatialPadd` (#7316)
* Tracked applied operations in `ImageFilter` (#7395)
* Warnings are now given only if missing class is not set to 0 in `generate_label_classes_crop_centers` (#7602)
* Input is now always converted to C-order in `distance_transform_edt` to ensure consistent behavior (#7675)
#### data
* Modified .npz file behavior to use keys in `NumpyReader` (#7148)
* Handled corrupted cached files in `PersistentDataset` (#7244)
* Corrected affine update in `NrrdReader` (#7415)
#### metrics and losses
* Addressed precision issue in `get_confusion_matrix` (#7187)
* Harmonized and clarified documentation and tests for dice losses variants (#7587)
#### networks
* Removed hard-coded `spatial_dims` in `SwinTransformer` (#7302)
* Fixed learnable `position_embeddings` in `PatchEmbeddingBlock` (#7564, #7605)
* Removed `memory_pool_limit` in TRT config (#7647)
* Propagated `kernel_size` to `ConvBlocks` within `AttentionUnet` (#7734)
* Addressed hard-coded activation layer in `ResNet` (#7749)
#### bundle
* Resolved bundle download issue (#7280)
* Updated `bundle_root` directory for `NNIGen` (#7586)
* Checked for `num_fold` and failed early if incorrect (#7634)
* Enhanced logging logic in `ConfigWorkflow` (#7745)
#### misc.
* Enabled chaining in `Auto3DSeg` CLI (#7168)
* Addressed useless error message in `nnUNetV2Runner` (#7217)
* Resolved typing and deprecation issues in Mypy (#7231)
* Quoted `$PY_EXE` variable to handle Python path that contains spaces in Bash (#7268)
* Improved documentation, code examples, and warning messages in various modules (#7234, #7213, #7271, #7326, #7569, #7584)
* Fixed typos in various modules (#7321, #7322, #7458, #7595, #7612)
* Enhanced docstrings in various modules (#7245, #7381, #7746)
* Handled error when data is on CPU in `DataAnalyzer` (#7310)
* Updated version requirements for third-party packages (#7343, #7344, #7384, #7448, #7659, #7704, #7744, #7742, #7780)
* Addressed incorrect slice compute in `ImageStats` (#7374)
* Avoided editing a loop's mutable iterable to address B308 (#7397)
* Fixed issue with `CUDA_VISIBLE_DEVICES` setting being ignored (#7408, #7581)
* Avoided changing Python version in CICD (#7424)
* Renamed partial to callable in instantiate mode (#7413)
* Imported AttributeError for Python 3.12 compatibility (#7482)
* Updated `nnUNetV2Runner` to support nnunetv2 2.2 (#7483)
* Used uint8 instead of int8 in `LabelStats` (#7489)
* Utilized subprocess for nnUNet training (#7576)
* Addressed deprecated warning in ruff (#7625)
* Fixed downloading failure on FIPS machine (#7698)
* Updated `torch_tensorrt` compile parameters to avoid warning (#7714)
* Restrict `Auto3DSeg` fold input based on datalist (#7778)
### Changed
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:24.03-py3` from `nvcr.io/nvidia/pytorch:23.08-py3`
### Removed
* Removed unrecommended star-arg unpacking after a keyword argument, addressed B026 (#7262)
* Skipped old PyTorch version test for `SwinUNETR` (#7266)
* Dropped docker build workflow and migrated to Nvidia Blossom system (#7450)
* Dropped Python 3.8 test on quick-py3 workflow (#7719)
## [1.3.0] - 2023-10-12
### Added
* Intensity transforms `ScaleIntensityFixedMean` and `RandScaleIntensityFixedMean` (#6542)
* `UltrasoundConfidenceMapTransform` used for computing confidence map from an ultrasound image (#6709)
* `channel_wise` support in `RandScaleIntensity` and `RandShiftIntensity` (#6793, #7025)
* `RandSimulateLowResolution` and `RandSimulateLowResolutiond` (#6806)
* `SignalFillEmptyd` (#7011)
* Euclidean distance transform `DistanceTransformEDT` with GPU support (#6981)
* Port loss and metrics from `monai-generative` (#6729, #6836)
* Support `invert_image` and `retain_stats` in `AdjustContrast` and `RandAdjustContrast` (#6542)
* New network `DAF3D` and `Quicknat` (#6306)
* Support `sincos` position embedding (#6986)
* `ZarrAvgMerger` used for patch inference (#6633)
* Dataset tracking support to `MLFlowHandler` (#6616)
* Considering spacing and subvoxel borders in `SurfaceDiceMetric` (#6681)
* CUCIM support for surface-related metrics (#7008)
* `loss_fn` support in `IgniteMetric` and renamed it to `IgniteMetricHandler` (#6695)
* `CallableEventWithFilter` and `Events` options for `trigger_event` in `GarbageCollector` (#6663)
* Support random sorting option to `GridPatch`, `RandGridPatch`, `GridPatchd` and `RandGridPatchd` (#6701)
* Support multi-threaded batch sampling in `PatchInferer` (#6139)
* `SoftclDiceLoss` and `SoftDiceclDiceLoss` (#6763)
* `HausdorffDTLoss` and `LogHausdorffDTLoss` (#6994)
* Documentation for `TensorFloat-32` (#6770)
* Docstring format guide (#6780)
* `GDSDataset` support for GDS (#6778)
* PyTorch backend support for `MapLabelValue` (#6872)
* `filter_func` in `copy_model_state` to filter the weights to be loaded and `filter_swinunetr` (#6917)
* `stats_sender` to `MonaiAlgo` for FL stats (#6984)
* `freeze_layers` to help freeze specific layers (#6970)
#### misc.
* Refactor multi-node running command used in `Auto3DSeg` into dedicated functions (#6623)
* Support str type annotation to `device` in `ToTensorD` (#6737)
* Improve logging message and file name extenstion in `DataAnalyzer` for `Auto3DSeg` (#6758)
* Set `data_range` as a property in `SSIMLoss` (#6788)
* Unify environment variable access (#7084)
* `end_lr` support in `WarmupCosineSchedule` (#6662)
* Add `ClearML` as optional dependency (#6827)
* `yandex.disk` support in `download_url` (#6667)
* Improve config expression error message (#6977)
### Fixed
#### transforms
* Make `convert_box_to_mask` throw errors when box size larger than the image (#6637)
* Fix lazy mode in `RandAffine` (#6774)
* Raise `ValueError` when `map_items` is bool in `Compose` (#6882)
* Improve performance for `NormalizeIntensity` (#6887)
* Fix mismatched shape in `Spacing` (#6912)
* Avoid FutureWarning in `CropForeground` (#6934)
* Fix `Lazy=True` ignored when using `Dataset` call (#6975)
* Shape check for arbitrary types for DataStats (#7082)
#### data
* Fix wrong spacing checking logic in `PydicomReader` and broken link in `ITKReader` (#6660)
* Fix boolean indexing of batched `MetaTensor` (#6781)
* Raise warning when multiprocessing in `DataLoader` (#6830)
* Remove `shuffle` in `DistributedWeightedRandomSampler` (#6886)
* Fix missing `SegmentDescription` in `PydicomReader` (#6937)
* Fix reading dicom series error in `ITKReader` (#6943)
* Fix KeyError in `PydicomReader` (#6946)
* Update `metatensor_to_itk_image` to accept RAS `MetaTensor` and update default 'space' in `NrrdReader` to `SpaceKeys.LPS` (#7000)
* Collate common meta dictionary keys (#7054)
#### metrics and losses
* Fixed bug in `GeneralizedDiceLoss` when `batch=True` (#6775)
* Support for `BCEWithLogitsLoss` in `DiceCELoss` (#6924)
* Support for `weight` in Dice and related losses (#7098)
#### networks
* Use `np.prod` instead of `np.product` (#6639)
* Fix dimension issue in `MBConvBlock` (#6672)
* Fix hard-coded `up_kernel_size` in `ViTAutoEnc` (#6735)
* Remove hard-coded `bias_downsample` in `resnet` (#6848)
* Fix unused `kernel_size` in `ResBlock` (#6999)
* Allow for defining reference grid on non-integer coordinates (#7032)
* Padding option for autoencoder (#7068)
* Lower peak memory usage for SegResNetDS (#7066)
#### bundle
* Set `train_dataset_data` and `dataset_data` to unrequired in BundleProperty (#6607)
* Set `None` to properties that do not have `REF_ID` (#6607)
* Fix `AttributeError` for default value in `get_parsed_content` for `ConfigParser` (#6756)
* Update `monai.bundle.scripts` to support NGC hosting (#6828, #6997)
* Add `MetaProperties` (#6835)
* Add `create_workflow` and update `load` function (#6835)
* Add bundle root directory to Python search directories automatically (#6910)
* Generate properties for bundle docs automatically (#6918)
* Move `download_large_files` from model zoo to core (#6958)
* Bundle syntax `#` as alias of `::` (#6955)
* Fix bundle download naming issue (#6969, #6963)
* Simplify the usage of `ckpt_export` (#6965)
* `update_kwargs` in `monai.bundle.script` for merging multiple configs (#7109)
#### engines and handlers
* Added int options for `iteration_log` and `epoch_log` in `TensorBoardStatsHandler` (#7027)
* Support to run validator at training start (#7108)
#### misc.
* Fix device fallback error in `DataAnalyzer` (#6658)
* Add int check for `current_mode` in `convert_applied_interp_mode` (#6719)
* Consistent type in `convert_to_contiguous` (#6849)
* Label `argmax` in `DataAnalyzer` when retry on CPU (#6852)
* Fix `DataAnalyzer` with `histogram_only=True` (#6874)
* Fix `AttributeError` in `RankFilter` in single GPU environment (#6895)
* Remove the default warning on `TORCH_ALLOW_TF32_CUBLAS_OVERRIDE` and add debug print info (#6909)
* Hide user information in `print_config` (#6913, #6922)
* Optionally pass coordinates to predictor during sliding window (#6795)
* Proper ensembling when trained with a sigmoid in `AutoRunner` (#6588)
* Fixed `test_retinanet` by increasing absolute differences (#6615)
* Add type check to avoid comparing a np.array with a string in `_check_kwargs_are_present` (#6624)
* Fix md5 hashing with FIPS mode (#6635)
* Capture failures from Auto3DSeg related subprocess calls (#6596)
* Code formatting tool for user-specified directory (#7106)
* Various docstring fixes
### Changed
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:23.08-py3` from `nvcr.io/nvidia/pytorch:23.03-py3`
### Deprecated
* `allow_smaller=True`; `allow_smaller=False` will be the new default in `CropForeground` and `generate_spatial_bounding_box` (#6736)
* `dropout_prob` in `VNet` in favor of `dropout_prob_down` and `dropout_prob_up` (#6768)
* `workflow` in `BundleWorkflow` in favor of `workflow_type`(#6768)
* `pos_embed` in `PatchEmbeddingBlock` in favor of `proj_type`(#6986)
* `net_name` and `net_kwargs` in `download` in favor of `model`(#7016)
* `img_size` parameter in SwinUNETR (#7093)
### Removed
* `pad_val`, `stride`, `per_channel` and `upsampler` in `OcclusionSensitivity` (#6642)
* `compute_meaniou` (#7019)
* `AsChannelFirst`, `AddChannel`and `SplitChannel` (#7019)
* `create_multigpu_supervised_trainer` and `create_multigpu_supervised_evaluator` (#7019)
* `runner_id` in `run` (#7019)
* `data_src_cfg_filename` in `AlgoEnsembleBuilder` (#7019)
* `get_validation_stats` in `Evaluator` and `get_train_stats` in `Trainer` (#7019)
* `epoch_interval` and `iteration_interval` in `TensorBoardStatsHandler` (#7019)
* some self-hosted test (#7041)
## [1.2.0] - 2023-06-08
### Added
* Various Auto3DSeg enhancements and integration tests including multi-node multi-GPU optimization, major usability improvements
* TensorRT and ONNX support for `monai.bundle` API and the relevant models
* nnU-Net V2 integration `monai.apps.nnunet`
* Binary and categorical metrics and event handlers using `MetricsReloaded`
* Python module and CLI entry point for bundle workflows in `monai.bundle.workflows` and `monai.fl.client`
* Modular patch inference API including `PatchInferer`, `merger`, and `splitter`
* Initial release of lazy resampling including transforms and MetaTensor implementations
* Bridge for ITK Image object and MetaTensor `monai.data.itk_torch_bridge`
* Sliding window inference memory efficiency optimization including `SlidingWindowInfererAdapt`
* Generic kernel filtering transforms `ImageFiltered` and `RandImageFiltered`
* Trainable bilateral filters and joint bilateral filters
* ClearML stats and image handlers for experiment tracking
#### misc.
* Utility functions to warn API default value changes (#5738)
* Support of dot notation to access content of `ConfigParser` (#5813)
* Softmax version to focal loss (#6544)
* FROC metric for N-dimensional (#6528)
* Extend SurfaceDiceMetric for 3D images (#6549)
* A `track_meta` option for Lambda and derived transforms (#6385)
* CLIP pre-trained text-to-vision embedding (#6282)
* Optional spacing to surface distances calculations (#6144)
* `WSIReader` read by power and mpp (#6244)
* Support GPU tensor for `GridPatch` and `GridPatchDataset` (#6246)
* `SomeOf` transform composer (#6143)
* GridPatch with both count and threshold filtering (#6055)
### Fixed
#### transforms
* `map_classes_to_indices` efficiency issue (#6468)
* Adaptive resampling mode based on backends (#6429)
* Improve Compose encapsulation (#6224)
* User-provided `FolderLayout` in `SaveImage` and `SaveImaged` transforms (#6213)
* `SpacingD` output shape compute stability (#6126)
* No mutate ratio /user inputs `croppad` (#6127)
* A `warn` flag to RandCropByLabelClasses (#6121)
* `nan` to indicate `no_channel`, split dim singleton (#6090)
* Compatible padding mode (#6076)
* Allow for missing `filename_or_obj` key (#5980)
* `Spacing` pixdim in-place change (#5950)
* Add warning in `RandHistogramShift` (#5877)
* Exclude `cuCIM` wrappers from `get_transform_backends` (#5838)
#### data
* `__format__` implementation of MetaTensor (#6523)
* `channel_dim` in `TiffFileWSIReader` and `CuCIMWSIReader` (#6514)
* Prepend `"meta"` to `MetaTensor.__repr__` and `MetaTensor.__str__` for easier identification (#6214)
* MetaTensor slicing issue (#5845)
* Default writer flags (#6147)
* `WSIReader` defaults and tensor conversion (#6058)
* Remove redundant array copy for WSITiffFileReader (#6089)
* Fix unused arg in `SlidingPatchWSIDataset` (#6047)
* `reverse_indexing` for PILReader (#6008)
* Use `np.linalg` for the small affine inverse (#5967)
#### metrics and losses
* Removing L2-norm in contrastive loss (L2-norm already present in CosSim) (#6550)
* Fixes the SSIM metric (#6250)
* Efficiency issues of Dice metrics (#6412)
* Generalized Dice issue (#5929)
* Unify output tensor devices for multiple metrics (#5924)
#### networks
* Make `RetinaNet` throw errors for NaN only when training (#6479)
* Replace deprecated arg in torchvision models (#6401)
* Improves NVFuser import check (#6399)
* Add `device` in `HoVerNetNuclearTypePostProcessing` and `HoVerNetInstanceMapPostProcessing` (#6333)
* Enhance hovernet load pretrained function (#6269)
* Access to the `att_mat` in self-attention modules (#6493)
* Optional swinunetr-v2 (#6203)
* Add transform to handle empty box as training data for `retinanet_detector` (#6170)
* GPU utilization of DiNTS network (#6050)
* A pixelshuffle upsample shape mismatch problem (#5982)
* GEGLU activation function for the MLP Block (#5856)
* Constructors for `DenseNet` derived classes (#5846)
* Flexible interpolation modes in `regunet` (#5807)
#### bundle
* Optimized the `deepcopy` logic in `ConfigParser` (#6464)
* Improve check and error message of bundle run (#6400)
* Warn or raise ValueError on duplicated key in json/yaml config (#6252)
* Default metadata and logging values for bundle run (#6072)
* `pprint` head and tail in bundle script (#5969)
* Config parsing issue for substring reference (#5932)
* Fix instantiate for object instantiation with attribute `path` (#5866)
* Fix `_get_latest_bundle_version` issue on Windows (#5787)
#### engines and handlers
* MLflow handler run bug (#6446)
* `monai.engine` training attribute check (#6132)
* Update StatsHandler logging message (#6051)
* Added callable options for `iteration_log` and `epoch_log` in TensorBoard and MLFlow (#5976)
* `CheckpointSaver` logging error (#6026)
* Callable options for `iteration_log` and `epoch_log` in StatsHandler (#5965)
#### misc.
* Avoid creating cufile.log when `import monai` (#6106)
* `monai._extensions` module compatibility with rocm (#6161)
* Issue of repeated UserWarning: "TypedStorage is deprecated" (#6105)
* Use logging config at module level (#5960)
* Add ITK to the list of optional dependencies (#5858)
* `RankFilter` to skip logging when the rank is not meeting criteria (#6243)
* Various documentation issues
### Changed
* Overall more precise and consistent type annotations
* Optionally depend on PyTorch-Ignite v0.4.11 instead of v0.4.10
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:23.03-py3` from `nvcr.io/nvidia/pytorch:22.10-py3`
### Deprecated
* `resample=True`; `resample=False` will be the new default in `SaveImage`
* `random_size=True`; `random_size=False` will be the new default for the random cropping transforms
* `image_only=False`; `image_only=True` will be the new default in `LoadImage`
* `AddChannel` and `AsChannelFirst` in favor of `EnsureChannelFirst`
### Removed
* Deprecated APIs since v0.9, including WSIReader from `monai.apps`, `NiftiSaver` and `PNGSaver` from `monai.data`
* Support for PyTorch 1.8
* Support for Python 3.7
## [1.1.0] - 2022-12-19
### Added
* Hover-Net based digital pathology workflows including new network, loss, postprocessing, metric, training, and inference modules
* Various enhancements for Auto3dSeg `AutoRunner` including template caching, selection, and a dry-run mode `nni_dry_run`
* Various enhancements for Auto3dSeg algo templates including new state-of-the-art configurations, optimized GPU memory utilization
* New bundle API and configurations to support experiment management including `MLFlowHandler`
* New `bundle.script` API to support model zoo query and download
* `LossMetric` metric to compute loss as cumulative metric measurement
* Transforms and base transform APIs including `RandomizableTrait` and `MedianSmooth`
* `runtime_cache` option for `CacheDataset` and the derived classes to allow for shared caching on the fly
* Flexible name formatter for `SaveImage` transform
* `pending_operations` MetaTensor property and basic APIs for lazy image resampling
* Contrastive sensitivity for SSIM metric
* Extensible backbones for `FlexibleUNet`
* Generalize `SobelGradients` to 3D and any spatial axes
* `warmup_multiplier` option for `WarmupCosineSchedule`
* F beta score metric based on confusion matrix metric
* Support of key overwriting in `Lambdad`
* Basic premerge tests for Python 3.11
* Unit and integration tests for CUDA 11.6, 11.7 and A100 GPU
* `DataAnalyzer` handles minor image-label shape inconsistencies
### Fixed
* Review and enhance previously untyped APIs with additional type annotations and casts
* `switch_endianness` in LoadImage now supports tensor input
* Reduced memory footprint for various Auto3dSeg tests
* Issue of `@` in `monai.bundle.ReferenceResolver`
* Compatibility issue with ITK-Python 5.3 (converting `itkMatrixF44` for default collate)
* Inconsistent of sform and qform when using different backends for `SaveImage`
* `MetaTensor.shape` call now returns a `torch.Size` instead of tuple
* Issue of channel reduction in `GeneralizedDiceLoss`
* Issue of background handling before softmax in `DiceFocalLoss`
* Numerical issue of `LocalNormalizedCrossCorrelationLoss`
* Issue of incompatible view size in `ConfusionMatrixMetric`
* `NetAdapter` compatibility with Torchscript
* Issue of `extract_levels` in `RegUNet`
* Optional `bias_downsample` in `ResNet`
* `dtype` overflow for `ShiftIntensity` transform
* Randomized transforms such as `RandCuCIM` now inherit `RandomizableTrait`
* `fg_indices.size` compatibility issue in `generate_pos_neg_label_crop_centers`
* Issue when inverting `ToTensor`
* Issue of capital letters in filename suffixes check in `LoadImage`
* Minor tensor compatibility issues in `apps.nuclick.transforms`
* Issue of float16 in `verify_net_in_out`
* `std` variable type issue for `RandRicianNoise`
* `DataAnalyzer` accepts `None` as label key and checks empty labels
* `iter_patch_position` now has a smaller memory footprint
* `CumulativeAverage` has been refactored and enhanced to allow for simple tracking of metric running stats.
* Multi-threading issue for `MLFlowHandler`
### Changed
* Printing a MetaTensor now generates a less verbose representation
* `DistributedSampler` raises a ValueError if there are too few devices
* OpenCV and `VideoDataset` modules are loaded lazily to avoid dependency issues
* `device` in `monai.engines.Workflow` supports string values
* `Activations` and `AsDiscrete` take `kwargs` as additional arguments
* `DataAnalyzer` is now more efficient and writes summary stats before detailed all case stats
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:22.10-py3` from `nvcr.io/nvidia/pytorch:22.09-py3`
* Simplified Conda environment file `environment-dev.yml`
* Versioneer dependency upgraded to `0.23` from `0.19`
### Deprecated
* `NibabelReader` input argument `dtype` is deprecated, the reader will use the original dtype of the image
### Removed
* Support for PyTorch 1.7
## [1.0.1] - 2022-10-24
### Fixes
* DiceCELoss for multichannel targets
* Auto3DSeg DataAnalyzer out-of-memory error and other minor issues
* An optional flag issue in the RetinaNet detector
* An issue with output offset for Spacing
* A `LoadImage` issue when `track_meta` is `False`
* 1D data output error in `VarAutoEncoder`
* An issue with resolution computing in `ImageStats`
### Added
* Flexible min/max pixdim options for Spacing
* Upsample mode `deconvgroup` and optional kernel sizes
* Docstrings for gradient-based saliency maps
* Occlusion sensitivity to use sliding window inference
* Enhanced Gaussian window and device assignments for sliding window inference
* Multi-GPU support for MonaiAlgo
* `ClientAlgoStats` and `MonaiAlgoStats` for federated summary statistics
* MetaTensor support for `OneOf`
* Add a file check for bundle logging config
* Additional content and an authentication token option for bundle info API
* An anti-aliasing option for `Resized`
* `SlidingWindowInferer` adaptive device based on `cpu_thresh`
* `SegResNetDS` with deep supervision and non-isotropic kernel support
* Premerge tests for Python 3.10
### Changed
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:22.09-py3` from `nvcr.io/nvidia/pytorch:22.08-py3`
* Replace `None` type metadata content with `"none"` for `collate_fn` compatibility
* HoVerNet Mode and Branch to independent StrEnum
* Automatically infer device from the first item in random elastic deformation dict
* Add channel dim in `ComputeHoVerMaps` and `ComputeHoVerMapsd`
* Remove batch dim in `SobelGradients` and `SobelGradientsd`
### Deprecated
* Deprecating `compute_meandice`, `compute_meaniou` in `monai.metrics`, in favor of
`compute_dice` and `compute_iou` respectively
## [1.0.0] - 2022-09-16
### Added
* `monai.auto3dseg` base APIs and `monai.apps.auto3dseg` components for automated machine learning (AutoML) workflow
* `monai.fl` module with base APIs and `MonaiAlgo` for federated learning client workflow
* An initial backwards compatibility [guide](https://github.com/Project-MONAI/MONAI/blob/dev/CONTRIBUTING.md#backwards-compatibility)
* Initial release of accelerated MRI reconstruction components, including `CoilSensitivityModel`
* Support of `MetaTensor` and new metadata attributes for various digital pathology components
* Various `monai.bundle` enhancements for MONAI model-zoo usability, including config debug mode and `get_all_bundles_list`
* new `monai.transforms` components including `SignalContinuousWavelet` for 1D signal, `ComputeHoVerMaps` for digital pathology, and `SobelGradients` for spatial gradients
* `VarianceMetric` and `LabelQualityScore` metrics for active learning
* Dataset API for real-time stream and videos
* Several networks and building blocks including `FlexibleUNet` and `HoVerNet`
* `MeanIoUHandler` and `LogfileHandler` workflow event handlers
* `WSIReader` with the TiffFile backend
* Multi-threading in `WSIReader` with cuCIM backend
* `get_stats` API in `monai.engines.Workflow`
* `prune_meta_pattern` in `monai.transforms.LoadImage`
* `max_interactions` for deepedit interaction workflow
* Various profiling utilities in `monai.utils.profiling`
### Changed
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:22.08-py3` from `nvcr.io/nvidia/pytorch:22.06-py3`
* Optionally depend on PyTorch-Ignite v0.4.10 instead of v0.4.9
* The cache-based dataset now matches the transform information when read/write the cache
* `monai.losses.ContrastiveLoss` now infers `batch_size` during `forward()`
* Rearrange the spatial axes in `RandSmoothDeform` transforms following PyTorch's convention
* Unified several environment flags into `monai.utils.misc.MONAIEnvVars`
* Simplified `__str__` implementation of `MetaTensor` instead of relying on the `__repr__` implementation
### Fixed
* Improved error messages when both `monai` and `monai-weekly` are pip-installed
* Inconsistent pseudo number sequences for different `num_workers` in `DataLoader`
* Issue of repeated sequences for `monai.data.ShuffleBuffer`
* Issue of not preserving the physical extent in `monai.transforms.Spacing`
* Issue of using `inception_v3` as the backbone of `monai.networks.nets.TorchVisionFCModel`
* Index device issue for `monai.transforms.Crop`
* Efficiency issue when converting the array dtype and contiguous memory
### Deprecated
* `Addchannel` and `AsChannelFirst` transforms in favor of `EnsureChannelFirst`
* `monai.apps.pathology.data` components in favor of the corresponding components from `monai.data`
* `monai.apps.pathology.handlers` in favor of the corresponding components from `monai.handlers`
### Removed
* `Status` section in the pull request template in favor of the pull request draft mode
* `monai.engines.BaseWorkflow`
* `ndim` and `dimensions` arguments in favor of `spatial_dims`
* `n_classes`, `num_classes` arguments in `AsDiscrete` in favor of `to_onehot`
* `logit_thresh`, `threshold_values` arguments in `AsDiscrete` in favor of `threshold`
* `torch.testing.assert_allclose` in favor of `tests.utils.assert_allclose`
## [0.9.1] - 2022-07-22
### Added
* Support of `monai.data.MetaTensor` as core data structure across the modules
* Support of `inverse` in array-based transforms
* `monai.apps.TciaDataset` APIs for The Cancer Imaging Archive (TCIA) datasets, including a pydicom-backend reader
* Initial release of components for MRI reconstruction in `monai.apps.reconstruction`, including various FFT utilities
* New metrics and losses, including mean IoU and structural similarity index
* `monai.utils.StrEnum` class to simplify Enum-based type annotations
### Changed
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:22.06-py3` from `nvcr.io/nvidia/pytorch:22.04-py3`
* Optionally depend on PyTorch-Ignite v0.4.9 instead of v0.4.8
### Fixed
* Fixed issue of not skipping post activations in `Convolution` when input arguments are None
* Fixed issue of ignoring dropout arguments in `DynUNet`
* Fixed issue of hard-coded non-linear function in ViT classification head
* Fixed issue of in-memory config overriding with `monai.bundle.ConfigParser.update`
* 2D SwinUNETR incompatible shapes
* Fixed issue with `monai.bundle.verify_metadata` not raising exceptions
* Fixed issue with `monai.transforms.GridPatch` returns inconsistent type location when padding
* Wrong generalized Dice score metric when denominator is 0 but prediction is non-empty
* Docker image build error due to NGC CLI upgrade
* Optional default value when parsing id unavailable in a ConfigParser instance
* Immutable data input for the patch-based WSI datasets
### Deprecated
* `*_transforms` and `*_meta_dict` fields in dictionary-based transforms in favor of MetaTensor
* `meta_keys`, `meta_key_postfix`, `src_affine` arguments in various transforms, in favor of MetaTensor
* `AsChannelFirst` and `AddChannel`, in favor of `EnsureChannelFirst` transform
## [0.9.0] - 2022-06-08
### Added
* `monai.bundle` primary module with a `ConfigParser` and command-line interfaces for configuration-based workflows
* Initial release of MONAI bundle specification
* Initial release of volumetric image detection modules including bounding boxes handling, RetinaNet-based architectures
* API preview `monai.data.MetaTensor`
* Unified `monai.data.image_writer` to support flexible IO backends including an ITK writer
* Various new network blocks and architectures including `SwinUNETR`
* DeepEdit interactive training/validation workflow
* NuClick interactive segmentation transforms
* Patch-based readers and datasets for whole-slide imaging
* New losses and metrics including `SurfaceDiceMetric`, `GeneralizedDiceFocalLoss`
* New pre-processing transforms including `RandIntensityRemap`, `SpatialResample`
* Multi-output and slice-based inference for `SlidingWindowInferer`
* `NrrdReader` for NRRD file support
* Torchscript utilities to save models with meta information
* Gradient-based visualization module `SmoothGrad`
* Automatic regular source code scanning for common vulnerabilities and coding errors
### Changed
* Simplified `TestTimeAugmentation` using de-collate and invertible transforms APIs
* Refactoring `monai.apps.pathology` modules into `monai.handlers` and `monai.transforms`
* Flexible activation and normalization layers for `TopologySearch` and `DiNTS`
* Anisotropic first layers for 3D resnet
* Flexible ordering of activation, normalization in `UNet`
* Enhanced performance of connected-components analysis using Cupy
* `INSTANCE_NVFUSER` for enhanced performance in 3D instance norm
* Support of string representation of dtype in `convert_data_type`
* Added new options `iteration_log`, `iteration_log` to the logging handlers
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:22.04-py3` from `nvcr.io/nvidia/pytorch:21.10-py3`
* `collate_fn` generates more data-related debugging info with `dev_collate`
### Fixed
* Unified the spellings of "meta data", "metadata", "meta-data" to "metadata"
* Various inaccurate error messages when input data are in invalid shapes
* Issue of computing symmetric distances in `compute_average_surface_distance`
* Unnecessary layer `self.conv3` in `UnetResBlock`
* Issue of torchscript compatibility for `ViT` and self-attention blocks
* Issue of hidden layers in `UNETR`
* `allow_smaller` in spatial cropping transforms
* Antialiasing in `Resize`
* Issue of bending energy loss value at different resolutions
* `kwargs_read_csv` in `CSVDataset`
* In-place modification in `Metric` reduction
* `wrap_array` for `ensure_tuple`
* Contribution guide for introducing new third-party dependencies
### Removed
* Deprecated `nifti_writer`, `png_writer` in favor of `monai.data.image_writer`
* Support for PyTorch 1.6
## [0.8.1] - 2022-02-16
### Added
* Support of `matshow3d` with given `channel_dim`
* Support of spatial 2D for `ViTAutoEnc`
* Support of `dataframe` object input in `CSVDataset`
* Support of tensor backend for `Orientation`
* Support of configurable delimiter for CSV writers
* A base workflow API
* `DataFunc` API for dataset-level preprocessing
* `write_scalar` API for logging with additional `engine` parameter in `TensorBoardHandler`
* Enhancements for NVTX Range transform logging
* Enhancements for `set_determinism`
* Performance enhancements in the cache-based datasets
* Configurable metadata keys for `monai.data.DatasetSummary`
* Flexible `kwargs` for `WSIReader`
* Logging for the learning rate schedule handler
* `GridPatchDataset` as subclass of `monai.data.IterableDataset`
* `is_onehot` option in `KeepLargestConnectedComponent`
* `channel_dim` in the image readers and support of stacking images with channels
* Skipping workflow `run` if epoch length is 0
* Enhanced `CacheDataset` to avoid duplicated cache items
* `save_state` utility function
### Changed
* Optionally depend on PyTorch-Ignite v0.4.8 instead of v0.4.6
* `monai.apps.mmars.load_from_mmar` defaults to the latest version
### Fixed
* Issue when caching large items with `pickle`
* Issue of hard-coded activation functions in `ResBlock`
* Issue of `create_file_name` assuming local disk file creation
* Issue of `WSIReader` when the backend is `TiffFile`
* Issue of `deprecated_args` when the function signature contains kwargs
* Issue of `channel_wise` computations for the intensity-based transforms
* Issue of inverting `OneOf`
* Issue of removing temporary caching file for the persistent dataset
* Error messages when reader backend is not available
* Output type casting issue in `ScaleIntensityRangePercentiles`
* Various docstring typos and broken URLs
* `mode` in the evaluator engine
* Ordering of `Orientation` and `Spacing` in `monai.apps.deepgrow.dataset`
### Removed
* Additional deep supervision modules in `DynUnet`
* Deprecated `reduction` argument for `ContrastiveLoss`
* Decollate warning in `Workflow`
* Unique label exception in `ROCAUCMetric`
* Logger configuration logic in the event handlers
## [0.8.0] - 2021-11-25
### Added
* Overview of [new features in v0.8](docs/source/whatsnew_0_8.md)
* Network modules for differentiable neural network topology search (DiNTS)
* Multiple Instance Learning transforms and models for digital pathology WSI analysis
* Vision transformers for self-supervised representation learning
* Contrastive loss for self-supervised learning
* Finalized major improvements of 200+ components in `monai.transforms` to support input and backend in PyTorch and NumPy
* Initial registration module benchmarking with `GlobalMutualInformationLoss` as an example
* `monai.transforms` documentation with visual examples and the utility functions
* Event handler for `MLfLow` integration
* Enhanced data visualization functions including `blend_images` and `matshow3d`
* `RandGridDistortion` and `SmoothField` in `monai.transforms`
* Support of randomized shuffle buffer in iterable datasets
* Performance review and enhancements for data type casting
* Cumulative averaging API with distributed environment support
* Module utility functions including `require_pkg` and `pytorch_after`
* Various usability enhancements such as `allow_smaller` when sampling ROI and `wrap_sequence` when casting object types
* `tifffile` support in `WSIReader`
* Regression tests for the fast training workflows
* Various tutorials and demos including educational contents at [MONAI Bootcamp 2021](https://github.com/Project-MONAI/MONAIBootcamp2021)
### Changed
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:21.10-py3` from `nvcr.io/nvidia/pytorch:21.08-py3`
* Decoupled `TraceKeys` and `TraceableTransform` APIs from `InvertibleTransform`
* Skipping affine-based resampling when `resample=False` in `NiftiSaver`
* Deprecated `threshold_values: bool` and `num_classes: int` in `AsDiscrete`
* Enhanced `apply_filter` for spatially 1D, 2D and 3D inputs with non-separable kernels
* Logging with `logging` in downloading and model archives in `monai.apps`
* API documentation site now defaults to `stable` instead of `latest`
* `skip-magic-trailing-comma` in coding style enforcements
* Pre-merge CI pipelines now include unit tests with Nvidia Ampere architecture
### Removed
* Support for PyTorch 1.5
* The deprecated `DynUnetV1` and the related network blocks
* GitHub self-hosted CI/CD pipelines for package releases
### Fixed
* Support of path-like objects as file path inputs in most modules
* Issue of `decollate_batch` for dictionary of empty lists
* Typos in documentation and code examples in various modules
* Issue of no available keys when `allow_missing_keys=True` for the `MapTransform`
* Issue of redundant computation when normalization factors are 0.0 and 1.0 in `ScaleIntensity`
* Incorrect reports of registered readers in `ImageReader`
* Wrong numbering of iterations in `StatsHandler`
* Naming conflicts in network modules and aliases
* Incorrect output shape when `reduction="none"` in `FocalLoss`
* Various usability issues reported by users
## [0.7.0] - 2021-09-24
### Added
* Overview of [new features in v0.7](docs/source/whatsnew_0_7.md)
* Initial phase of major usability improvements in `monai.transforms` to support input and backend in PyTorch and NumPy
* Performance enhancements, with [profiling and tuning guides](https://github.com/Project-MONAI/tutorials/blob/master/acceleration/fast_model_training_guide.md) for typical use cases
* Reproducing [training modules and workflows](https://github.com/Project-MONAI/tutorials/tree/master/kaggle/RANZCR/4th_place_solution) of state-of-the-art Kaggle competition solutions
* 24 new transforms, including
* `OneOf` meta transform
* DeepEdit guidance signal transforms for interactive segmentation
* Transforms for self-supervised pre-training
* Integration of [NVIDIA Tools Extension](https://developer.nvidia.com/blog/nvidia-tools-extension-api-nvtx-annotation-tool-for-profiling-code-in-python-and-c-c/) (NVTX)
* Integration of [cuCIM](https://github.com/rapidsai/cucim)
* Stain normalization and contextual grid for digital pathology
* `Transchex` network for vision-language transformers for chest X-ray analysis
* `DatasetSummary` utility in `monai.data`
* `WarmupCosineSchedule`
* Deprecation warnings and documentation support for better backwards compatibility
* Padding with additional `kwargs` and different backend API
* Additional options such as `dropout` and `norm` in various networks and their submodules
### Changed
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:21.08-py3` from `nvcr.io/nvidia/pytorch:21.06-py3`
* Deprecated input argument `n_classes`, in favor of `num_classes`
* Deprecated input argument `dimensions` and `ndims`, in favor of `spatial_dims`
* Updated the Sphinx-based documentation theme for better readability
* `NdarrayTensor` type is replaced by `NdarrayOrTensor` for simpler annotations
* Self-attention-based network blocks now support both 2D and 3D inputs
### Removed
* The deprecated `TransformInverter`, in favor of `monai.transforms.InvertD`
* GitHub self-hosted CI/CD pipelines for nightly and post-merge tests
* `monai.handlers.utils.evenly_divisible_all_gather`
* `monai.handlers.utils.string_list_all_gather`
### Fixed
* A Multi-thread cache writing issue in `LMDBDataset`
* Output shape convention inconsistencies of the image readers
* Output directory and file name flexibility issue for `NiftiSaver`, `PNGSaver`
* Requirement of the `label` field in test-time augmentation
* Input argument flexibility issues for `ThreadDataLoader`
* Decoupled `Dice` and `CrossEntropy` intermediate results in `DiceCELoss`
* Improved documentation, code examples, and warning messages in various modules
* Various usability issues reported by users
## [0.6.0] - 2021-07-08
### Added
* 10 new transforms, a masked loss wrapper, and a `NetAdapter` for transfer learning
* APIs to load networks and pre-trained weights from Clara Train [Medical Model ARchives (MMARs)](https://docs.nvidia.com/clara/clara-train-sdk/pt/mmar.html)
* Base metric and cumulative metric APIs, 4 new regression metrics
* Initial CSV dataset support
* Decollating mini-batch as the default first postprocessing step, [Migrating your v0.5 code to v0.6](https://github.com/Project-MONAI/MONAI/wiki/v0.5-to-v0.6-migration-guide) wiki shows how to adapt to the breaking changes
* Initial backward compatibility support via `monai.utils.deprecated`
* Attention-based vision modules and `UNETR` for segmentation
* Generic module loaders and Gaussian mixture models using the PyTorch JIT compilation
* Inverse of image patch sampling transforms
* Network block utilities `get_[norm, act, dropout, pool]_layer`
* `unpack_items` mode for `apply_transform` and `Compose`
* New event `INNER_ITERATION_STARTED` in the deepgrow interactive workflow
* `set_data` API for cache-based datasets to dynamically update the dataset content
* Fully compatible with PyTorch 1.9
* `--disttests` and `--min` options for `runtests.sh`
* Initial support of pre-merge tests with Nvidia Blossom system
### Changed
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:21.06-py3` from
`nvcr.io/nvidia/pytorch:21.04-py3`
* Optionally depend on PyTorch-Ignite v0.4.5 instead of v0.4.4
* Unified the demo, tutorial, testing data to the project shared drive, and
[`Project-MONAI/MONAI-extra-test-data`](https://github.com/Project-MONAI/MONAI-extra-test-data)
* Unified the terms: `post_transform` is renamed to `postprocessing`, `pre_transform` is renamed to `preprocessing`
* Unified the postprocessing transforms and event handlers to accept the "channel-first" data format
* `evenly_divisible_all_gather` and `string_list_all_gather` moved to `monai.utils.dist`
### Removed
* Support of 'batched' input for postprocessing transforms and event handlers
* `TorchVisionFullyConvModel`
* `set_visible_devices` utility function
* `SegmentationSaver` and `TransformsInverter` handlers
### Fixed
* Issue of handling big-endian image headers
* Multi-thread issue for non-random transforms in the cache-based datasets
* Persistent dataset issue when multiple processes sharing a non-exist cache location
* Typing issue with Numpy 1.21.0
* Loading checkpoint with both `model` and `optmizier` using `CheckpointLoader` when `strict_shape=False`
* `SplitChannel` has different behaviour depending on numpy/torch inputs
* Transform pickling issue caused by the Lambda functions
* Issue of filtering by name in `generate_param_groups`
* Inconsistencies in the return value types of `class_activation_maps`
* Various docstring typos
* Various usability enhancements in `monai.transforms`
## [0.5.3] - 2021-05-28
### Changed
* Project default branch renamed to `dev` from `master`
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:21.04-py3` from `nvcr.io/nvidia/pytorch:21.02-py3`
* Enhanced type checks for the `iteration_metric` handler
* Enhanced `PersistentDataset` to use `tempfile` during caching computation
* Enhanced various info/error messages
* Enhanced performance of `RandAffine`
* Enhanced performance of `SmartCacheDataset`
* Optionally requires `cucim` when the platform is `Linux`
* Default `device` of `TestTimeAugmentation` changed to `cpu`
### Fixed
* Download utilities now provide better default parameters
* Duplicated `key_transforms` in the patch-based transforms
* A multi-GPU issue in `ClassificationSaver`
* A default `meta_data` issue in `SpacingD`
* Dataset caching issue with the persistent data loader workers
* A memory issue in `permutohedral_cuda`
* Dictionary key issue in `CopyItemsd`
* `box_start` and `box_end` parameters for deepgrow `SpatialCropForegroundd`
* Tissue mask array transpose issue in `MaskedInferenceWSIDataset`
* Various type hint errors
* Various docstring typos
### Added
* Support of `to_tensor` and `device` arguments for `TransformInverter`
* Slicing options with SpatialCrop
* Class name alias for the networks for backward compatibility
* `k_divisible` option for CropForeground
* `map_items` option for `Compose`
* Warnings of `inf` and `nan` for surface distance computation
* A `print_log` flag to the image savers
* Basic testing pipelines for Python 3.9
## [0.5.0] - 2021-04-09
### Added
* Overview document for [feature highlights in v0.5.0](https://github.com/Project-MONAI/MONAI/blob/master/docs/source/highlights.md)
* Invertible spatial transforms
* `InvertibleTransform` base APIs
* Batch inverse and decollating APIs
* Inverse of `Compose`
* Batch inverse event handling
* Test-time augmentation as an application
* Initial support of learning-based image registration:
* Bending energy, LNCC, and global mutual information loss
* Fully convolutional architectures
* Dense displacement field, dense velocity field computation
* Warping with high-order interpolation with C++/CUDA implementations
* Deepgrow modules for interactive segmentation:
* Workflows with simulations of clicks
* Distance-based transforms for guidance signals
* Digital pathology support:
* Efficient whole slide imaging IO and sampling with Nvidia cuCIM and SmartCache
* FROC measurements for lesion
* Probabilistic post-processing for lesion detection
* TorchVision classification model adaptor for fully convolutional analysis
* 12 new transforms, grid patch dataset, `ThreadDataLoader`, EfficientNets B0-B7
* 4 iteration events for the engine for finer control of workflows
* New C++/CUDA extensions:
* Conditional random field
* Fast bilateral filtering using the permutohedral lattice
* Metrics summary reporting and saving APIs
* DiceCELoss, DiceFocalLoss, a multi-scale wrapper for segmentation loss computation
* Data loading utilities:
* `decollate_batch`
* `PadListDataCollate` with inverse support
* Support of slicing syntax for `Dataset`
* Initial Torchscript support for the loss modules
* Learning rate finder
* Allow for missing keys in the dictionary-based transforms
* Support of checkpoint loading for transfer learning
* Various summary and plotting utilities for Jupyter notebooks
* Contributor Covenant Code of Conduct
* Major CI/CD enhancements covering the tutorial repository
* Fully compatible with PyTorch 1.8
* Initial nightly CI/CD pipelines using Nvidia Blossom Infrastructure
### Changed
* Enhanced `list_data_collate` error handling
* Unified iteration metric APIs
* `densenet*` extensions are renamed to `DenseNet*`
* `se_res*` network extensions are renamed to `SERes*`
* Transform base APIs are rearranged into `compose`, `inverse`, and `transform`
* `_do_transform` flag for the random augmentations is unified via `RandomizableTransform`
* Decoupled post-processing steps, e.g. `softmax`, `to_onehot_y`, from the metrics computations
* Moved the distributed samplers to `monai.data.samplers` from `monai.data.utils`
* Engine's data loaders now accept generic iterables as input
* Workflows now accept additional custom events and state properties
* Various type hints according to Numpy 1.20
* Refactored testing utility `runtests.sh` to have `--unittest` and `--net` (integration tests) options
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:21.02-py3` from `nvcr.io/nvidia/pytorch:20.10-py3`
* Docker images are now built with self-hosted environments
* Primary contact email updated to `monai.contact@gmail.com`
* Now using GitHub Discussions as the primary communication forum
### Removed
* Compatibility tests for PyTorch 1.5.x
* Format specific loaders, e.g. `LoadNifti`, `NiftiDataset`
* Assert statements from non-test files
* `from module import *` statements, addressed flake8 F403
### Fixed
* Uses American English spelling for code, as per PyTorch
* Code coverage now takes multiprocessing runs into account
* SmartCache with initial shuffling
* `ConvertToMultiChannelBasedOnBratsClasses` now supports channel-first inputs
* Checkpoint handler to save with non-root permissions
* Fixed an issue for exiting the distributed unit tests
* Unified `DynUNet` to have single tensor output w/o deep supervision
* `SegmentationSaver` now supports user-specified data types and a `squeeze_end_dims` flag
* Fixed `*Saver` event handlers output filenames with a `data_root_dir` option
* Load image functions now ensure little-endian
* Fixed the test runner to support regex-based test case matching
* Usability issues in the event handlers
## [0.4.0] - 2020-12-15
### Added
* Overview document for [feature highlights in v0.4.0](https://github.com/Project-MONAI/MONAI/blob/master/docs/source/highlights.md)
* Torchscript support for the net modules
* New networks and layers:
* Discrete Gaussian kernels
* Hilbert transform and envelope detection
* Swish and mish activation
* Acti-norm-dropout block
* Upsampling layer
* Autoencoder, Variational autoencoder
* FCNet
* Support of initialisation from pretrained weights for densenet, senet, multichannel AHNet
* Layer-wise learning rate API
* New model metrics and event handlers based on occlusion sensitivity, confusion matrix, surface distance
* CAM/GradCAM/GradCAM++
* File format-agnostic image loader APIs with Nibabel, ITK readers
* Enhancements for dataset partition, cross-validation APIs
* New data APIs:
* LMDB-based caching dataset
* Cache-N-transforms dataset
* Iterable dataset
* Patch dataset
* Weekly PyPI release
* Fully compatible with PyTorch 1.7
* CI/CD enhancements:
* Skipping, speed up, fail fast, timed, quick tests
* Distributed training tests
* Performance profiling utilities
* New tutorials and demos:
* Autoencoder, VAE tutorial
* Cross-validation demo
* Model interpretability tutorial
* COVID-19 Lung CT segmentation challenge open-source baseline
* Threadbuffer demo
* Dataset partitioning tutorial
* Layer-wise learning rate demo
* [MONAI Bootcamp 2020](https://github.com/Project-MONAI/MONAIBootcamp2020)
### Changed
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:20.10-py3` from `nvcr.io/nvidia/pytorch:20.08-py3`
#### Backwards Incompatible Changes
* `monai.apps.CVDecathlonDataset` is extended to a generic `monai.apps.CrossValidation` with an `dataset_cls` option
* Cache dataset now requires a `monai.transforms.Compose` instance as the transform argument
* Model checkpoint file name extensions changed from `.pth` to `.pt`
* Readers' `get_spatial_shape` returns a numpy array instead of list
* Decoupled postprocessing steps such as `sigmoid`, `to_onehot_y`, `mutually_exclusive`, `logit_thresh` from metrics and event handlers,
the postprocessing steps should be used before calling the metrics methods
* `ConfusionMatrixMetric` and `DiceMetric` computation now returns an additional `not_nans` flag to indicate valid results
* `UpSample` optional `mode` now supports `"deconv"`, `"nontrainable"`, `"pixelshuffle"`; `interp_mode` is only used when `mode` is `"nontrainable"`
* `SegResNet` optional `upsample_mode` now supports `"deconv"`, `"nontrainable"`, `"pixelshuffle"`
* `monai.transforms.Compose` class inherits `monai.transforms.Transform`
* In `Rotate`, `Rotated`, `RandRotate`, `RandRotated` transforms, the `angle` related parameters are interpreted as angles in radians instead of degrees.
* `SplitChannel` and `SplitChanneld` moved from `transforms.post` to `transforms.utility`
### Removed
* Support of PyTorch 1.4
### Fixed
* Enhanced loss functions for stability and flexibility
* Sliding window inference memory and device issues
* Revised transforms:
* Normalize intensity datatype and normalizer types
* Padding modes for zoom
* Crop returns coordinates
* Select items transform
* Weighted patch sampling
* Option to keep aspect ratio for zoom
* Various CI/CD issues
## [0.3.0] - 2020-10-02
### Added
* Overview document for [feature highlights in v0.3.0](https://github.com/Project-MONAI/MONAI/blob/master/docs/source/highlights.md)
* Automatic mixed precision support
* Multi-node, multi-GPU data parallel model training support
* 3 new evaluation metric functions
* 11 new network layers and blocks
* 6 new network architectures
* 14 new transforms, including an I/O adaptor
* Cross validation module for `DecathlonDataset`
* Smart Cache module in dataset
* `monai.optimizers` module
* `monai.csrc` module
* Experimental feature of ImageReader using ITK, Nibabel, Numpy, Pillow (PIL Fork)
* Experimental feature of differentiable image resampling in C++/CUDA
* Ensemble evaluator module
* GAN trainer module
* Initial cross-platform CI environment for C++/CUDA code
* Code style enforcement now includes isort and clang-format
* Progress bar with tqdm
### Changed
* Now fully compatible with PyTorch 1.6
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:20.08-py3` from `nvcr.io/nvidia/pytorch:20.03-py3`
* Code contributions now require signing off on the [Developer Certificate of Origin (DCO)](https://developercertificate.org/)
* Major work in type hinting finished
* Remote datasets migrated to [Open Data on AWS](https://registry.opendata.aws/)
* Optionally depend on PyTorch-Ignite v0.4.2 instead of v0.3.0
* Optionally depend on torchvision, ITK
* Enhanced CI tests with 8 new testing environments
### Removed
* `MONAI/examples` folder (relocated into [`Project-MONAI/tutorials`](https://github.com/Project-MONAI/tutorials))
* `MONAI/research` folder (relocated to [`Project-MONAI/research-contributions`](https://github.com/Project-MONAI/research-contributions))
### Fixed
* `dense_patch_slices` incorrect indexing
* Data type issue in `GeneralizedWassersteinDiceLoss`
* `ZipDataset` return value inconsistencies
* `sliding_window_inference` indexing and `device` issues
* importing monai modules may cause namespace pollution
* Random data splits issue in `DecathlonDataset`
* Issue of randomising a `Compose` transform
* Various issues in function type hints
* Typos in docstring and documentation
* `PersistentDataset` issue with existing file folder
* Filename issue in the output writers
## [0.2.0] - 2020-07-02
### Added
* Overview document for [feature highlights in v0.2.0](https://github.com/Project-MONAI/MONAI/blob/master/docs/source/highlights.md)
* Type hints and static type analysis support
* `MONAI/research` folder
* `monai.engine.workflow` APIs for supervised training
* `monai.inferers` APIs for validation and inference
* 7 new tutorials and examples
* 3 new loss functions
* 4 new event handlers
* 8 new layers, blocks, and networks
* 12 new transforms, including post-processing transforms
* `monai.apps.datasets` APIs, including `MedNISTDataset` and `DecathlonDataset`
* Persistent caching, `ZipDataset`, and `ArrayDataset` in `monai.data`
* Cross-platform CI tests supporting multiple Python versions
* Optional import mechanism
* Experimental features for third-party transforms integration
### Changed
> For more details please visit [the project wiki](https://github.com/Project-MONAI/MONAI/wiki/Notable-changes-between-0.1.0-and-0.2.0)
* Core modules now require numpy >= 1.17
* Categorized `monai.transforms` modules into crop and pad, intensity, IO, post-processing, spatial, and utility.
* Most transforms are now implemented with PyTorch native APIs
* Code style enforcement and automated formatting workflows now use autopep8 and black
* Base Docker image upgraded to `nvcr.io/nvidia/pytorch:20.03-py3` from `nvcr.io/nvidia/pytorch:19.10-py3`
* Enhanced local testing tools
* Documentation website domain changed to https://docs.monai.io
### Removed
* Support of Python < 3.6
* Automatic installation of optional dependencies including pytorch-ignite, nibabel, tensorboard, pillow, scipy, scikit-image
### Fixed
* Various issues in type and argument names consistency
* Various issues in docstring and documentation site
* Various issues in unit and integration tests
* Various issues in examples and notebooks
## [0.1.0] - 2020-04-17
### Added
* Public alpha source code release under the Apache 2.0 license ([highlights](https://github.com/Project-MONAI/MONAI/blob/0.1.0/docs/source/highlights.md))
* Various tutorials and examples
- Medical image classification and segmentation workflows
- Spacing/orientation-aware preprocessing with CPU/GPU and caching
- Flexible workflows with PyTorch Ignite and Lightning
* Various GitHub Actions
- CI/CD pipelines via self-hosted runners
- Documentation publishing via readthedocs.org
- PyPI package publishing
* Contributing guidelines
* A project logo and badges
[highlights]: https://github.com/Project-MONAI/MONAI/blob/master/docs/source/highlights.md
[Unreleased]: https://github.com/Project-MONAI/MONAI/compare/1.5.2...HEAD
[1.5.2]: https://github.com/Project-MONAI/MONAI/compare/1.5.1...1.5.2
[1.5.1]: https://github.com/Project-MONAI/MONAI/compare/1.5.0...1.5.1
[1.5.0]: https://github.com/Project-MONAI/MONAI/compare/1.4.0...1.5.0
[1.4.0]: https://github.com/Project-MONAI/MONAI/compare/1.3.2...1.4.0
[1.3.2]: https://github.com/Project-MONAI/MONAI/compare/1.3.1...1.3.2
[1.3.1]: https://github.com/Project-MONAI/MONAI/compare/1.3.0...1.3.1
[1.3.0]: https://github.com/Project-MONAI/MONAI/compare/1.2.0...1.3.0
[1.2.0]: https://github.com/Project-MONAI/MONAI/compare/1.1.0...1.2.0
[1.1.0]: https://github.com/Project-MONAI/MONAI/compare/1.0.1...1.1.0
[1.0.1]: https://github.com/Project-MONAI/MONAI/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/Project-MONAI/MONAI/compare/0.9.1...1.0.0
[0.9.1]: https://github.com/Project-MONAI/MONAI/compare/0.9.0...0.9.1
[0.9.0]: https://github.com/Project-MONAI/MONAI/compare/0.8.1...0.9.0
[0.8.1]: https://github.com/Project-MONAI/MONAI/compare/0.8.0...0.8.1
[0.8.0]: https://github.com/Project-MONAI/MONAI/compare/0.7.0...0.8.0
[0.7.0]: https://github.com/Project-MONAI/MONAI/compare/0.6.0...0.7.0
[0.6.0]: https://github.com/Project-MONAI/MONAI/compare/0.5.3...0.6.0
[0.5.3]: https://github.com/Project-MONAI/MONAI/compare/0.5.0...0.5.3
[0.5.0]: https://github.com/Project-MONAI/MONAI/compare/0.4.0...0.5.0
[0.4.0]: https://github.com/Project-MONAI/MONAI/compare/0.3.0...0.4.0
[0.3.0]: https://github.com/Project-MONAI/MONAI/compare/0.2.0...0.3.0
[0.2.0]: https://github.com/Project-MONAI/MONAI/compare/0.1.0...0.2.0
[0.1.0]: https://github.com/Project-MONAI/MONAI/commits/0.1.0
================================================
FILE: CITATION.cff
================================================
# YAML 1.2
# Metadata for citation of this software according to the CFF format (https://citation-file-format.github.io/)
#
---
title: "MONAI: Medical Open Network for AI"
abstract: "AI Toolkit for Healthcare Imaging"
authors:
- name: "MONAI Consortium"
date-released: 2026-01-29
version: "1.5.2"
identifiers:
- description: "This DOI represents all versions of MONAI, and will always resolve to the latest one."
type: doi
value: "10.5281/zenodo.4323058"
license: "Apache-2.0"
repository-code: "https://github.com/Project-MONAI/MONAI"
url: "https://project-monai.github.io/"
cff-version: "1.2.0"
message: "If you use this software, please cite it using these metadata."
preferred-citation:
type: article
authors:
- given-names: "M. Jorge"
family-names: "Cardoso"
- given-names: "Wenqi"
family-names: "Li"
- given-names: "Richard"
family-names: "Brown"
- given-names: "Nic"
family-names: "Ma"
- given-names: "Eric"
family-names: "Kerfoot"
- given-names: "Yiheng"
family-names: "Wang"
- given-names: "Benjamin"
family-names: "Murray"
- given-names: "Andriy"
family-names: "Myronenko"
- given-names: "Can"
family-names: "Zhao"
- given-names: "Dong"
family-names: "Yang"
- given-names: "Vishwesh"
family-names: "Nath"
- given-names: "Yufan"
family-names: "He"
- given-names: "Ziyue"
family-names: "Xu"
- given-names: "Ali"
family-names: "Hatamizadeh"
- given-names: "Wentao"
family-names: "Zhu"
- given-names: "Yun"
family-names: "Liu"
- given-names: "Mingxin"
family-names: "Zheng"
- given-names: "Yucheng"
family-names: "Tang"
- given-names: "Isaac"
family-names: "Yang"
- given-names: "Michael"
family-names: "Zephyr"
- given-names: "Behrooz"
family-names: "Hashemian"
- given-names: "Sachidanand"
family-names: "Alle"
- given-names: "Mohammad"
family-names: "Zalbagi Darestani"
- given-names: "Charlie"
family-names: "Budd"
- given-names: "Marc"
family-names: "Modat"
- given-names: "Tom"
family-names: "Vercauteren"
- given-names: "Guotai"
family-names: "Wang"
- given-names: "Yiwen"
family-names: "Li"
- given-names: "Yipeng"
family-names: "Hu"
- given-names: "Yunguan"
family-names: "Fu"
- given-names: "Benjamin"
family-names: "Gorman"
- given-names: "Hans"
family-names: "Johnson"
- given-names: "Brad"
family-names: "Genereaux"
- given-names: "Barbaros S."
family-names: "Erdal"
- given-names: "Vikash"
family-names: "Gupta"
- given-names: "Andres"
family-names: "Diaz-Pinto"
- given-names: "Andre"
family-names: "Dourson"
- given-names: "Lena"
family-names: "Maier-Hein"
- given-names: "Paul F."
family-names: "Jaeger"
- given-names: "Michael"
family-names: "Baumgartner"
- given-names: "Jayashree"
family-names: "Kalpathy-Cramer"
- given-names: "Mona"
family-names: "Flores"
- given-names: "Justin"
family-names: "Kirby"
- given-names: "Lee A.D."
family-names: "Cooper"
- given-names: "Holger R."
family-names: "Roth"
- given-names: "Daguang"
family-names: "Xu"
- given-names: "David"
family-names: "Bericat"
- given-names: "Ralf"
family-names: "Floca"
- given-names: "S. Kevin"
family-names: "Zhou"
- given-names: "Haris"
family-names: "Shuaib"
- given-names: "Keyvan"
family-names: "Farahani"
- given-names: "Klaus H."
family-names: "Maier-Hein"
- given-names: "Stephen"
family-names: "Aylward"
- given-names: "Prerna"
family-names: "Dogra"
- given-names: "Sebastien"
family-names: "Ourselin"
- given-names: "Andrew"
family-names: "Feng"
doi: "https://doi.org/10.48550/arXiv.2211.02701"
month: 11
year: 2022
title: "MONAI: An open-source framework for deep learning in healthcare"
...
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at monai.contact@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
================================================
FILE: CONTRIBUTING.md
================================================
- [Introduction](#introduction)
- [The contribution process](#the-contribution-process)
- [Preparing pull requests](#preparing-pull-requests)
1. [Checking the coding style](#checking-the-coding-style)
1. [Unit testing](#unit-testing)
1. [Building the documentation](#building-the-documentation)
1. [Automatic code formatting](#automatic-code-formatting)
1. [Adding new optional dependencies](#adding-new-optional-dependencies)
1. [Signing your work](#signing-your-work)
1. [Utility functions](#utility-functions)
1. [Backwards compatibility](#backwards-compatibility)
- [Submitting pull requests](#submitting-pull-requests)
- [The code reviewing process (for the maintainers)](#the-code-reviewing-process)
- [Reviewing pull requests](#reviewing-pull-requests)
- [Admin tasks (for the maintainers)](#admin-tasks)
- [Releasing a new version](#release-a-new-version)
## Introduction
Welcome to Project MONAI! We're excited you're here and want to contribute. This documentation is intended for individuals and institutions interested in contributing to MONAI. MONAI is an open-source project and, as such, its success relies on its community of contributors willing to keep improving it. Your contribution will be a valued addition to the code base; we simply ask that you read this page and understand our contribution process, whether you are a seasoned open-source contributor or whether you are a first-time contributor.
### Communicate with us
We are happy to talk with you about your needs for MONAI and your ideas for contributing to the project. One way to do this is to create an issue discussing your thoughts. It might be that a very similar feature is under development or already exists, so an issue is a great starting point. If you are looking for an issue to resolve that will help Project MONAI, see the [*good first issue*](https://github.com/Project-MONAI/MONAI/labels/good%20first%20issue) and [*Contribution wanted*](https://github.com/Project-MONAI/MONAI/labels/Contribution%20wanted) labels.
### Does it belong in PyTorch instead of MONAI?
MONAI is part of [PyTorch Ecosystem](https://pytorch.org/ecosystem/), and mainly based on the PyTorch and Numpy libraries. These libraries implement what we consider to be best practice for general scientific computing and deep learning functionality. MONAI builds on these with a strong focus on medical applications. As such, it is a good idea to consider whether your functionality is medical-application specific or not. General deep learning functionality may be better off in PyTorch; you can find their contribution guidelines [here](https://pytorch.org/docs/stable/community/contribution_guide.html).
## The contribution process
*Pull request early*
We encourage you to create pull requests early. It helps us track the contributions under development, whether they are ready to be merged or not. [Create a draft pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request) until it is ready for formal review.
Please note that, as per PyTorch, MONAI uses American English spelling. This means classes and variables should be: normali**z**e, visuali**z**e, colo~~u~~r, etc.
### Preparing pull requests
To ensure the code quality, MONAI relies on several linting tools ([black](https://github.com/psf/black), [isort](https://github.com/timothycrosley/isort), [ruff](https://github.com/astral-sh/ruff)),
static type analysis tools ([mypy](https://github.com/python/mypy), [pytype](https://github.com/google/pytype)), as well as a set of unit/integration tests.
This section highlights all the necessary preparation steps required before sending a pull request.
To collaborate efficiently, please read through this section and follow them.
- [Checking the coding style](#checking-the-coding-style)
- [Licensing information](#licensing-information)
- [Unit testing](#unit-testing)
- [Building documentation](#building-the-documentation)
- [Signing your work](#signing-your-work)
#### Checking the coding style
Coding style is checked and enforced by black, isort, and ruff.
Before submitting a pull request, we recommend that all linting should pass, by running the following command locally:
```bash
# optionally update the dependencies and dev tools
python -m pip install -U pip
python -m pip install -U -r requirements-dev.txt
# run the linting and type checking tools
./runtests.sh --codeformat
# try to fix the coding style errors automatically
./runtests.sh --autofix
```
Full linting and type checking may take some time. If you need a quick check, run
```bash
# run ruff only
./runtests.sh --ruff
```
#### Licensing information
All source code files should start with this paragraph:
```
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
```
##### Exporting modules
If you intend for any variables/functions/classes to be available outside of the file with the edited functionality, then:
- Create or append to the `__all__` variable (in the file in which functionality has been added), and
- Add to the `__init__.py` file.
#### Unit testing
MONAI tests are located under `tests/`.
- The unit test's file name currently follows `test_[module_name].py` or `test_[module_name]_dist.py`.
- The `test_[module_name]_dist.py` subset of unit tests requires a distributed environment to verify the module with distributed GPU-based computation.
- The integration test's file name follows `test_integration_[workflow_name].py`.
A bash script (`runtests.sh`) is provided to run all tests locally.
Please run ``./runtests.sh -h`` to see all options.
To run a particular test, for example `tests/losses/test_dice_loss.py`:
```
python -m tests.losses.test_dice_loss
```
Before submitting a pull request, we recommend that all linting and unit tests
should pass, by running the following command locally:
```bash
./runtests.sh -f -u --net --coverage
```
or (for new features that would not break existing functionality):
```bash
./runtests.sh --quick --unittests
```
It is recommended that the new test `test_[module_name].py` is constructed by using only
python 3.9+ build-in functions, `torch`, `numpy`, `coverage` (for reporting code coverages) and `parameterized` (for organising test cases) packages.
If it requires any other external packages, please make sure:
- the packages are listed in [`requirements-dev.txt`](requirements-dev.txt)
- the new test `test_[module_name].py` is added to the `exclude_cases` in [`./tests/min_tests.py`](./tests/min_tests.py) so that
the minimal CI runner will not execute it.
##### Testing data
Testing data such as images and binary files should not be placed in the source code repository.
Please deploy them to a reliable file sharing location (the current preferred one is [https://github.com/Project-MONAI/MONAI-extra-test-data/releases](https://github.com/Project-MONAI/MONAI-extra-test-data/releases)).
At test time, the URLs within `tests/testing_data/data_config.json` are accessible
via the APIs provided in `tests.utils`: `tests.utils.testing_data_config` and `tests.utils.download_url_or_skip_test`.
*If it's not tested, it's broken*
All new functionality should be accompanied by an appropriate set of tests.
MONAI functionality has plenty of unit tests from which you can draw inspiration,
and you can reach out to us if you are unsure of how to proceed with testing.
MONAI's code coverage report is available at [CodeCov](https://codecov.io/gh/Project-MONAI/MONAI).
#### Building the documentation
MONAI's documentation is located at `docs/`.
```bash
# install the doc-related dependencies
pip install --upgrade pip
pip install -r docs/requirements.txt
# build the docs
cd docs/
make html
```
The above commands build html documentation, they are used to automatically generate [https://docs.monai.io](https://docs.monai.io).
The Python code docstring are written in
[reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) and
the documentation pages can be in either [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) or [Markdown](https://en.wikipedia.org/wiki/Markdown). In general the Python docstrings follow the [Google style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings).
Before submitting a pull request, it is recommended to:
- edit the relevant `.rst` files in [`docs/source`](./docs/source) accordingly.
- build html documentation locally
- check the auto-generated documentation (by browsing `./docs/build/html/index.html` with a web browser)
- type `make clean` in `docs/` folder to remove the current build files.
Please type `make help` in `docs/` folder for all supported format options.
#### Automatic code formatting
MONAI provides support of automatic Python code formatting via [a customised GitHub action](https://github.com/Project-MONAI/monai-code-formatter).
This makes the project's Python coding style consistent and reduces maintenance burdens.
Commenting a pull request with `/black` triggers the formatting action based on [`psf/Black`](https://github.com/psf/black) (this is implemented with [`slash command dispatch`](https://github.com/marketplace/actions/slash-command-dispatch)).
Steps for the formatting process:
- After submitting a pull request or push to an existing pull request,
make a comment to the pull request to trigger the formatting action.
The first line of the comment must be `/black` so that it will be interpreted by [the comment parser](https://github.com/marketplace/actions/slash-command-dispatch#how-are-comments-parsed-for-slash-commands).
- [Auto] The GitHub action tries to format all Python files (using [`psf/Black`](https://github.com/psf/black)) in the branch and makes a commit under the name "MONAI bot" if there's code change. The actual formatting action is deployed at [project-monai/monai-code-formatter](https://github.com/Project-MONAI/monai-code-formatter).
- [Auto] After the formatting commit, the GitHub action adds an emoji to the comment that triggered the process.
- Repeat the above steps if necessary.
#### Adding new optional dependencies
In addition to the minimal requirements of PyTorch and Numpy, MONAI's core modules are built optionally based on 3rd-party packages.
The current set of dependencies is listed in [installing dependencies](https://monai.readthedocs.io/en/stable/installation.html#installing-the-recommended-dependencies).
To allow for flexible integration of MONAI with other systems and environments,
the optional dependency APIs are always invoked lazily. For example,
```py
from monai.utils import optional_import
itk, _ = optional_import("itk", ...)
class ITKReader(ImageReader):
...
def read(self, ...):
return itk.imread(...)
```
The availability of the external `itk.imread` API is not required unless `monai.data.ITKReader.read` is called by the user.
Integration tests with minimal requirements are deployed to ensure this strategy.
To add new optional dependencies, please communicate with the core team during pull request reviews,
and add the necessary information (at least) to the following files:
- [setup.cfg](https://github.com/Project-MONAI/MONAI/blob/dev/setup.cfg) (for package's `[options.extras_require]` config)
- [requirements-dev.txt](https://github.com/Project-MONAI/MONAI/blob/dev/requirements-dev.txt) (pip requirements file)
- [docs/requirements.txt](https://github.com/Project-MONAI/MONAI/blob/dev/docs/requirements.txt) (docs pip requirements file)
- [environment-dev.yml](https://github.com/Project-MONAI/MONAI/blob/dev/environment-dev.yml) (conda environment file)
- [installation.md](https://github.com/Project-MONAI/MONAI/blob/dev/docs/source/installation.md) (documentation)
When writing unit tests that use 3rd-party packages, it is a good practice to always consider
an appropriate fallback default behaviour when the packages are not installed in
the testing environment. For example:
```py
from monai.utils import optional_import
plt, has_matplotlib = optional_import("matplotlib.pyplot")
@skipUnless(has_matplotlib, "Matplotlib required")
class TestBlendImages(unittest.TestCase):
```
It skips the test cases when `matplotlib.pyplot` APIs are not available.
Alternatively, add the test file name to the ``exclude_cases`` in `tests/min_tests.py` to completely skip the test
cases when running in a minimal setup.
#### Signing your work
MONAI enforces the [Developer Certificate of Origin](https://developercertificate.org/) (DCO) on all pull requests.
All commit messages should contain the `Signed-off-by` line with an email address. The [GitHub DCO app](https://github.com/apps/dco) is deployed on MONAI. The pull request's status will be `failed` if commits do not contain a valid `Signed-off-by` line.
Git has a `-s` (or `--signoff`) command-line option to append this automatically to your commit message:
```bash
git commit -s -m 'a new commit'
```
The commit message will be:
```
a new commit
Signed-off-by: Your Name <yourname@example.org>
```
Full text of the DCO:
```
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```
#### Utility functions
MONAI provides a set of generic utility functions and frequently used routines.
These are located in [``monai/utils``](./monai/utils/) and in the module folders such as [``networks/utils.py``](./monai/networks/).
Users are encouraged to use these common routines to improve code readability and reduce the code maintenance burdens.
Notably,
- ``monai.module.export`` decorator can make the module name shorter when importing,
for example, ``import monai.transforms.Spacing`` is the equivalent of ``monai.transforms.spatial.array.Spacing`` if
``class Spacing`` defined in file `monai/transforms/spatial/array.py` is decorated with ``@export("monai.transforms")``.
For string definition, [f-string](https://www.python.org/dev/peps/pep-0498/) is recommended to use over `%-print` and `format-print`. So please try to use `f-string` if you need to define any string object.
#### Backwards compatibility
MONAI in general follows [PyTorch's policy for backward compatibility](https://github.com/pytorch/pytorch/wiki/PyTorch's-Python-Frontend-Backward-and-Forward-Compatibility-Policy).
Utility functions are provided in `monai.utils.deprecated` to help migrate from the deprecated to new APIs. The use of these utilities is encouraged.
The pull request [template contains checkboxes](https://github.com/Project-MONAI/MONAI/blame/dev/.github/pull_request_template.md#L11-L12) that
the contributor should use accordingly to clearly indicate breaking changes.
The process of releasing backwards incompatible API changes is as follows:
1. discuss the breaking changes during pull requests or in dev meetings with a feature proposal if needed.
1. add a warning message in the upcoming release (version `X.Y`), the warning message should include a forecast of removing the deprecated API in:
1. `X+1.0` -- major version `X+1` and minor version `0` the next major version if it's a significant change,
1. `X.Y+2` -- major version `X` and minor version `Y+2` (the minor version after the next one), if it's a minor API change.
1. Note that the versioning policy is similar to PyTorch's approach which does not precisely follow [the semantic versioning](https://semver.org/) definition.
Major version numbers are instead used to represent major product version (which is currently not planned to be greater than 1),
minor version for both compatible and incompatible, and patch version for bug fixes.
1. when recommending new API to use in place of a deprecated API, the recommended version should
provide exact feature-like behaviour otherwise users will have a harder time migrating.
1. add new test cases by extending the existing unit tests to cover both the deprecated and updated APIs.
1. collect feedback from the users during the subsequent few releases, and reconsider step 1 if needed.
1. before each release, review the deprecating APIs and relevant tests, and clean up the removed APIs described in step 2.
### Submitting pull requests
All code changes to the dev branch must be done via [pull requests](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests).
1. Create a new ticket or take a known ticket from [the issue list][monai issue list].
1. Check if there's already a branch dedicated to the task.
1. If the task has not been taken, [create a new branch in your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)
of the codebase named `[ticket_id]-[task_name]`.
For example, branch name `19-ci-pipeline-setup` corresponds to [issue #19](https://github.com/Project-MONAI/MONAI/issues/19).
Ideally, the new branch should be based on the latest `dev` branch.
1. Make changes to the branch ([use detailed commit messages if possible](https://chris.beams.io/posts/git-commit/)).
1. Make sure that new tests cover the changes and the changed codebase [passes all tests locally](#unit-testing).
1. [Create a new pull request](https://help.github.com/en/desktop/contributing-to-projects/creating-a-pull-request) from the task branch to the dev branch, with detailed descriptions of the purpose of this pull request.
1. Check [the CI/CD status of the pull request][github ci], make sure all CI/CD tests passed.
1. Wait for reviews; if there are reviews, make point-to-point responses, make further code changes if needed.
1. If there are conflicts between the pull request branch and the dev branch, pull the changes from the dev and resolve the conflicts locally.
1. Reviewer and contributor may have discussions back and forth until all comments addressed.
1. Wait for the pull request to be merged.
## The code reviewing process
### Reviewing pull requests
All code review comments should be specific, constructive, and actionable.
1. Check [the CI/CD status of the pull request][github ci], make sure all CI/CD tests passed before reviewing (contact the branch owner if needed).
1. Read carefully the descriptions of the pull request and the files changed, write comments if needed.
1. Make in-line comments to specific code segments, [request for changes](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-request-reviews) if needed.
1. Review any further code changes until all comments addressed by the contributors.
1. Comment to trigger `/black` and/or `/integration-test` for optional auto code formatting and [integration tests](.github/workflows/integration.yml).
1. [Maintainers] Review the changes and comment `/build` to trigger internal full tests.
1. Merge the pull request to the dev branch.
1. Close the corresponding task ticket on [the issue list][monai issue list].
[github ci]: https://github.com/Project-MONAI/MONAI/actions
[monai issue list]: https://github.com/Project-MONAI/MONAI/issues
## Admin tasks
### Release a new version
The `dev` branch's `HEAD` always corresponds to MONAI Docker image's latest tag: `projectmonai/monai:latest`. (No
release is currently done for the slim MONAI image, this is built locally by users.)
The `main` branch's `HEAD` always corresponds to the latest MONAI milestone release.
When major features are ready for a milestone, to prepare for a new release:
- Prepare [a release note](https://github.com/Project-MONAI/MONAI/releases) and release checklist.
- Check out or cherry-pick a new branch `releasing/[version number]` locally from the `dev` branch and push to the codebase.
- Create a release candidate tag, for example, `git tag -a 0.1.0rc1 -m "release candidate 1 of version 0.1.0"`.
- Push the tag to the codebase, for example, `git push origin 0.1.0rc1`.
This step will trigger package building and testing.
The resultant packages are automatically uploaded to
[TestPyPI](https://test.pypi.org/project/monai/). The packages are also available for downloading as
repository's artifacts (e.g. the file at <https://github.com/Project-MONAI/MONAI/actions/runs/66570977>).
- Check the release test at [TestPyPI](https://test.pypi.org/project/monai/), download the artifacts when the CI finishes.
- Optionally run [the cron testing jobs](https://github.com/Project-MONAI/MONAI/blob/dev/.github/workflows/cron.yml) on `releasing/[version number]`.
- Rebase `releasing/[version number]` to `main`, make sure all the test pipelines succeed.
- Once the release candidate is verified, tag and push a milestone, for example, `git push origin 0.1.0`.
The tag must be with the latest commit of `releasing/[version number]`.
- Upload the packages to [PyPI](https://pypi.org/project/monai/).
This could be done manually by ``twine upload dist/*``, given the artifacts are unzipped to the folder ``dist/``.
- Merge `releasing/[version number]` to `dev`, this step must make sure that the tagging commit unchanged on `dev`.
- Publish the release note.
Note that the release should be tagged with a [PEP440](https://www.python.org/dev/peps/pep-0440/) compliant version number.
If any error occurs during the release process, first check out a new hotfix branch from the `releasing/[version number]`,
then make PRs to the `releasing/[version number]` to fix the bugs via the regular contribution procedure.
If any error occurs after the release process, first check out a new hotfix branch from the `main` branch,
make a patch version release following the semantic versioning, for example, `releasing/0.1.1`.
Make sure the `releasing/0.1.1` is merged back into both `dev` and `main` and all the test pipelines succeed.
<p align="right">
<a href="#introduction">⬆️ Back to Top</a>
</p>
================================================
FILE: Dockerfile
================================================
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# To build with a different base image
# please run `docker build` using the `--build-arg PYTORCH_IMAGE=...` flag.
ARG PYTORCH_IMAGE=nvcr.io/nvidia/pytorch:25.12-py3
FROM ${PYTORCH_IMAGE}
LABEL maintainer="monai.contact@gmail.com"
# TODO: remark for issue [revise the dockerfile](https://github.com/zarr-developers/numcodecs/issues/431)
RUN if [[ $(uname -m) =~ "aarch64" ]]; then \
export CFLAGS="-O3" && \
export DISABLE_NUMCODECS_SSE2=true && \
export DISABLE_NUMCODECS_AVX2=true && \
pip install numcodecs; \
fi
WORKDIR /opt/monai
# install full deps
COPY requirements.txt requirements-min.txt requirements-dev.txt /tmp/
RUN cp /tmp/requirements.txt /tmp/req.bak \
&& awk '!/torch/' /tmp/requirements.txt > /tmp/tmp && mv /tmp/tmp /tmp/requirements.txt \
&& python -m pip install --upgrade --no-cache-dir pip \
&& python -m pip install --no-cache-dir -r /tmp/requirements-dev.txt
# compile ext and remove temp files
# TODO: remark for issue [revise the dockerfile #1276](https://github.com/Project-MONAI/MONAI/issues/1276)
# please specify exact files and folders to be copied -- else, basically always, the Docker build process cannot cache
# this or anything below it and always will build from at most here; one file change leads to no caching from here on...
COPY LICENSE CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md README.md versioneer.py setup.py setup.cfg runtests.sh MANIFEST.in ./
COPY tests ./tests
COPY monai ./monai
RUN BUILD_MONAI=1 FORCE_CUDA=1 python setup.py develop \
&& rm -rf build __pycache__
# NGC Client
WORKDIR /opt/tools
ARG NGC_CLI_URI="https://ngc.nvidia.com/downloads/ngccli_linux.zip"
RUN wget -q ${NGC_CLI_URI} && unzip ngccli_linux.zip && chmod u+x ngc-cli/ngc && \
find ngc-cli/ -type f -exec md5sum {} + | LC_ALL=C sort | md5sum -c ngc-cli.md5 && \
rm -rf ngccli_linux.zip ngc-cli.md5
ENV PATH=${PATH}:/opt/tools:/opt/tools/ngc-cli
RUN apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y libopenslide0 \
&& rm -rf /var/lib/apt/lists/*
# append /opt/tools to runtime path for NGC CLI to be accessible from all file system locations
ENV PATH=${PATH}:/opt/tools
ENV POLYGRAPHY_AUTOINSTALL_DEPS=1
WORKDIR /opt/monai
================================================
FILE: Dockerfile.slim
================================================
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This is a slimmed down version of the MONAI Docker image using a smaller base image and multi-stage building. Not all
# NVIDIA tools will be present but all libraries and compiled code are included. This image isn't provided through
# Dockerhub so users must build locally: `docker build -t monai_slim -f Dockerfile.slim .`
# Containers may require more shared memory, eg.: `docker run -ti --rm --gpus all --shm-size=10gb monai_slim /bin/bash`
ARG IMAGE=debian:12-slim
FROM ${IMAGE} AS build
ARG TORCH_CUDA_ARCH_LIST="7.5 8.0 8.6 8.9 9.0+PTX"
ENV DEBIAN_FRONTEND=noninteractive
ENV APT_INSTALL="apt install -y --no-install-recommends"
RUN apt update && apt upgrade -y && \
${APT_INSTALL} ca-certificates python3-pip python-is-python3 git wget libopenslide0 unzip python3-dev && \
wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb && \
dpkg -i cuda-keyring_1.1-1_all.deb && \
apt update && \
${APT_INSTALL} cuda-toolkit-12 && \
rm -rf /usr/lib/python*/EXTERNALLY-MANAGED /var/lib/apt/lists/* && \
python -m pip install --upgrade --no-cache-dir --no-build-isolation pip
# TODO: remark for issue [revise the dockerfile](https://github.com/zarr-developers/numcodecs/issues/431)
RUN if [[ $(uname -m) =~ "aarch64" ]]; then \
CFLAGS="-O3" DISABLE_NUMCODECS_SSE2=true DISABLE_NUMCODECS_AVX2=true python -m pip install numcodecs; \
fi
# NGC Client
WORKDIR /opt/tools
ARG NGC_CLI_URI="https://ngc.nvidia.com/downloads/ngccli_linux.zip"
RUN wget -q ${NGC_CLI_URI} && unzip ngccli_linux.zip && chmod u+x ngc-cli/ngc && \
find ngc-cli/ -type f -exec md5sum {} + | LC_ALL=C sort | md5sum -c ngc-cli.md5 && \
rm -rf ngccli_linux.zip ngc-cli.md5
WORKDIR /opt/monai
# copy relevant parts of repo
COPY requirements.txt requirements-min.txt requirements-dev.txt versioneer.py setup.py setup.cfg pyproject.toml ./
COPY LICENSE CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md README.md MANIFEST.in runtests.sh ./
COPY tests ./tests
COPY monai ./monai
# install full deps
RUN python -m pip install --no-cache-dir --no-build-isolation -r requirements-dev.txt
# compile ext
RUN CUDA_HOME=/usr/local/cuda FORCE_CUDA=1 USE_COMPILED=1 BUILD_MONAI=1 python setup.py develop
# recreate the image without the installed CUDA packages then copy the installed MONAI and Python directories
FROM ${IMAGE} AS build2
ENV DEBIAN_FRONTEND=noninteractive
ENV APT_INSTALL="apt install -y --no-install-recommends"
RUN apt update && apt upgrade -y && \
${APT_INSTALL} ca-certificates python3-pip python-is-python3 git libopenslide0 && \
apt clean && \
rm -rf /usr/lib/python*/EXTERNALLY-MANAGED /var/lib/apt/lists/* && \
python -m pip install --upgrade --no-cache-dir --no-build-isolation pip
COPY --from=build /opt/monai /opt/monai
COPY --from=build /opt/tools /opt/tools
ARG PYTHON_VERSION=3.11
COPY --from=build /usr/local/lib/python${PYTHON_VERSION}/dist-packages /usr/local/lib/python${PYTHON_VERSION}/dist-packages
COPY --from=build /usr/local/bin /usr/local/bin
RUN rm -rf /opt/monai/build /opt/monai/monai.egg-info && \
find /opt /usr/local/lib -type d -name __pycache__ -exec rm -rf {} +
# flatten all layers down to one
FROM ${IMAGE}
LABEL maintainer="monai.contact@gmail.com"
COPY --from=build2 / /
WORKDIR /opt/monai
ENV PATH=${PATH}:/opt/tools:/opt/tools/ngc-cli
ENV POLYGRAPHY_AUTOINSTALL_DEPS=1
ENV CUDA_HOME=/usr/local/cuda
ENV BUILD_MONAI=1
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
gitextract_ts7o095u/ ├── .clang-format ├── .coderabbit.yaml ├── .deepsource.toml ├── .dockerignore ├── .gitattributes ├── .github/ │ ├── CODEOWNERS │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ ├── feature_request.md │ │ └── question.md │ ├── codecov.yml │ ├── dco.yml │ ├── dependabot.yml │ ├── pull_request_template.md │ └── workflows/ │ ├── blossom-ci.yml │ ├── chatops.yml │ ├── codeql-analysis.yml │ ├── conda.yml │ ├── cron-ngc-bundle.yml │ ├── cron.yml │ ├── docker.yml │ ├── integration.yml │ ├── pythonapp-gpu.yml │ ├── pythonapp-min.yml │ ├── pythonapp.yml │ ├── release.yml │ ├── setupapp.yml │ └── weekly-preview.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .readthedocs.yml ├── CHANGELOG.md ├── CITATION.cff ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── Dockerfile.slim ├── LICENSE ├── MANIFEST.in ├── README.md ├── SECURITY.md ├── docs/ │ ├── .readthedocs.yaml │ ├── Makefile │ ├── _static/ │ │ └── custom.css │ ├── requirements.txt │ └── source/ │ ├── api.rst │ ├── apidocs/ │ │ ├── modules.rst │ │ └── monai.rst │ ├── applications.md │ ├── apps.rst │ ├── auto3dseg.rst │ ├── bundle.rst │ ├── bundle_intro.rst │ ├── conf.py │ ├── config_syntax.md │ ├── contrib.rst │ ├── data.rst │ ├── engines.rst │ ├── fl.rst │ ├── handlers.rst │ ├── highlights.rst │ ├── index.rst │ ├── inferers.rst │ ├── installation.md │ ├── lazy_resampling.rst │ ├── losses.rst │ ├── mb_properties.rst │ ├── mb_specification.rst │ ├── metrics.rst │ ├── modules.md │ ├── networks.rst │ ├── optimizers.rst │ ├── precision_accelerating.md │ ├── transforms.rst │ ├── transforms_idx.rst │ ├── utils.rst │ ├── visualize.rst │ ├── whatsnew.rst │ ├── whatsnew_0_5.md │ ├── whatsnew_0_6.md │ ├── whatsnew_0_7.md │ ├── whatsnew_0_8.md │ ├── whatsnew_0_9.md │ ├── whatsnew_1_0.md │ ├── whatsnew_1_1.md │ ├── whatsnew_1_2.md │ ├── whatsnew_1_3.md │ ├── whatsnew_1_4.md │ ├── whatsnew_1_5.md │ ├── whatsnew_1_5_1.md │ └── whatsnew_1_5_2.md ├── environment-dev.yml ├── monai/ │ ├── README.md │ ├── __init__.py │ ├── _extensions/ │ │ ├── __init__.py │ │ ├── gmm/ │ │ │ ├── gmm.cpp │ │ │ ├── gmm.h │ │ │ ├── gmm_cpu.cpp │ │ │ ├── gmm_cuda.cu │ │ │ └── gmm_cuda_linalg.cuh │ │ └── loader.py │ ├── _version.py │ ├── apps/ │ │ ├── __init__.py │ │ ├── auto3dseg/ │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── auto_runner.py │ │ │ ├── bundle_gen.py │ │ │ ├── data_analyzer.py │ │ │ ├── ensemble_builder.py │ │ │ ├── hpo_gen.py │ │ │ ├── transforms.py │ │ │ └── utils.py │ │ ├── datasets.py │ │ ├── deepedit/ │ │ │ ├── __init__.py │ │ │ ├── interaction.py │ │ │ └── transforms.py │ │ ├── deepgrow/ │ │ │ ├── __init__.py │ │ │ ├── dataset.py │ │ │ ├── interaction.py │ │ │ └── transforms.py │ │ ├── detection/ │ │ │ ├── __init__.py │ │ │ ├── metrics/ │ │ │ │ ├── __init__.py │ │ │ │ ├── coco.py │ │ │ │ └── matching.py │ │ │ ├── networks/ │ │ │ │ ├── __init__.py │ │ │ │ ├── retinanet_detector.py │ │ │ │ └── retinanet_network.py │ │ │ ├── transforms/ │ │ │ │ ├── __init__.py │ │ │ │ ├── array.py │ │ │ │ ├── box_ops.py │ │ │ │ └── dictionary.py │ │ │ └── utils/ │ │ │ ├── ATSS_matcher.py │ │ │ ├── __init__.py │ │ │ ├── anchor_utils.py │ │ │ ├── box_coder.py │ │ │ ├── box_selector.py │ │ │ ├── detector_utils.py │ │ │ ├── hard_negative_sampler.py │ │ │ └── predict_utils.py │ │ ├── generation/ │ │ │ ├── __init__.py │ │ │ └── maisi/ │ │ │ ├── __init__.py │ │ │ └── networks/ │ │ │ ├── __init__.py │ │ │ ├── autoencoderkl_maisi.py │ │ │ ├── controlnet_maisi.py │ │ │ └── diffusion_model_unet_maisi.py │ │ ├── mmars/ │ │ │ ├── __init__.py │ │ │ ├── mmars.py │ │ │ └── model_desc.py │ │ ├── nnunet/ │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── nnunet_bundle.py │ │ │ ├── nnunetv2_runner.py │ │ │ └── utils.py │ │ ├── nuclick/ │ │ │ ├── __init__.py │ │ │ └── transforms.py │ │ ├── pathology/ │ │ │ ├── __init__.py │ │ │ ├── engines/ │ │ │ │ ├── __init__.py │ │ │ │ └── utils.py │ │ │ ├── handlers/ │ │ │ │ ├── __init__.py │ │ │ │ └── utils.py │ │ │ ├── inferers/ │ │ │ │ ├── __init__.py │ │ │ │ └── inferer.py │ │ │ ├── losses/ │ │ │ │ ├── __init__.py │ │ │ │ └── hovernet_loss.py │ │ │ ├── metrics/ │ │ │ │ ├── __init__.py │ │ │ │ └── lesion_froc.py │ │ │ ├── transforms/ │ │ │ │ ├── __init__.py │ │ │ │ ├── post/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── array.py │ │ │ │ │ └── dictionary.py │ │ │ │ └── stain/ │ │ │ │ ├── __init__.py │ │ │ │ ├── array.py │ │ │ │ └── dictionary.py │ │ │ └── utils.py │ │ ├── reconstruction/ │ │ │ ├── __init__.py │ │ │ ├── complex_utils.py │ │ │ ├── fastmri_reader.py │ │ │ ├── mri_utils.py │ │ │ ├── networks/ │ │ │ │ ├── __init__.py │ │ │ │ ├── blocks/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── varnetblock.py │ │ │ │ └── nets/ │ │ │ │ ├── __init__.py │ │ │ │ ├── coil_sensitivity_model.py │ │ │ │ ├── complex_unet.py │ │ │ │ ├── utils.py │ │ │ │ └── varnet.py │ │ │ └── transforms/ │ │ │ ├── __init__.py │ │ │ ├── array.py │ │ │ └── dictionary.py │ │ ├── tcia/ │ │ │ ├── __init__.py │ │ │ ├── label_desc.py │ │ │ └── utils.py │ │ ├── utils.py │ │ └── vista3d/ │ │ ├── __init__.py │ │ ├── inferer.py │ │ ├── sampler.py │ │ └── transforms.py │ ├── auto3dseg/ │ │ ├── __init__.py │ │ ├── algo_gen.py │ │ ├── analyzer.py │ │ ├── operations.py │ │ ├── seg_summarizer.py │ │ └── utils.py │ ├── bundle/ │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── config_item.py │ │ ├── config_parser.py │ │ ├── properties.py │ │ ├── reference_resolver.py │ │ ├── scripts.py │ │ ├── utils.py │ │ └── workflows.py │ ├── config/ │ │ ├── __init__.py │ │ ├── deviceconfig.py │ │ └── type_definitions.py │ ├── csrc/ │ │ ├── ext.cpp │ │ ├── filtering/ │ │ │ ├── bilateral/ │ │ │ │ ├── bilateral.cpp │ │ │ │ ├── bilateral.h │ │ │ │ ├── bilateralfilter_cpu.cpp │ │ │ │ ├── bilateralfilter_cpu_phl.cpp │ │ │ │ ├── bilateralfilter_cuda.cu │ │ │ │ └── bilateralfilter_cuda_phl.cu │ │ │ ├── filtering.h │ │ │ ├── permutohedral/ │ │ │ │ ├── hash_table.cuh │ │ │ │ ├── permutohedral.cpp │ │ │ │ ├── permutohedral.h │ │ │ │ ├── permutohedral_cpu.cpp │ │ │ │ └── permutohedral_cuda.cu │ │ │ ├── trainable_bilateral/ │ │ │ │ ├── bf_layer_cpu_backward.cpp │ │ │ │ ├── bf_layer_cpu_forward.cpp │ │ │ │ ├── bf_layer_gpu_backward.cu │ │ │ │ ├── bf_layer_gpu_forward.cu │ │ │ │ ├── trainable_bilateral.cpp │ │ │ │ └── trainable_bilateral.h │ │ │ └── trainable_joint_bilateral/ │ │ │ ├── jbf_layer_cpu_backward.cpp │ │ │ ├── jbf_layer_cpu_forward.cpp │ │ │ ├── jbf_layer_gpu_backward.cu │ │ │ ├── jbf_layer_gpu_forward.cu │ │ │ ├── trainable_joint_bilateral.cpp │ │ │ └── trainable_joint_bilateral.h │ │ ├── lltm/ │ │ │ ├── lltm.h │ │ │ ├── lltm_cpu.cpp │ │ │ └── lltm_cuda.cu │ │ ├── resample/ │ │ │ ├── bounds_common.h │ │ │ ├── interpolation_common.h │ │ │ ├── pushpull.h │ │ │ ├── pushpull_cpu.cpp │ │ │ └── pushpull_cuda.cu │ │ └── utils/ │ │ ├── common_utils.h │ │ ├── meta_macros.h │ │ ├── resample_utils.h │ │ ├── tensor_description.h │ │ └── tensor_indexing.h │ ├── data/ │ │ ├── __init__.py │ │ ├── box_utils.py │ │ ├── csv_saver.py │ │ ├── dataloader.py │ │ ├── dataset.py │ │ ├── dataset_summary.py │ │ ├── decathlon_datalist.py │ │ ├── fft_utils.py │ │ ├── folder_layout.py │ │ ├── grid_dataset.py │ │ ├── image_dataset.py │ │ ├── image_reader.py │ │ ├── image_writer.py │ │ ├── iterable_dataset.py │ │ ├── itk_torch_bridge.py │ │ ├── meta_obj.py │ │ ├── meta_tensor.py │ │ ├── samplers.py │ │ ├── synthetic.py │ │ ├── test_time_augmentation.py │ │ ├── thread_buffer.py │ │ ├── torchscript_utils.py │ │ ├── ultrasound_confidence_map.py │ │ ├── utils.py │ │ ├── video_dataset.py │ │ ├── wsi_datasets.py │ │ └── wsi_reader.py │ ├── engines/ │ │ ├── __init__.py │ │ ├── evaluator.py │ │ ├── trainer.py │ │ ├── utils.py │ │ └── workflow.py │ ├── fl/ │ │ ├── __init__.py │ │ ├── client/ │ │ │ ├── __init__.py │ │ │ ├── client_algo.py │ │ │ └── monai_algo.py │ │ └── utils/ │ │ ├── __init__.py │ │ ├── constants.py │ │ ├── exchange_object.py │ │ └── filters.py │ ├── handlers/ │ │ ├── __init__.py │ │ ├── average_precision.py │ │ ├── calibration.py │ │ ├── checkpoint_loader.py │ │ ├── checkpoint_saver.py │ │ ├── classification_saver.py │ │ ├── clearml_handlers.py │ │ ├── confusion_matrix.py │ │ ├── decollate_batch.py │ │ ├── earlystop_handler.py │ │ ├── garbage_collector.py │ │ ├── hausdorff_distance.py │ │ ├── ignite_metric.py │ │ ├── logfile_handler.py │ │ ├── lr_schedule_handler.py │ │ ├── mean_dice.py │ │ ├── mean_iou.py │ │ ├── metric_logger.py │ │ ├── metrics_reloaded_handler.py │ │ ├── metrics_saver.py │ │ ├── mlflow_handler.py │ │ ├── nvtx_handlers.py │ │ ├── panoptic_quality.py │ │ ├── parameter_scheduler.py │ │ ├── postprocessing.py │ │ ├── probability_maps.py │ │ ├── regression_metrics.py │ │ ├── roc_auc.py │ │ ├── smartcache_handler.py │ │ ├── stats_handler.py │ │ ├── surface_distance.py │ │ ├── tensorboard_handlers.py │ │ ├── trt_handler.py │ │ ├── utils.py │ │ └── validation_handler.py │ ├── inferers/ │ │ ├── __init__.py │ │ ├── inferer.py │ │ ├── merger.py │ │ ├── splitter.py │ │ └── utils.py │ ├── losses/ │ │ ├── __init__.py │ │ ├── adversarial_loss.py │ │ ├── barlow_twins.py │ │ ├── cldice.py │ │ ├── contrastive.py │ │ ├── deform.py │ │ ├── dice.py │ │ ├── ds_loss.py │ │ ├── focal_loss.py │ │ ├── giou_loss.py │ │ ├── hausdorff_loss.py │ │ ├── image_dissimilarity.py │ │ ├── multi_scale.py │ │ ├── nacl_loss.py │ │ ├── perceptual.py │ │ ├── spatial_mask.py │ │ ├── spectral_loss.py │ │ ├── ssim_loss.py │ │ ├── sure_loss.py │ │ ├── tversky.py │ │ ├── unified_focal_loss.py │ │ └── utils.py │ ├── metrics/ │ │ ├── __init__.py │ │ ├── active_learning_metrics.py │ │ ├── average_precision.py │ │ ├── calibration.py │ │ ├── confusion_matrix.py │ │ ├── cumulative_average.py │ │ ├── f_beta_score.py │ │ ├── fid.py │ │ ├── froc.py │ │ ├── generalized_dice.py │ │ ├── hausdorff_distance.py │ │ ├── loss_metric.py │ │ ├── meandice.py │ │ ├── meaniou.py │ │ ├── metric.py │ │ ├── mmd.py │ │ ├── panoptic_quality.py │ │ ├── regression.py │ │ ├── rocauc.py │ │ ├── surface_dice.py │ │ ├── surface_distance.py │ │ ├── utils.py │ │ └── wrapper.py │ ├── networks/ │ │ ├── __init__.py │ │ ├── blocks/ │ │ │ ├── __init__.py │ │ │ ├── acti_norm.py │ │ │ ├── activation.py │ │ │ ├── activation_checkpointing.py │ │ │ ├── aspp.py │ │ │ ├── attention_utils.py │ │ │ ├── backbone_fpn_utils.py │ │ │ ├── cablock.py │ │ │ ├── convolutions.py │ │ │ ├── crf.py │ │ │ ├── crossattention.py │ │ │ ├── denseblock.py │ │ │ ├── dints_block.py │ │ │ ├── downsample.py │ │ │ ├── dynunet_block.py │ │ │ ├── encoder.py │ │ │ ├── fcn.py │ │ │ ├── feature_pyramid_network.py │ │ │ ├── fft_utils_t.py │ │ │ ├── localnet_block.py │ │ │ ├── mednext_block.py │ │ │ ├── mlp.py │ │ │ ├── patchembedding.py │ │ │ ├── pos_embed_utils.py │ │ │ ├── regunet_block.py │ │ │ ├── rel_pos_embedding.py │ │ │ ├── segresnet_block.py │ │ │ ├── selfattention.py │ │ │ ├── spade_norm.py │ │ │ ├── spatialattention.py │ │ │ ├── squeeze_and_excitation.py │ │ │ ├── text_embedding.py │ │ │ ├── transformerblock.py │ │ │ ├── unetr_block.py │ │ │ ├── upsample.py │ │ │ └── warp.py │ │ ├── layers/ │ │ │ ├── __init__.py │ │ │ ├── conjugate_gradient.py │ │ │ ├── convutils.py │ │ │ ├── drop_path.py │ │ │ ├── factories.py │ │ │ ├── filtering.py │ │ │ ├── gmm.py │ │ │ ├── simplelayers.py │ │ │ ├── spatial_transforms.py │ │ │ ├── utils.py │ │ │ ├── vector_quantizer.py │ │ │ └── weight_init.py │ │ ├── nets/ │ │ │ ├── __init__.py │ │ │ ├── ahnet.py │ │ │ ├── attentionunet.py │ │ │ ├── autoencoder.py │ │ │ ├── autoencoderkl.py │ │ │ ├── basic_unet.py │ │ │ ├── basic_unetplusplus.py │ │ │ ├── cell_sam_wrapper.py │ │ │ ├── classifier.py │ │ │ ├── controlnet.py │ │ │ ├── daf3d.py │ │ │ ├── densenet.py │ │ │ ├── diffusion_model_unet.py │ │ │ ├── dints.py │ │ │ ├── dynunet.py │ │ │ ├── efficientnet.py │ │ │ ├── flexible_unet.py │ │ │ ├── fullyconnectednet.py │ │ │ ├── generator.py │ │ │ ├── highresnet.py │ │ │ ├── hovernet.py │ │ │ ├── masked_autoencoder_vit.py │ │ │ ├── mednext.py │ │ │ ├── milmodel.py │ │ │ ├── netadapter.py │ │ │ ├── patchgan_discriminator.py │ │ │ ├── quicknat.py │ │ │ ├── regressor.py │ │ │ ├── regunet.py │ │ │ ├── resnet.py │ │ │ ├── restormer.py │ │ │ ├── segresnet.py │ │ │ ├── segresnet_ds.py │ │ │ ├── senet.py │ │ │ ├── spade_autoencoderkl.py │ │ │ ├── spade_diffusion_model_unet.py │ │ │ ├── spade_network.py │ │ │ ├── swin_unetr.py │ │ │ ├── torchvision_fc.py │ │ │ ├── transchex.py │ │ │ ├── transformer.py │ │ │ ├── unet.py │ │ │ ├── unetr.py │ │ │ ├── varautoencoder.py │ │ │ ├── vista3d.py │ │ │ ├── vit.py │ │ │ ├── vitautoenc.py │ │ │ ├── vnet.py │ │ │ ├── voxelmorph.py │ │ │ └── vqvae.py │ │ ├── schedulers/ │ │ │ ├── __init__.py │ │ │ ├── ddim.py │ │ │ ├── ddpm.py │ │ │ ├── pndm.py │ │ │ ├── rectified_flow.py │ │ │ └── scheduler.py │ │ ├── trt_compiler.py │ │ └── utils.py │ ├── optimizers/ │ │ ├── __init__.py │ │ ├── lr_finder.py │ │ ├── lr_scheduler.py │ │ ├── novograd.py │ │ └── utils.py │ ├── py.typed │ ├── torch.patch │ ├── transforms/ │ │ ├── __init__.py │ │ ├── adaptors.py │ │ ├── compose.py │ │ ├── croppad/ │ │ │ ├── __init__.py │ │ │ ├── array.py │ │ │ ├── batch.py │ │ │ ├── dictionary.py │ │ │ └── functional.py │ │ ├── intensity/ │ │ │ ├── __init__.py │ │ │ ├── array.py │ │ │ └── dictionary.py │ │ ├── inverse.py │ │ ├── inverse_batch_transform.py │ │ ├── io/ │ │ │ ├── __init__.py │ │ │ ├── array.py │ │ │ └── dictionary.py │ │ ├── lazy/ │ │ │ ├── __init__.py │ │ │ ├── array.py │ │ │ ├── dictionary.py │ │ │ ├── functional.py │ │ │ └── utils.py │ │ ├── meta_utility/ │ │ │ ├── __init__.py │ │ │ └── dictionary.py │ │ ├── nvtx.py │ │ ├── post/ │ │ │ ├── __init__.py │ │ │ ├── array.py │ │ │ └── dictionary.py │ │ ├── regularization/ │ │ │ ├── __init__.py │ │ │ ├── array.py │ │ │ └── dictionary.py │ │ ├── signal/ │ │ │ ├── __init__.py │ │ │ ├── array.py │ │ │ └── dictionary.py │ │ ├── smooth_field/ │ │ │ ├── __init__.py │ │ │ ├── array.py │ │ │ └── dictionary.py │ │ ├── spatial/ │ │ │ ├── __init__.py │ │ │ ├── array.py │ │ │ ├── dictionary.py │ │ │ └── functional.py │ │ ├── traits.py │ │ ├── transform.py │ │ ├── utility/ │ │ │ ├── __init__.py │ │ │ ├── array.py │ │ │ └── dictionary.py │ │ ├── utils.py │ │ ├── utils_create_transform_ims.py │ │ ├── utils_morphological_ops.py │ │ └── utils_pytorch_numpy_unification.py │ ├── utils/ │ │ ├── __init__.py │ │ ├── component_store.py │ │ ├── decorators.py │ │ ├── deprecate_utils.py │ │ ├── dist.py │ │ ├── enums.py │ │ ├── jupyter_utils.py │ │ ├── misc.py │ │ ├── module.py │ │ ├── nvtx.py │ │ ├── ordering.py │ │ ├── profiling.py │ │ ├── state_cacher.py │ │ ├── tf32.py │ │ └── type_conversion.py │ └── visualize/ │ ├── __init__.py │ ├── class_activation_maps.py │ ├── gradient_based.py │ ├── img2tensorboard.py │ ├── occlusion_sensitivity.py │ ├── utils.py │ └── visualizer.py ├── pyproject.toml ├── requirements-dev.txt ├── requirements-min.txt ├── requirements.txt ├── runtests.sh ├── setup.cfg ├── setup.py ├── tests/ │ ├── __init__.py │ ├── apps/ │ │ ├── __init__.py │ │ ├── deepedit/ │ │ │ ├── __init__.py │ │ │ └── test_deepedit_transforms.py │ │ ├── deepgrow/ │ │ │ ├── __init__.py │ │ │ ├── test_deepgrow_dataset.py │ │ │ └── transforms/ │ │ │ ├── __init__.py │ │ │ ├── test_deepgrow_interaction.py │ │ │ └── test_deepgrow_transforms.py │ │ ├── detection/ │ │ │ ├── __init__.py │ │ │ ├── metrics/ │ │ │ │ ├── __init__.py │ │ │ │ └── test_detection_coco_metrics.py │ │ │ ├── networks/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_retinanet.py │ │ │ │ └── test_retinanet_detector.py │ │ │ ├── test_box_transform.py │ │ │ └── utils/ │ │ │ ├── __init__.py │ │ │ ├── test_anchor_box.py │ │ │ ├── test_atss_box_matcher.py │ │ │ ├── test_box_coder.py │ │ │ ├── test_detector_boxselector.py │ │ │ ├── test_detector_utils.py │ │ │ └── test_hardnegsampler.py │ │ ├── maisi/ │ │ │ └── networks/ │ │ │ ├── __init__.py │ │ │ ├── test_autoencoderkl_maisi.py │ │ │ ├── test_controlnet_maisi.py │ │ │ └── test_diffusion_model_unet_maisi.py │ │ ├── nuclick/ │ │ │ ├── __init__.py │ │ │ └── test_nuclick_transforms.py │ │ ├── pathology/ │ │ │ ├── __init__.py │ │ │ ├── handlers/ │ │ │ │ ├── __init__.py │ │ │ │ └── test_from_engine_hovernet.py │ │ │ ├── test_lesion_froc.py │ │ │ ├── test_pathology_prob_nms.py │ │ │ ├── test_prepare_batch_hovernet.py │ │ │ ├── test_sliding_window_hovernet_inference.py │ │ │ └── transforms/ │ │ │ ├── __init__.py │ │ │ ├── post/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_generate_distance_map.py │ │ │ │ ├── test_generate_distance_mapd.py │ │ │ │ ├── test_generate_instance_border.py │ │ │ │ ├── test_generate_instance_borderd.py │ │ │ │ ├── test_generate_instance_centroid.py │ │ │ │ ├── test_generate_instance_centroidd.py │ │ │ │ ├── test_generate_instance_contour.py │ │ │ │ ├── test_generate_instance_contourd.py │ │ │ │ ├── test_generate_instance_type.py │ │ │ │ ├── test_generate_instance_typed.py │ │ │ │ ├── test_generate_succinct_contour.py │ │ │ │ ├── test_generate_succinct_contourd.py │ │ │ │ ├── test_generate_watershed_markers.py │ │ │ │ ├── test_generate_watershed_markersd.py │ │ │ │ ├── test_generate_watershed_mask.py │ │ │ │ ├── test_generate_watershed_maskd.py │ │ │ │ ├── test_hovernet_instance_map_post_processing.py │ │ │ │ ├── test_hovernet_instance_map_post_processingd.py │ │ │ │ ├── test_hovernet_nuclear_type_post_processing.py │ │ │ │ ├── test_watershed.py │ │ │ │ └── test_watershedd.py │ │ │ ├── test_pathology_he_stain.py │ │ │ └── test_pathology_he_stain_dict.py │ │ ├── reconstruction/ │ │ │ ├── __init__.py │ │ │ ├── nets/ │ │ │ │ ├── __init__.py │ │ │ │ └── test_recon_net_utils.py │ │ │ ├── test_complex_utils.py │ │ │ ├── test_fastmri_reader.py │ │ │ ├── test_mri_utils.py │ │ │ └── transforms/ │ │ │ ├── __init__.py │ │ │ ├── test_kspace_mask.py │ │ │ ├── test_reference_based_normalize_intensity.py │ │ │ └── test_reference_based_spatial_cropd.py │ │ ├── test_auto3dseg.py │ │ ├── test_auto3dseg_bundlegen.py │ │ ├── test_check_hash.py │ │ ├── test_cross_validation.py │ │ ├── test_decathlondataset.py │ │ ├── test_download_and_extract.py │ │ ├── test_download_url_yandex.py │ │ ├── test_mednistdataset.py │ │ ├── test_mmar_download.py │ │ ├── test_tciadataset.py │ │ └── vista3d/ │ │ ├── __init__.py │ │ ├── test_point_based_window_inferer.py │ │ ├── test_vista3d_sampler.py │ │ └── test_vista3d_transforms.py │ ├── bundle/ │ │ ├── __init__.py │ │ ├── test_bundle_ckpt_export.py │ │ ├── test_bundle_download.py │ │ ├── test_bundle_get_data.py │ │ ├── test_bundle_push_to_hf_hub.py │ │ ├── test_bundle_trt_export.py │ │ ├── test_bundle_utils.py │ │ ├── test_bundle_verify_metadata.py │ │ ├── test_bundle_verify_net.py │ │ ├── test_bundle_workflow.py │ │ ├── test_component_locator.py │ │ ├── test_config_item.py │ │ ├── test_config_parser.py │ │ └── test_reference_resolver.py │ ├── clang_format_utils.py │ ├── config/ │ │ ├── __init__.py │ │ ├── test_cv2_dist.py │ │ └── test_print_info.py │ ├── croppers.py │ ├── data/ │ │ ├── meta_tensor/ │ │ │ ├── test_meta_tensor.py │ │ │ └── test_to_from_meta_tensord.py │ │ ├── test_arraydataset.py │ │ ├── test_box_utils.py │ │ ├── test_cachedataset.py │ │ ├── test_cachedataset_parallel.py │ │ ├── test_cachedataset_persistent_workers.py │ │ ├── test_cachentransdataset.py │ │ ├── test_check_missing_files.py │ │ ├── test_create_cross_validation_datalist.py │ │ ├── test_csv_dataset.py │ │ ├── test_csv_iterable_dataset.py │ │ ├── test_csv_saver.py │ │ ├── test_dataloader.py │ │ ├── test_dataset.py │ │ ├── test_dataset_func.py │ │ ├── test_dataset_summary.py │ │ ├── test_fft_utils.py │ │ ├── test_folder_layout.py │ │ ├── test_gdsdataset.py │ │ ├── test_grid_dataset.py │ │ ├── test_handler_smartcache.py │ │ ├── test_hashing.py │ │ ├── test_header_correct.py │ │ ├── test_image_dataset.py │ │ ├── test_image_rw.py │ │ ├── test_init_reader.py │ │ ├── test_is_supported_format.py │ │ ├── test_iterable_dataset.py │ │ ├── test_itk_torch_bridge.py │ │ ├── test_itk_writer.py │ │ ├── test_list_data_collate.py │ │ ├── test_lmdbdataset.py │ │ ├── test_lmdbdataset_dist.py │ │ ├── test_load_decathlon_datalist.py │ │ ├── test_make_nifti.py │ │ ├── test_mapping_file.py │ │ ├── test_masked_patch_wsi_dataset.py │ │ ├── test_nifti_header_revise.py │ │ ├── test_nifti_rw.py │ │ ├── test_npzdictitemdataset.py │ │ ├── test_nrrd_reader.py │ │ ├── test_numpy_reader.py │ │ ├── test_partition_dataset.py │ │ ├── test_partition_dataset_classes.py │ │ ├── test_patch_dataset.py │ │ ├── test_patch_wsi_dataset.py │ │ ├── test_persistentdataset.py │ │ ├── test_persistentdataset_dist.py │ │ ├── test_pil_reader.py │ │ ├── test_png_rw.py │ │ ├── test_resample_datalist.py │ │ ├── test_sampler_dist.py │ │ ├── test_select_cross_validation_folds.py │ │ ├── test_shuffle_buffer.py │ │ ├── test_sliding_patch_wsi_dataset.py │ │ ├── test_smartcachedataset.py │ │ ├── test_synthetic.py │ │ ├── test_thread_buffer.py │ │ ├── test_threadcontainer.py │ │ ├── test_video_datasets.py │ │ ├── test_weighted_random_sampler_dist.py │ │ ├── test_zipdataset.py │ │ └── utils/ │ │ ├── test_decollate.py │ │ ├── test_dev_collate.py │ │ ├── test_file_basename.py │ │ ├── test_ori_ras_lps.py │ │ └── test_zoom_affine.py │ ├── engines/ │ │ ├── __init__.py │ │ ├── test_ensemble_evaluator.py │ │ ├── test_prepare_batch_default.py │ │ ├── test_prepare_batch_default_dist.py │ │ ├── test_prepare_batch_diffusion.py │ │ └── test_prepare_batch_extra_input.py │ ├── fl/ │ │ ├── __init__.py │ │ ├── monai_algo/ │ │ │ ├── __init__.py │ │ │ ├── test_fl_monai_algo.py │ │ │ └── test_fl_monai_algo_dist.py │ │ ├── test_fl_monai_algo_stats.py │ │ └── utils/ │ │ ├── __init__.py │ │ └── test_fl_exchange_object.py │ ├── handlers/ │ │ ├── __init__.py │ │ ├── test_handler_average_precision.py │ │ ├── test_handler_calibration_error.py │ │ ├── test_handler_checkpoint_loader.py │ │ ├── test_handler_checkpoint_saver.py │ │ ├── test_handler_classification_saver.py │ │ ├── test_handler_classification_saver_dist.py │ │ ├── test_handler_clearml_image.py │ │ ├── test_handler_clearml_stats.py │ │ ├── test_handler_confusion_matrix.py │ │ ├── test_handler_confusion_matrix_dist.py │ │ ├── test_handler_decollate_batch.py │ │ ├── test_handler_early_stop.py │ │ ├── test_handler_garbage_collector.py │ │ ├── test_handler_hausdorff_distance.py │ │ ├── test_handler_ignite_metric.py │ │ ├── test_handler_lr_scheduler.py │ │ ├── test_handler_mean_dice.py │ │ ├── test_handler_mean_iou.py │ │ ├── test_handler_metrics_reloaded.py │ │ ├── test_handler_metrics_saver.py │ │ ├── test_handler_metrics_saver_dist.py │ │ ├── test_handler_mlflow.py │ │ ├── test_handler_nvtx.py │ │ ├── test_handler_panoptic_quality.py │ │ ├── test_handler_parameter_scheduler.py │ │ ├── test_handler_post_processing.py │ │ ├── test_handler_prob_map_producer.py │ │ ├── test_handler_regression_metrics.py │ │ ├── test_handler_regression_metrics_dist.py │ │ ├── test_handler_rocauc.py │ │ ├── test_handler_rocauc_dist.py │ │ ├── test_handler_stats.py │ │ ├── test_handler_surface_distance.py │ │ ├── test_handler_tb_image.py │ │ ├── test_handler_tb_stats.py │ │ ├── test_handler_validation.py │ │ ├── test_trt_compile.py │ │ └── test_write_metrics_reports.py │ ├── hvd_evenly_divisible_all_gather.py │ ├── inferers/ │ │ ├── __init__.py │ │ ├── test_avg_merger.py │ │ ├── test_controlnet_inferers.py │ │ ├── test_diffusion_inferer.py │ │ ├── test_latent_diffusion_inferer.py │ │ ├── test_patch_inferer.py │ │ ├── test_saliency_inferer.py │ │ ├── test_slice_inferer.py │ │ ├── test_sliding_window_inference.py │ │ ├── test_sliding_window_splitter.py │ │ ├── test_wsi_sliding_window_splitter.py │ │ └── test_zarr_avg_merger.py │ ├── integration/ │ │ ├── __init__.py │ │ ├── test_auto3dseg_ensemble.py │ │ ├── test_auto3dseg_hpo.py │ │ ├── test_deepedit_interaction.py │ │ ├── test_hovernet_nuclear_type_post_processingd.py │ │ ├── test_integration_autorunner.py │ │ ├── test_integration_bundle_run.py │ │ ├── test_integration_classification_2d.py │ │ ├── test_integration_determinism.py │ │ ├── test_integration_fast_train.py │ │ ├── test_integration_gpu_customization.py │ │ ├── test_integration_lazy_samples.py │ │ ├── test_integration_nnunet_bundle.py │ │ ├── test_integration_nnunetv2_runner.py │ │ ├── test_integration_segmentation_3d.py │ │ ├── test_integration_sliding_window.py │ │ ├── test_integration_stn.py │ │ ├── test_integration_unet_2d.py │ │ ├── test_integration_workers.py │ │ ├── test_integration_workflows.py │ │ ├── test_integration_workflows_adversarial.py │ │ ├── test_integration_workflows_gan.py │ │ ├── test_loader_semaphore.py │ │ ├── test_mapping_filed.py │ │ ├── test_meta_affine.py │ │ ├── test_metatensor_integration.py │ │ ├── test_module_list.py │ │ ├── test_one_of.py │ │ ├── test_pad_collation.py │ │ ├── test_reg_loss_integration.py │ │ ├── test_retinanet_predict_utils.py │ │ ├── test_seg_loss_integration.py │ │ ├── test_spatial_combine_transforms.py │ │ ├── test_testtimeaugmentation.py │ │ ├── test_vis_gradbased.py │ │ └── test_vista3d_utils.py │ ├── lazy_transforms_utils.py │ ├── losses/ │ │ ├── __init__.py │ │ ├── deform/ │ │ │ ├── __init__.py │ │ │ ├── test_bending_energy.py │ │ │ └── test_diffusion_loss.py │ │ ├── image_dissimilarity/ │ │ │ ├── __init__.py │ │ │ ├── test_global_mutual_information_loss.py │ │ │ └── test_local_normalized_cross_correlation_loss.py │ │ ├── test_adversarial_loss.py │ │ ├── test_barlow_twins_loss.py │ │ ├── test_cldice_loss.py │ │ ├── test_contrastive_loss.py │ │ ├── test_dice_ce_loss.py │ │ ├── test_dice_focal_loss.py │ │ ├── test_dice_loss.py │ │ ├── test_ds_loss.py │ │ ├── test_focal_loss.py │ │ ├── test_generalized_dice_focal_loss.py │ │ ├── test_generalized_dice_loss.py │ │ ├── test_generalized_wasserstein_dice_loss.py │ │ ├── test_giou_loss.py │ │ ├── test_hausdorff_loss.py │ │ ├── test_masked_dice_loss.py │ │ ├── test_masked_loss.py │ │ ├── test_multi_scale.py │ │ ├── test_nacl_loss.py │ │ ├── test_perceptual_loss.py │ │ ├── test_spectral_loss.py │ │ ├── test_ssim_loss.py │ │ ├── test_sure_loss.py │ │ ├── test_tversky_loss.py │ │ └── test_unified_focal_loss.py │ ├── metrics/ │ │ ├── __init__.py │ │ ├── test_calibration_metric.py │ │ ├── test_compute_average_precision.py │ │ ├── test_compute_confusion_matrix.py │ │ ├── test_compute_f_beta.py │ │ ├── test_compute_fid_metric.py │ │ ├── test_compute_froc.py │ │ ├── test_compute_generalized_dice.py │ │ ├── test_compute_meandice.py │ │ ├── test_compute_meaniou.py │ │ ├── test_compute_mmd_metric.py │ │ ├── test_compute_multiscalessim_metric.py │ │ ├── test_compute_panoptic_quality.py │ │ ├── test_compute_regression_metrics.py │ │ ├── test_compute_roc_auc.py │ │ ├── test_compute_variance.py │ │ ├── test_cumulative.py │ │ ├── test_cumulative_average.py │ │ ├── test_cumulative_average_dist.py │ │ ├── test_hausdorff_distance.py │ │ ├── test_label_quality_score.py │ │ ├── test_loss_metric.py │ │ ├── test_metrics_reloaded.py │ │ ├── test_ssim_metric.py │ │ ├── test_surface_dice.py │ │ └── test_surface_distance.py │ ├── min_tests.py │ ├── networks/ │ │ ├── __init__.py │ │ ├── blocks/ │ │ │ ├── __init__.py │ │ │ ├── dints_block/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_acn_block.py │ │ │ │ ├── test_factorized_increase.py │ │ │ │ ├── test_factorized_reduce.py │ │ │ │ └── test_p3d_block.py │ │ │ ├── test_CABlock.py │ │ │ ├── test_adn.py │ │ │ ├── test_convolutions.py │ │ │ ├── test_crf_cpu.py │ │ │ ├── test_crf_cuda.py │ │ │ ├── test_crossattention.py │ │ │ ├── test_denseblock.py │ │ │ ├── test_downsample_block.py │ │ │ ├── test_dynunet_block.py │ │ │ ├── test_fpn_block.py │ │ │ ├── test_localnet_block.py │ │ │ ├── test_mlp.py │ │ │ ├── test_patchembedding.py │ │ │ ├── test_regunet_block.py │ │ │ ├── test_se_block.py │ │ │ ├── test_se_blocks.py │ │ │ ├── test_segresnet_block.py │ │ │ ├── test_selfattention.py │ │ │ ├── test_simple_aspp.py │ │ │ ├── test_spatialattention.py │ │ │ ├── test_subpixel_upsample.py │ │ │ ├── test_text_encoding.py │ │ │ ├── test_transformerblock.py │ │ │ ├── test_unetr_block.py │ │ │ ├── test_upsample_block.py │ │ │ └── warp/ │ │ │ ├── __init__.py │ │ │ ├── test_dvf2ddf.py │ │ │ └── test_warp.py │ │ ├── layers/ │ │ │ ├── __init__.py │ │ │ ├── filtering/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_bilateral_approx_cpu.py │ │ │ │ ├── test_bilateral_approx_cuda.py │ │ │ │ ├── test_bilateral_precise.py │ │ │ │ ├── test_phl_cpu.py │ │ │ │ ├── test_phl_cuda.py │ │ │ │ ├── test_trainable_bilateral.py │ │ │ │ └── test_trainable_joint_bilateral.py │ │ │ ├── test_affine_transform.py │ │ │ ├── test_apply_filter.py │ │ │ ├── test_channel_pad.py │ │ │ ├── test_conjugate_gradient.py │ │ │ ├── test_drop_path.py │ │ │ ├── test_gaussian.py │ │ │ ├── test_gaussian_filter.py │ │ │ ├── test_get_layers.py │ │ │ ├── test_gmm.py │ │ │ ├── test_grid_pull.py │ │ │ ├── test_hilbert_transform.py │ │ │ ├── test_lltm.py │ │ │ ├── test_median_filter.py │ │ │ ├── test_polyval.py │ │ │ ├── test_preset_filters.py │ │ │ ├── test_savitzky_golay_filter.py │ │ │ ├── test_separable_filter.py │ │ │ ├── test_skip_connection.py │ │ │ ├── test_vector_quantizer.py │ │ │ └── test_weight_init.py │ │ ├── nets/ │ │ │ ├── __init__.py │ │ │ ├── dints/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_dints_cell.py │ │ │ │ └── test_dints_mixop.py │ │ │ ├── regunet/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_localnet.py │ │ │ │ └── test_regunet.py │ │ │ ├── test_ahnet.py │ │ │ ├── test_attentionunet.py │ │ │ ├── test_autoencoder.py │ │ │ ├── test_autoencoderkl.py │ │ │ ├── test_basic_unet.py │ │ │ ├── test_basic_unetplusplus.py │ │ │ ├── test_bundle_init_bundle.py │ │ │ ├── test_cell_sam_wrapper.py │ │ │ ├── test_checkpointunet.py │ │ │ ├── test_controlnet.py │ │ │ ├── test_daf3d.py │ │ │ ├── test_densenet.py │ │ │ ├── test_diffusion_model_unet.py │ │ │ ├── test_dints_network.py │ │ │ ├── test_discriminator.py │ │ │ ├── test_dynunet.py │ │ │ ├── test_efficientnet.py │ │ │ ├── test_flexible_unet.py │ │ │ ├── test_fullyconnectednet.py │ │ │ ├── test_generator.py │ │ │ ├── test_globalnet.py │ │ │ ├── test_highresnet.py │ │ │ ├── test_hovernet.py │ │ │ ├── test_masked_autoencoder_vit.py │ │ │ ├── test_mednext.py │ │ │ ├── test_milmodel.py │ │ │ ├── test_net_adapter.py │ │ │ ├── test_network_consistency.py │ │ │ ├── test_patch_gan_dicriminator.py │ │ │ ├── test_quicknat.py │ │ │ ├── test_resnet.py │ │ │ ├── test_restormer.py │ │ │ ├── test_segresnet.py │ │ │ ├── test_segresnet_ds.py │ │ │ ├── test_senet.py │ │ │ ├── test_spade_autoencoderkl.py │ │ │ ├── test_spade_diffusion_model_unet.py │ │ │ ├── test_spade_vaegan.py │ │ │ ├── test_swin_unetr.py │ │ │ ├── test_torchvision_fc_model.py │ │ │ ├── test_transchex.py │ │ │ ├── test_transformer.py │ │ │ ├── test_unet.py │ │ │ ├── test_unetr.py │ │ │ ├── test_varautoencoder.py │ │ │ ├── test_vista3d.py │ │ │ ├── test_vit.py │ │ │ ├── test_vitautoenc.py │ │ │ ├── test_vnet.py │ │ │ ├── test_voxelmorph.py │ │ │ ├── test_vqvae.py │ │ │ └── test_vqvaetransformer_inferer.py │ │ ├── schedulers/ │ │ │ ├── __init__.py │ │ │ ├── test_scheduler_ddim.py │ │ │ ├── test_scheduler_ddpm.py │ │ │ ├── test_scheduler_pndm.py │ │ │ └── test_scheduler_rflow.py │ │ ├── test_bundle_onnx_export.py │ │ ├── test_convert_to_onnx.py │ │ ├── test_convert_to_torchscript.py │ │ ├── test_convert_to_trt.py │ │ ├── test_save_state.py │ │ ├── test_to_onehot.py │ │ ├── test_varnet.py │ │ └── utils/ │ │ ├── __init__.py │ │ ├── test_copy_model_state.py │ │ ├── test_eval_mode.py │ │ ├── test_freeze_layers.py │ │ ├── test_pixelunshuffle.py │ │ ├── test_replace_module.py │ │ └── test_train_mode.py │ ├── nonconfig_workflow.py │ ├── optimizers/ │ │ ├── __init__.py │ │ ├── test_generate_param_groups.py │ │ ├── test_lr_finder.py │ │ ├── test_lr_scheduler.py │ │ └── test_optim_novograd.py │ ├── padders.py │ ├── profile_subclass/ │ │ ├── README.md │ │ ├── __init__.py │ │ ├── cprofile_profiling.py │ │ ├── min_classes.py │ │ ├── profiling.py │ │ └── pyspy_profiling.py │ ├── runner.py │ ├── test_call_dist.py │ ├── test_query_memory.py │ ├── test_timedcall_dist.py │ ├── test_utils.py │ ├── testing_data/ │ │ ├── 1D_BP_bwd.txt │ │ ├── 1D_BP_fwd.txt │ │ ├── CT_DICOM/ │ │ │ ├── 7106 │ │ │ ├── 7136 │ │ │ ├── 7166 │ │ │ └── 7196 │ │ ├── anatomical.nii │ │ ├── bundle_test_network.py │ │ ├── config_fl_evaluate.json │ │ ├── config_fl_filters.json │ │ ├── config_fl_stats_1.json │ │ ├── config_fl_stats_2.json │ │ ├── config_fl_train.json │ │ ├── cpp_resample_answers.py │ │ ├── data_config.json │ │ ├── fl_infer_properties.json │ │ ├── inference.json │ │ ├── inference.yaml │ │ ├── integration_answers.py │ │ ├── logging.conf │ │ ├── metadata.json │ │ ├── multi_gpu_evaluate.json │ │ ├── multi_gpu_train.json │ │ ├── python_workflow_properties.json │ │ ├── reoriented_anat_moved.nii │ │ ├── responsive_inference.json │ │ ├── signal.npy │ │ ├── transform_metatensor_cases.yaml │ │ └── ultrasound_confidence_map/ │ │ ├── femur_result.npy │ │ └── neck_result.npy │ ├── transforms/ │ │ ├── __init__.py │ │ ├── compose/ │ │ │ ├── __init__.py │ │ │ ├── test_compose.py │ │ │ └── test_some_of.py │ │ ├── croppad/ │ │ │ ├── __init__.py │ │ │ ├── test_pad_nd_dtypes.py │ │ │ ├── test_rand_weighted_crop.py │ │ │ └── test_rand_weighted_cropd.py │ │ ├── functional/ │ │ │ ├── __init__.py │ │ │ ├── test_apply.py │ │ │ └── test_resample.py │ │ ├── intensity/ │ │ │ ├── __init__.py │ │ │ ├── test_compute_ho_ver_maps.py │ │ │ ├── test_compute_ho_ver_maps_d.py │ │ │ ├── test_foreground_mask.py │ │ │ ├── test_foreground_maskd.py │ │ │ ├── test_rand_histogram_shiftd.py │ │ │ ├── test_scale_intensity_range_percentiles.py │ │ │ └── test_scale_intensity_range_percentilesd.py │ │ ├── inverse/ │ │ │ ├── __init__.py │ │ │ ├── test_inverse.py │ │ │ ├── test_inverse_array.py │ │ │ ├── test_inverse_dict.py │ │ │ ├── test_invert.py │ │ │ ├── test_invertd.py │ │ │ └── test_traceable_transform.py │ │ ├── post/ │ │ │ ├── __init__.py │ │ │ ├── test_label_filterd.py │ │ │ ├── test_probnms.py │ │ │ ├── test_probnmsd.py │ │ │ └── test_remove_small_objects.py │ │ ├── spatial/ │ │ │ ├── __init__.py │ │ │ ├── test_convert_box_points.py │ │ │ ├── test_grid_patch.py │ │ │ ├── test_grid_patchd.py │ │ │ ├── test_rand_grid_patch.py │ │ │ ├── test_rand_grid_patchd.py │ │ │ └── test_spatial_resampled.py │ │ ├── test_activations.py │ │ ├── test_activationsd.py │ │ ├── test_adaptors.py │ │ ├── test_add_coordinate_channels.py │ │ ├── test_add_coordinate_channelsd.py │ │ ├── test_add_extreme_points_channel.py │ │ ├── test_add_extreme_points_channeld.py │ │ ├── test_adjust_contrast.py │ │ ├── test_adjust_contrastd.py │ │ ├── test_affine.py │ │ ├── test_affine_grid.py │ │ ├── test_affined.py │ │ ├── test_as_channel_last.py │ │ ├── test_as_channel_lastd.py │ │ ├── test_as_discrete.py │ │ ├── test_as_discreted.py │ │ ├── test_border_pad.py │ │ ├── test_border_padd.py │ │ ├── test_bounding_rect.py │ │ ├── test_bounding_rectd.py │ │ ├── test_cast_to_type.py │ │ ├── test_cast_to_typed.py │ │ ├── test_center_scale_crop.py │ │ ├── test_center_scale_cropd.py │ │ ├── test_center_spatial_crop.py │ │ ├── test_center_spatial_cropd.py │ │ ├── test_classes_to_indices.py │ │ ├── test_classes_to_indicesd.py │ │ ├── test_clip_intensity_percentiles.py │ │ ├── test_clip_intensity_percentilesd.py │ │ ├── test_compose_get_number_conversions.py │ │ ├── test_concat_itemsd.py │ │ ├── test_convert_to_multi_channel.py │ │ ├── test_convert_to_multi_channeld.py │ │ ├── test_copy_itemsd.py │ │ ├── test_create_grid_and_affine.py │ │ ├── test_crop_foreground.py │ │ ├── test_crop_foregroundd.py │ │ ├── test_cucim_dict_transform.py │ │ ├── test_cucim_transform.py │ │ ├── test_data_stats.py │ │ ├── test_data_statsd.py │ │ ├── test_delete_itemsd.py │ │ ├── test_detect_envelope.py │ │ ├── test_distance_transform_edt.py │ │ ├── test_divisible_pad.py │ │ ├── test_divisible_padd.py │ │ ├── test_ensure_channel_first.py │ │ ├── test_ensure_channel_firstd.py │ │ ├── test_ensure_type.py │ │ ├── test_ensure_typed.py │ │ ├── test_fg_bg_to_indices.py │ │ ├── test_fg_bg_to_indicesd.py │ │ ├── test_fill_holes.py │ │ ├── test_fill_holesd.py │ │ ├── test_flatten_sub_keysd.py │ │ ├── test_flip.py │ │ ├── test_flipd.py │ │ ├── test_fourier.py │ │ ├── test_gaussian_sharpen.py │ │ ├── test_gaussian_sharpend.py │ │ ├── test_gaussian_smooth.py │ │ ├── test_gaussian_smoothd.py │ │ ├── test_generate_heatmap.py │ │ ├── test_generate_heatmapd.py │ │ ├── test_generate_label_classes_crop_centers.py │ │ ├── test_generate_pos_neg_label_crop_centers.py │ │ ├── test_generate_spatial_bounding_box.py │ │ ├── test_get_extreme_points.py │ │ ├── test_gibbs_noise.py │ │ ├── test_gibbs_noised.py │ │ ├── test_grid_distortion.py │ │ ├── test_grid_distortiond.py │ │ ├── test_grid_split.py │ │ ├── test_grid_splitd.py │ │ ├── test_histogram_normalize.py │ │ ├── test_histogram_normalized.py │ │ ├── test_image_filter.py │ │ ├── test_intensity_stats.py │ │ ├── test_intensity_statsd.py │ │ ├── test_inverse_collation.py │ │ ├── test_k_space_spike_noise.py │ │ ├── test_k_space_spike_noised.py │ │ ├── test_keep_largest_connected_component.py │ │ ├── test_keep_largest_connected_componentd.py │ │ ├── test_label_filter.py │ │ ├── test_label_to_contour.py │ │ ├── test_label_to_contourd.py │ │ ├── test_label_to_mask.py │ │ ├── test_label_to_maskd.py │ │ ├── test_load_image.py │ │ ├── test_load_imaged.py │ │ ├── test_load_spacing_orientation.py │ │ ├── test_map_and_generate_sampling_centers.py │ │ ├── test_map_binary_to_indices.py │ │ ├── test_map_classes_to_indices.py │ │ ├── test_map_label_value.py │ │ ├── test_map_label_valued.py │ │ ├── test_map_transform.py │ │ ├── test_mask_intensity.py │ │ ├── test_mask_intensityd.py │ │ ├── test_mean_ensemble.py │ │ ├── test_mean_ensembled.py │ │ ├── test_median_smooth.py │ │ ├── test_median_smoothd.py │ │ ├── test_morphological_ops.py │ │ ├── test_nifti_endianness.py │ │ ├── test_normalize_intensity.py │ │ ├── test_normalize_intensityd.py │ │ ├── test_nvtx_decorator.py │ │ ├── test_nvtx_transform.py │ │ ├── test_orientation.py │ │ ├── test_orientationd.py │ │ ├── test_rand_adjust_contrast.py │ │ ├── test_rand_adjust_contrastd.py │ │ ├── test_rand_affine.py │ │ ├── test_rand_affine_grid.py │ │ ├── test_rand_affined.py │ │ ├── test_rand_axis_flip.py │ │ ├── test_rand_axis_flipd.py │ │ ├── test_rand_bias_field.py │ │ ├── test_rand_bias_fieldd.py │ │ ├── test_rand_coarse_dropout.py │ │ ├── test_rand_coarse_dropoutd.py │ │ ├── test_rand_coarse_shuffle.py │ │ ├── test_rand_coarse_shuffled.py │ │ ├── test_rand_crop_by_label_classes.py │ │ ├── test_rand_crop_by_label_classesd.py │ │ ├── test_rand_crop_by_pos_neg_label.py │ │ ├── test_rand_crop_by_pos_neg_labeld.py │ │ ├── test_rand_cucim_dict_transform.py │ │ ├── test_rand_cucim_transform.py │ │ ├── test_rand_deform_grid.py │ │ ├── test_rand_elastic_2d.py │ │ ├── test_rand_elastic_3d.py │ │ ├── test_rand_elasticd_2d.py │ │ ├── test_rand_elasticd_3d.py │ │ ├── test_rand_flip.py │ │ ├── test_rand_flipd.py │ │ ├── test_rand_gaussian_noise.py │ │ ├── test_rand_gaussian_noised.py │ │ ├── test_rand_gaussian_sharpen.py │ │ ├── test_rand_gaussian_sharpend.py │ │ ├── test_rand_gaussian_smooth.py │ │ ├── test_rand_gaussian_smoothd.py │ │ ├── test_rand_gibbs_noise.py │ │ ├── test_rand_gibbs_noised.py │ │ ├── test_rand_grid_distortion.py │ │ ├── test_rand_grid_distortiond.py │ │ ├── test_rand_histogram_shift.py │ │ ├── test_rand_k_space_spike_noise.py │ │ ├── test_rand_k_space_spike_noised.py │ │ ├── test_rand_rician_noise.py │ │ ├── test_rand_rician_noised.py │ │ ├── test_rand_rotate.py │ │ ├── test_rand_rotate90.py │ │ ├── test_rand_rotate90d.py │ │ ├── test_rand_rotated.py │ │ ├── test_rand_scale_crop.py │ │ ├── test_rand_scale_cropd.py │ │ ├── test_rand_scale_intensity.py │ │ ├── test_rand_scale_intensity_fixed_mean.py │ │ ├── test_rand_scale_intensity_fixed_meand.py │ │ ├── test_rand_scale_intensityd.py │ │ ├── test_rand_shift_intensity.py │ │ ├── test_rand_shift_intensityd.py │ │ ├── test_rand_simulate_low_resolution.py │ │ ├── test_rand_simulate_low_resolutiond.py │ │ ├── test_rand_spatial_crop.py │ │ ├── test_rand_spatial_crop_samples.py │ │ ├── test_rand_spatial_crop_samplesd.py │ │ ├── test_rand_spatial_cropd.py │ │ ├── test_rand_std_shift_intensity.py │ │ ├── test_rand_std_shift_intensityd.py │ │ ├── test_rand_torchio.py │ │ ├── test_rand_torchiod.py │ │ ├── test_rand_zoom.py │ │ ├── test_rand_zoomd.py │ │ ├── test_randidentity.py │ │ ├── test_random_order.py │ │ ├── test_randtorchvisiond.py │ │ ├── test_regularization.py │ │ ├── test_remove_repeated_channel.py │ │ ├── test_remove_repeated_channeld.py │ │ ├── test_repeat_channel.py │ │ ├── test_repeat_channeld.py │ │ ├── test_resample_backends.py │ │ ├── test_resample_to_match.py │ │ ├── test_resample_to_matchd.py │ │ ├── test_resampler.py │ │ ├── test_resize.py │ │ ├── test_resize_with_pad_or_crop.py │ │ ├── test_resize_with_pad_or_cropd.py │ │ ├── test_resized.py │ │ ├── test_rotate.py │ │ ├── test_rotate90.py │ │ ├── test_rotate90d.py │ │ ├── test_rotated.py │ │ ├── test_save_classificationd.py │ │ ├── test_save_image.py │ │ ├── test_save_imaged.py │ │ ├── test_savitzky_golay_smooth.py │ │ ├── test_savitzky_golay_smoothd.py │ │ ├── test_scale_intensity.py │ │ ├── test_scale_intensity_fixed_mean.py │ │ ├── test_scale_intensity_range.py │ │ ├── test_scale_intensity_ranged.py │ │ ├── test_scale_intensityd.py │ │ ├── test_select_itemsd.py │ │ ├── test_shift_intensity.py │ │ ├── test_shift_intensityd.py │ │ ├── test_signal_continuouswavelet.py │ │ ├── test_signal_fillempty.py │ │ ├── test_signal_fillemptyd.py │ │ ├── test_signal_rand_add_gaussiannoise.py │ │ ├── test_signal_rand_add_sine.py │ │ ├── test_signal_rand_add_sine_partial.py │ │ ├── test_signal_rand_add_squarepulse.py │ │ ├── test_signal_rand_add_squarepulse_partial.py │ │ ├── test_signal_rand_drop.py │ │ ├── test_signal_rand_scale.py │ │ ├── test_signal_rand_shift.py │ │ ├── test_signal_remove_frequency.py │ │ ├── test_smooth_field.py │ │ ├── test_sobel_gradient.py │ │ ├── test_sobel_gradientd.py │ │ ├── test_spacing.py │ │ ├── test_spacingd.py │ │ ├── test_spatial_crop.py │ │ ├── test_spatial_cropd.py │ │ ├── test_spatial_pad.py │ │ ├── test_spatial_padd.py │ │ ├── test_spatial_resample.py │ │ ├── test_squeezedim.py │ │ ├── test_squeezedimd.py │ │ ├── test_std_shift_intensity.py │ │ ├── test_std_shift_intensityd.py │ │ ├── test_threshold_intensity.py │ │ ├── test_threshold_intensityd.py │ │ ├── test_to_contiguous.py │ │ ├── test_to_cupy.py │ │ ├── test_to_cupyd.py │ │ ├── test_to_device.py │ │ ├── test_to_deviced.py │ │ ├── test_to_numpy.py │ │ ├── test_to_numpyd.py │ │ ├── test_to_pil.py │ │ ├── test_to_pild.py │ │ ├── test_to_tensor.py │ │ ├── test_to_tensord.py │ │ ├── test_torchio.py │ │ ├── test_torchiod.py │ │ ├── test_torchvision.py │ │ ├── test_torchvisiond.py │ │ ├── test_transform.py │ │ ├── test_transpose.py │ │ ├── test_transposed.py │ │ ├── test_ultrasound_confidence_map_transform.py │ │ ├── test_utils_pytorch_numpy_unification.py │ │ ├── test_vote_ensemble.py │ │ ├── test_vote_ensembled.py │ │ ├── test_with_allow_missing_keys.py │ │ ├── test_zoom.py │ │ ├── test_zoomd.py │ │ ├── transform/ │ │ │ ├── __init__.py │ │ │ ├── test_randomizable.py │ │ │ └── test_randomizable_transform_type.py │ │ ├── utility/ │ │ │ ├── __init__.py │ │ │ ├── test_apply_transform_to_points.py │ │ │ ├── test_apply_transform_to_pointsd.py │ │ │ ├── test_identity.py │ │ │ ├── test_identityd.py │ │ │ ├── test_lambda.py │ │ │ ├── test_lambdad.py │ │ │ ├── test_rand_lambda.py │ │ │ ├── test_rand_lambdad.py │ │ │ ├── test_simulatedelay.py │ │ │ ├── test_simulatedelayd.py │ │ │ ├── test_splitdim.py │ │ │ └── test_splitdimd.py │ │ └── utils/ │ │ ├── __init__.py │ │ ├── test_correct_crop_centers.py │ │ ├── test_get_unique_labels.py │ │ ├── test_print_transform_backends.py │ │ └── test_soft_clip.py │ ├── utils/ │ │ ├── __init__.py │ │ ├── enums/ │ │ │ ├── __init__.py │ │ │ ├── test_hovernet_loss.py │ │ │ ├── test_ordering.py │ │ │ └── test_wsireader.py │ │ ├── misc/ │ │ │ ├── __init__.py │ │ │ ├── test_ensure_tuple.py │ │ │ ├── test_monai_env_vars.py │ │ │ ├── test_monai_utils_misc.py │ │ │ ├── test_str2bool.py │ │ │ └── test_str2list.py │ │ ├── test_alias.py │ │ ├── test_component_store.py │ │ ├── test_deprecated.py │ │ ├── test_enum_bound_interp.py │ │ ├── test_evenly_divisible_all_gather_dist.py │ │ ├── test_get_package_version.py │ │ ├── test_handler_logfile.py │ │ ├── test_handler_metric_logger.py │ │ ├── test_list_to_dict.py │ │ ├── test_look_up_option.py │ │ ├── test_optional_import.py │ │ ├── test_pad_mode.py │ │ ├── test_profiling.py │ │ ├── test_rankfilter_dist.py │ │ ├── test_require_pkg.py │ │ ├── test_sample_slices.py │ │ ├── test_set_determinism.py │ │ ├── test_squeeze_unsqueeze.py │ │ ├── test_state_cacher.py │ │ ├── test_torchscript_utils.py │ │ ├── test_version.py │ │ ├── test_version_after.py │ │ └── type_conversion/ │ │ ├── __init__.py │ │ ├── test_convert_data_type.py │ │ ├── test_get_equivalent_dtype.py │ │ └── test_safe_dtype_range.py │ └── visualize/ │ ├── __init__.py │ ├── test_img2tensorboard.py │ ├── test_occlusion_sensitivity.py │ ├── test_plot_2d_or_3d_image.py │ ├── test_vis_cam.py │ ├── test_vis_gradcam.py │ └── utils/ │ ├── __init__.py │ ├── test_blend_images.py │ └── test_matshow3d.py └── versioneer.py
Showing preview only (847K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (9683 symbols across 1180 files)
FILE: docs/source/conf.py
function generate_apidocs (line 58) | def generate_apidocs(*args):
function setup (line 163) | def setup(app):
function linkcode_resolve (line 191) | def linkcode_resolve(domain, info):
FILE: monai/__init__.py
function custom_warning_handler (line 24) | def custom_warning_handler(message, category, filename, lineno, file=Non...
class DeprecatedTypesWarningFilter (line 31) | class DeprecatedTypesWarningFilter(logging.Filter):
method filter (line 32) | def filter(self, record):
FILE: monai/_extensions/gmm/gmm.cpp
function init (line 18) | py::tuple init() {
function learn (line 25) | void learn(
function apply (line 54) | torch::Tensor apply(torch::Tensor gmm_tensor, torch::Tensor input_tensor) {
function PYBIND11_MODULE (line 79) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
FILE: monai/_extensions/gmm/gmm_cpu.cpp
function learn_cpu (line 18) | void learn_cpu(
function apply_cpu (line 28) | void apply_cpu(
FILE: monai/_extensions/loader.py
function timeout (line 30) | def timeout(time, message):
function load_module (line 49) | def load_module(
FILE: monai/_version.py
function get_keywords (line 22) | def get_keywords():
class VersioneerConfig (line 35) | class VersioneerConfig:
function get_config (line 39) | def get_config():
class NotThisMethod (line 53) | class NotThisMethod(Exception):
function register_vcs_handler (line 61) | def register_vcs_handler(vcs, method): # decorator
function run_command (line 72) | def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False,
function versions_from_parentdir (line 115) | def versions_from_parentdir(parentdir_prefix, root, verbose):
function git_get_keywords (line 140) | def git_get_keywords(versionfile_abs):
function git_versions_from_keywords (line 168) | def git_versions_from_keywords(keywords, tag_prefix, verbose):
function git_pieces_from_vcs (line 232) | def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command):
function plus_or_dot (line 364) | def plus_or_dot(pieces):
function render_pep440 (line 371) | def render_pep440(pieces):
function render_pep440_branch (line 396) | def render_pep440_branch(pieces):
function pep440_split_post (line 426) | def pep440_split_post(ver):
function render_pep440_pre (line 436) | def render_pep440_pre(pieces):
function render_pep440_post (line 460) | def render_pep440_post(pieces):
function render_pep440_post_branch (line 487) | def render_pep440_post_branch(pieces):
function render_pep440_old (line 516) | def render_pep440_old(pieces):
function render_git_describe (line 538) | def render_git_describe(pieces):
function render_git_describe_long (line 558) | def render_git_describe_long(pieces):
function render (line 578) | def render(pieces, style):
function get_versions (line 614) | def get_versions():
FILE: monai/apps/auto3dseg/auto_runner.py
class AutoRunner (line 40) | class AutoRunner:
method __init__ (line 210) | def __init__(
method read_cache (line 348) | def read_cache(self):
method export_cache (line 385) | def export_cache(self, **kwargs):
method inspect_datalist_folds (line 394) | def inspect_datalist_folds(self, datalist_filename: str) -> int:
method set_gpu_customization (line 462) | def set_gpu_customization(
method set_num_fold (line 501) | def set_num_fold(self, num_fold: int = 5) -> AutoRunner:
method set_training_params (line 520) | def set_training_params(self, params: dict[str, Any] | None = None) ->...
method set_device_info (line 542) | def set_device_info(
method set_ensemble_method (line 601) | def set_ensemble_method(self, ensemble_method_name: str = "AlgoEnsembl...
method set_image_save_transform (line 618) | def set_image_save_transform(self, **kwargs: Any) -> AutoRunner:
method set_prediction_params (line 639) | def set_prediction_params(self, params: dict[str, Any] | None = None) ...
method set_analyze_params (line 657) | def set_analyze_params(self, params: dict[str, Any] | None = None) -> ...
method set_hpo_params (line 673) | def set_hpo_params(self, params: dict[str, Any] | None = None) -> Auto...
method set_nni_search_space (line 701) | def set_nni_search_space(self, search_space: dict[str, Any]) -> AutoRu...
method _train_algo_in_sequence (line 720) | def _train_algo_in_sequence(self, history: list[dict[str, Any]]) -> None:
method _train_algo_in_nni (line 745) | def _train_algo_in_nni(self, history: list[dict[str, Any]]) -> None:
method run (line 812) | def run(self):
FILE: monai/apps/auto3dseg/bundle_gen.py
class BundleAlgo (line 53) | class BundleAlgo(Algo):
method __init__ (line 75) | def __init__(self, template_path: PathLike):
method pre_check_skip_algo (line 104) | def pre_check_skip_algo(self, skip_bundlegen: bool = False, skip_info:...
method set_data_stats (line 114) | def set_data_stats(self, data_stats_files: str) -> None:
method set_data_source (line 123) | def set_data_source(self, data_src_cfg: str) -> None:
method set_mlflow_tracking_uri (line 134) | def set_mlflow_tracking_uri(self, mlflow_tracking_uri: str | None) -> ...
method set_mlflow_experiment_name (line 145) | def set_mlflow_experiment_name(self, mlflow_experiment_name: str | Non...
method fill_template_config (line 154) | def fill_template_config(self, data_stats_filename: str, algo_path: st...
method export_to_disk (line 171) | def export_to_disk(self, output_path: str, algo_name: str, **kwargs: A...
method _create_cmd (line 196) | def _create_cmd(self, train_params: None | dict = None) -> tuple[str, ...
method _run_cmd (line 248) | def _run_cmd(self, cmd: str, devices_info: str = "") -> subprocess.Com...
method train (line 279) | def train(
method get_score (line 302) | def get_score(self, *args, **kwargs):
method get_inferer (line 315) | def get_inferer(self, *args, **kwargs):
method predict (line 353) | def predict(self, predict_files: list, predict_params: dict | None = N...
method get_output_path (line 366) | def get_output_path(self):
function _download_algos_url (line 385) | def _download_algos_url(url: str, at_path: str) -> dict[str, dict[str, s...
function _copy_algos_folder (line 418) | def _copy_algos_folder(folder, at_path):
class BundleGen (line 442) | class BundleGen(AlgoGen):
method __init__ (line 466) | def __init__(
method set_data_stats (line 531) | def set_data_stats(self, data_stats_filename: str) -> None:
method get_data_stats (line 540) | def get_data_stats(self):
method set_data_src (line 544) | def set_data_src(self, data_src_cfg_name):
method get_data_src (line 553) | def get_data_src(self):
method set_mlflow_tracking_uri (line 557) | def set_mlflow_tracking_uri(self, mlflow_tracking_uri):
method set_mlflow_experiment_name (line 568) | def set_mlflow_experiment_name(self, mlflow_experiment_name):
method get_mlflow_tracking_uri (line 577) | def get_mlflow_tracking_uri(self):
method get_mlflow_experiment_name (line 581) | def get_mlflow_experiment_name(self):
method get_history (line 585) | def get_history(self) -> list:
method generate (line 589) | def generate(
FILE: monai/apps/auto3dseg/data_analyzer.py
function strenum_representer (line 35) | def strenum_representer(dumper, data):
class DataAnalyzer (line 48) | class DataAnalyzer:
method __init__ (line 114) | def __init__(
method _check_data_uniformity (line 151) | def _check_data_uniformity(keys: list[str], result: dict) -> bool:
method get_all_case_stats (line 174) | def get_all_case_stats(self, key="training", transform_list=None):
method _get_all_case_stats (line 267) | def _get_all_case_stats(
FILE: monai/apps/auto3dseg/ensemble_builder.py
class AlgoEnsemble (line 49) | class AlgoEnsemble(ABC):
method __init__ (line 54) | def __init__(self):
method set_algos (line 60) | def set_algos(self, infer_algos):
method get_algo (line 66) | def get_algo(self, identifier):
method get_algo_ensemble (line 77) | def get_algo_ensemble(self):
method set_infer_files (line 86) | def set_infer_files(self, dataroot: str, data_list_or_path: str | list...
method ensemble_pred (line 109) | def ensemble_pred(self, preds, sigmoid=False):
method _apply_algo_specific_param (line 135) | def _apply_algo_specific_param(self, algo_spec_param: dict, param: dic...
method __call__ (line 154) | def __call__(self, pred_param: dict | None = None) -> list:
method collect_algos (line 235) | def collect_algos(self, *args, **kwargs):
class AlgoEnsembleBestN (line 239) | class AlgoEnsembleBestN(AlgoEnsemble):
method __init__ (line 247) | def __init__(self, n_best: int = 5):
method sort_score (line 251) | def sort_score(self):
method collect_algos (line 258) | def collect_algos(self, n_best: int = -1) -> None:
class AlgoEnsembleBestByFold (line 283) | class AlgoEnsembleBestByFold(AlgoEnsemble):
method __init__ (line 291) | def __init__(self, n_fold: int = 5):
method collect_algos (line 295) | def collect_algos(self) -> None:
class AlgoEnsembleBuilder (line 317) | class AlgoEnsembleBuilder:
method __init__ (line 335) | def __init__(self, history: Sequence[dict[str, Any]], data_src_cfg_nam...
method add_inferer (line 361) | def add_inferer(self, identifier: str, gen_algo: BundleAlgo, best_metr...
method set_ensemble_method (line 377) | def set_ensemble_method(self, ensemble: AlgoEnsemble, *args: Any, **kw...
method get_ensemble (line 391) | def get_ensemble(self):
class EnsembleRunner (line 397) | class EnsembleRunner:
method __init__ (line 427) | def __init__(
method set_ensemble_method (line 452) | def set_ensemble_method(self, ensemble_method_name: str = "AlgoEnsembl...
method _pop_kwargs_to_get_image_save_transform (line 474) | def _pop_kwargs_to_get_image_save_transform(self, **kwargs):
method set_image_save_transform (line 522) | def set_image_save_transform(self, **kwargs: Any) -> None:
method set_num_fold (line 540) | def set_num_fold(self, num_fold: int = 5) -> None:
method ensemble (line 552) | def ensemble(self):
method run (line 608) | def run(self, device_setting: dict | None = None) -> None:
method _create_cmd (line 623) | def _create_cmd(self) -> None:
FILE: monai/apps/auto3dseg/hpo_gen.py
class HPOGen (line 35) | class HPOGen(AlgoGen):
method get_hyperparameters (line 46) | def get_hyperparameters(self):
method update_params (line 51) | def update_params(self, *args, **kwargs):
method set_score (line 56) | def set_score(self, *args, **kwargs):
method run_algo (line 61) | def run_algo(self, *args, **kwargs):
class NNIGen (line 66) | class NNIGen(HPOGen):
method __init__ (line 113) | def __init__(self, algo: Algo | None = None, params: dict | None = None):
method get_obj_filename (line 134) | def get_obj_filename(self):
method print_bundle_algo_instruction (line 138) | def print_bundle_algo_instruction(self):
method get_hyperparameters (line 158) | def get_hyperparameters(self):
method update_params (line 167) | def update_params(self, params: dict) -> None:
method get_task_id (line 176) | def get_task_id(self):
method generate (line 183) | def generate(self, output_folder: str = ".") -> None:
method set_score (line 203) | def set_score(self, acc):
method run_algo (line 212) | def run_algo(self, obj_filename: str, output_folder: str = ".", templa...
class OptunaGen (line 242) | class OptunaGen(HPOGen):
method __init__ (line 281) | def __init__(self, algo: Algo | None = None, params: dict | None = Non...
method get_obj_filename (line 301) | def get_obj_filename(self):
method get_hyperparameters (line 305) | def get_hyperparameters(self):
method set_score (line 317) | def set_score(self, acc):
method set_trial (line 321) | def set_trial(self, trial):
method __call__ (line 325) | def __call__(
method update_params (line 341) | def update_params(self, params: dict) -> None:
method get_task_id (line 350) | def get_task_id(self):
method generate (line 357) | def generate(self, output_folder: str = ".") -> None:
method run_algo (line 375) | def run_algo(self, obj_filename: str, output_folder: str = ".", templa...
FILE: monai/apps/auto3dseg/transforms.py
class EnsureSameShaped (line 25) | class EnsureSameShaped(MapTransform):
method __init__ (line 35) | def __init__(
method __call__ (line 59) | def __call__(self, data: Mapping[Hashable, torch.Tensor]) -> dict[Hash...
FILE: monai/apps/auto3dseg/utils.py
function import_bundle_algo_history (line 23) | def import_bundle_algo_history(
function export_bundle_algo_history (line 68) | def export_bundle_algo_history(history: list[dict[str, BundleAlgo]]) -> ...
function get_name_from_algo_id (line 80) | def get_name_from_algo_id(id: str) -> str:
FILE: monai/apps/datasets.py
class MedNISTDataset (line 47) | class MedNISTDataset(Randomizable, CacheDataset):
method __init__ (line 91) | def __init__(
method randomize (line 148) | def randomize(self, data: np.ndarray) -> None:
method get_num_classes (line 151) | def get_num_classes(self) -> int:
method _generate_data_list (line 155) | def _generate_data_list(self, dataset_dir: PathLike) -> list[dict]:
class DecathlonDataset (line 197) | class DecathlonDataset(Randomizable, CacheDataset):
method __init__ (line 288) | def __init__(
method get_indices (line 359) | def get_indices(self) -> np.ndarray:
method randomize (line 366) | def randomize(self, data: np.ndarray) -> None:
method get_properties (line 369) | def get_properties(self, keys: Sequence[str] | str | None = None) -> d...
method _generate_data_list (line 381) | def _generate_data_list(self, dataset_dir: PathLike) -> list[dict]:
method _split_datalist (line 388) | def _split_datalist(self, datalist: list[dict]) -> list[dict]:
class TciaDataset (line 404) | class TciaDataset(Randomizable, CacheDataset):
method __init__ (line 495) | def __init__(
method get_indices (line 577) | def get_indices(self) -> np.ndarray:
method randomize (line 584) | def randomize(self, data: np.ndarray) -> None:
method _download_series_reference_data (line 587) | def _download_series_reference_data(self, series_uid: str, download_di...
method _generate_data_list (line 643) | def _generate_data_list(self, dataset_dir: PathLike) -> list[dict]:
method _split_datalist (line 662) | def _split_datalist(self, datalist: list[dict]) -> list[dict]:
class CrossValidation (line 678) | class CrossValidation:
method __init__ (line 716) | def __init__(self, dataset_cls: object, nfolds: int = 5, seed: int = 0...
method get_dataset (line 724) | def get_dataset(self, folds: Sequence[int] | int, **dataset_params: An...
FILE: monai/apps/deepedit/interaction.py
class Interaction (line 26) | class Interaction:
method __init__ (line 45) | def __init__(
method __call__ (line 61) | def __call__(self, engine: SupervisedTrainer | SupervisedEvaluator, ba...
FILE: monai/apps/deepedit/transforms.py
class DiscardAddGuidanced (line 36) | class DiscardAddGuidanced(MapTransform):
method __init__ (line 38) | def __init__(
method _apply (line 60) | def _apply(self, image):
method __call__ (line 73) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
class RemapLabelsToSequentiald (line 87) | class RemapLabelsToSequentiald(MapTransform):
method __init__ (line 122) | def __init__(
method __call__ (line 129) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
class NormalizeLabelsInDatasetd (line 157) | class NormalizeLabelsInDatasetd(RemapLabelsToSequentiald):
class SingleLabelSelectiond (line 168) | class SingleLabelSelectiond(MapTransform):
method __init__ (line 170) | def __init__(
method __call__ (line 200) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
class AddGuidanceSignalDeepEditd (line 217) | class AddGuidanceSignalDeepEditd(MapTransform):
method __init__ (line 229) | def __init__(
method _get_signal (line 242) | def _get_signal(self, image, guidance):
method __call__ (line 287) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
class FindAllValidSlicesDeepEditd (line 308) | class FindAllValidSlicesDeepEditd(MapTransform):
method __init__ (line 317) | def __init__(self, keys: KeysCollection, sids: Hashable = "sids", allo...
method _apply (line 321) | def _apply(self, label, d):
method __call__ (line 331) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
class AddInitialSeedPointDeepEditd (line 351) | class AddInitialSeedPointDeepEditd(Randomizable, MapTransform):
method __init__ (line 367) | def __init__(
method _apply (line 383) | def _apply(self, label, sid, key_label):
method _randomize (line 428) | def _randomize(self, d, key_label):
method __call__ (line 439) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
class FindDiscrepancyRegionsDeepEditd (line 465) | class FindDiscrepancyRegionsDeepEditd(MapTransform):
method __init__ (line 474) | def __init__(
method disparity (line 486) | def disparity(label, pred):
method _apply (line 494) | def _apply(self, label, pred):
method __call__ (line 497) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
class AddRandomGuidanceDeepEditd (line 535) | class AddRandomGuidanceDeepEditd(Randomizable, MapTransform):
method __init__ (line 545) | def __init__(
method randomize (line 563) | def randomize(self, data=None):
method find_guidance (line 567) | def find_guidance(self, discrepancy):
method add_guidance (line 581) | def add_guidance(self, guidance, discrepancy, label_names, labels):
method __call__ (line 620) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
class AddGuidanceFromPointsDeepEditd (line 665) | class AddGuidanceFromPointsDeepEditd(Transform):
method __init__ (line 686) | def __init__(
method _apply (line 701) | def _apply(clicks, factor):
method __call__ (line 708) | def __call__(self, data):
class ResizeGuidanceMultipleLabelDeepEditd (line 741) | class ResizeGuidanceMultipleLabelDeepEditd(Transform):
method __init__ (line 747) | def __init__(self, guidance: str, ref_image: str) -> None:
method __call__ (line 751) | def __call__(self, data):
class SplitPredsLabeld (line 783) | class SplitPredsLabeld(MapTransform):
method __call__ (line 789) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
class AddInitialSeedPointMissingLabelsd (line 802) | class AddInitialSeedPointMissingLabelsd(Randomizable, MapTransform):
method __init__ (line 815) | def __init__(
method _apply (line 831) | def _apply(self, label, sid):
method _randomize (line 879) | def _randomize(self, d, key_label):
method __call__ (line 890) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
class FindAllValidSlicesMissingLabelsd (line 916) | class FindAllValidSlicesMissingLabelsd(MapTransform):
method __init__ (line 924) | def __init__(self, keys: KeysCollection, sids: Hashable = "sids", allo...
method _apply (line 928) | def _apply(self, label, d):
method __call__ (line 941) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
FILE: monai/apps/deepgrow/dataset.py
function create_dataset (line 25) | def create_dataset(
function _default_transforms (line 135) | def _default_transforms(image_key, label_key, pixdim):
function _save_data_2d (line 149) | def _save_data_2d(vol_idx, vol_image, vol_label, dataset_dir, relative_p...
function _save_data_3d (line 211) | def _save_data_3d(vol_idx, vol_image, vol_label, dataset_dir, relative_p...
FILE: monai/apps/deepgrow/interaction.py
class Interaction (line 25) | class Interaction:
method __init__ (line 42) | def __init__(
method __call__ (line 57) | def __call__(self, engine: SupervisedTrainer | SupervisedEvaluator, ba...
FILE: monai/apps/deepgrow/transforms.py
class FindAllValidSlicesd (line 36) | class FindAllValidSlicesd(Transform):
method __init__ (line 46) | def __init__(self, label: str = "label", sids: str = "sids"):
method _apply (line 50) | def _apply(self, label):
method __call__ (line 57) | def __call__(self, data: Any) -> dict:
class AddInitialSeedPointd (line 72) | class AddInitialSeedPointd(Randomizable, Transform):
method __init__ (line 89) | def __init__(
method randomize (line 104) | def randomize(self, data):
method _apply (line 114) | def _apply(self, label, sid):
method __call__ (line 152) | def __call__(self, data):
class AddGuidanceSignald (line 159) | class AddGuidanceSignald(Transform):
method __init__ (line 173) | def __init__(self, image: str = "image", guidance: str = "guidance", s...
method _get_signal (line 179) | def _get_signal(self, image, guidance):
method _apply (line 213) | def _apply(self, image, guidance):
method __call__ (line 222) | def __call__(self, data):
class FindDiscrepancyRegionsd (line 231) | class FindDiscrepancyRegionsd(Transform):
method __init__ (line 242) | def __init__(self, label: str = "label", pred: str = "pred", discrepan...
method disparity (line 248) | def disparity(label, pred):
method _apply (line 257) | def _apply(self, label, pred):
method __call__ (line 260) | def __call__(self, data):
class AddRandomGuidanced (line 269) | class AddRandomGuidanced(Randomizable, Transform):
method __init__ (line 284) | def __init__(self, guidance: str = "guidance", discrepancy: str = "dis...
method randomize (line 290) | def randomize(self, data=None):
method find_guidance (line 294) | def find_guidance(self, discrepancy):
method add_guidance (line 308) | def add_guidance(self, discrepancy, will_interact):
method _apply (line 326) | def _apply(self, guidance, discrepancy):
method __call__ (line 339) | def __call__(self, data):
class SpatialCropForegroundd (line 349) | class SpatialCropForegroundd(MapTransform):
method __init__ (line 399) | def __init__(
method __call__ (line 433) | def __call__(self, data):
class AddGuidanceFromPointsd (line 462) | class AddGuidanceFromPointsd(Transform):
method __init__ (line 497) | def __init__(
method _apply (line 521) | def _apply(self, pos_clicks, neg_clicks, factor, slice_num):
method __call__ (line 547) | def __call__(self, data):
class SpatialCropGuidanced (line 577) | class SpatialCropGuidanced(MapTransform):
method __init__ (line 610) | def __init__(
method bounding_box (line 638) | def bounding_box(self, points, img_shape):
method __call__ (line 655) | def __call__(self, data: Any) -> dict:
class ResizeGuidanced (line 707) | class ResizeGuidanced(Transform):
method __init__ (line 728) | def __init__(
method __call__ (line 742) | def __call__(self, data: Any) -> dict:
class RestoreLabeld (line 758) | class RestoreLabeld(MapTransform):
method __init__ (line 816) | def __init__(
method __call__ (line 853) | def __call__(self, data: Any) -> dict:
class Fetch2DSliced (line 917) | class Fetch2DSliced(MapTransform):
method __init__ (line 939) | def __init__(
method _apply (line 956) | def _apply(self, image, guidance):
method __call__ (line 964) | def __call__(self, data):
FILE: monai/apps/detection/metrics/coco.py
class COCOMetric (line 74) | class COCOMetric:
method __init__ (line 76) | def __init__(
method __call__ (line 160) | def __call__(self, *args: Any, **kwargs: Any) -> tuple[dict[str, float...
method check_number_of_iou (line 174) | def check_number_of_iou(self, *args: np.ndarray) -> None:
method get_iou_thresholds (line 190) | def get_iou_thresholds(self) -> Sequence[float]:
method compute (line 199) | def compute(self, results_list: list[dict[int, dict[str, np.ndarray]]]...
method _compute_ap (line 239) | def _compute_ap(self, dataset_statistics: dict[str, np.ndarray | list]...
method _compute_ar (line 286) | def _compute_ar(self, dataset_statistics: dict[str, np.ndarray | list]...
method _select_ap (line 329) | def _select_ap(
method _select_ar (line 364) | def _select_ar(
method _compute_statistics (line 402) | def _compute_statistics(self, results_list: list[dict[int, dict[str, n...
function _compute_stats_single_threshold (line 488) | def _compute_stats_single_threshold(
FILE: monai/apps/detection/metrics/matching.py
function matching_batch (line 74) | def matching_batch(
function _matching_no_gt (line 188) | def _matching_no_gt(
function _matching_no_pred (line 233) | def _matching_no_pred(iou_thresholds: Sequence[float], gt_ignore: np.nda...
function _matching_single_image_single_class (line 272) | def _matching_single_image_single_class(
FILE: monai/apps/detection/networks/retinanet_detector.py
class RetinaNetDetector (line 68) | class RetinaNetDetector(nn.Module):
method __init__ (line 186) | def __init__(
method get_attribute_from_network (line 258) | def get_attribute_from_network(self, attr_name, default_value=None):
method set_box_coder_weights (line 266) | def set_box_coder_weights(self, weights: tuple[float]) -> None:
method set_target_keys (line 278) | def set_target_keys(self, box_key: str, label_key: str) -> None:
method set_cls_loss (line 289) | def set_cls_loss(self, cls_loss: nn.Module) -> None:
method set_box_regression_loss (line 304) | def set_box_regression_loss(self, box_loss: nn.Module, encode_gt: bool...
method set_regular_matcher (line 331) | def set_regular_matcher(
method set_atss_matcher (line 352) | def set_atss_matcher(self, num_candidates: int = 4, center_in_gt: bool...
method set_hard_negative_sampler (line 365) | def set_hard_negative_sampler(
method set_balanced_sampler (line 390) | def set_balanced_sampler(self, batch_size_per_image: int, positive_fra...
method set_sliding_window_inferer (line 403) | def set_sliding_window_inferer(
method set_box_selector_parameters (line 434) | def set_box_selector_parameters(
method forward (line 467) | def forward(
method _check_detector_training_components (line 552) | def _check_detector_training_components(self):
method generate_anchors (line 568) | def generate_anchors(self, images: Tensor, head_outputs: dict[str, lis...
method _reshape_maps (line 584) | def _reshape_maps(self, result_maps: list[Tensor]) -> Tensor:
method postprocess_detections (line 629) | def postprocess_detections(
method compute_loss (line 700) | def compute_loss(
method compute_anchor_matched_idxs (line 730) | def compute_anchor_matched_idxs(
method compute_cls_loss (line 802) | def compute_cls_loss(
method compute_box_loss (line 832) | def compute_box_loss(
method get_cls_train_sample_per_image (line 879) | def get_cls_train_sample_per_image(
method get_box_train_sample_per_image (line 958) | def get_box_train_sample_per_image(
function retinanet_resnet50_fpn_detector (line 1015) | def retinanet_resnet50_fpn_detector(
FILE: monai/apps/detection/networks/retinanet_network.py
class RetinaNetClassificationHead (line 60) | class RetinaNetClassificationHead(nn.Module):
method __init__ (line 76) | def __init__(
method forward (line 101) | def forward(self, x: list[Tensor]) -> list[Tensor]:
class RetinaNetRegressionHead (line 138) | class RetinaNetRegressionHead(nn.Module):
method __init__ (line 152) | def __init__(self, in_channels: int, num_anchors: int, spatial_dims: i...
method forward (line 174) | def forward(self, x: list[Tensor]) -> list[Tensor]:
class RetinaNet (line 211) | class RetinaNet(nn.Module):
method __init__ (line 278) | def __init__(
method forward (line 314) | def forward(self, images: Tensor) -> Any:
function resnet_fpn_feature_extractor (line 357) | def resnet_fpn_feature_extractor(
FILE: monai/apps/detection/transforms/array.py
class StandardizeEmptyBox (line 66) | class StandardizeEmptyBox(Transform):
method __init__ (line 76) | def __init__(self, spatial_dims: int) -> None:
method __call__ (line 79) | def __call__(self, boxes: NdarrayOrTensor) -> NdarrayOrTensor:
class ConvertBoxMode (line 87) | class ConvertBoxMode(Transform):
method __init__ (line 135) | def __init__(
method __call__ (line 143) | def __call__(self, boxes: NdarrayOrTensor) -> NdarrayOrTensor:
class ConvertBoxToStandardMode (line 156) | class ConvertBoxToStandardMode(Transform):
method __init__ (line 177) | def __init__(self, mode: str | BoxMode | type[BoxMode] | None = None) ...
method __call__ (line 180) | def __call__(self, boxes: NdarrayOrTensor) -> NdarrayOrTensor:
class AffineBox (line 195) | class AffineBox(Transform):
method __call__ (line 202) | def __call__(self, boxes: NdarrayOrTensor, affine: NdarrayOrTensor | N...
class ZoomBox (line 214) | class ZoomBox(Transform):
method __init__ (line 229) | def __init__(self, zoom: Sequence[float] | float, keep_size: bool = Fa...
method __call__ (line 234) | def __call__(self, boxes: NdarrayTensor, src_spatial_size: Sequence[in...
class ResizeBox (line 268) | class ResizeBox(Transform):
method __init__ (line 289) | def __init__(self, spatial_size: Sequence[int] | int, size_mode: str =...
method __call__ (line 293) | def __call__(self, boxes: NdarrayOrTensor, src_spatial_size: Sequence[...
class FlipBox (line 323) | class FlipBox(Transform):
method __init__ (line 338) | def __init__(self, spatial_axis: Sequence[int] | int | None = None) ->...
method __call__ (line 341) | def __call__(self, boxes: NdarrayOrTensor, spatial_size: Sequence[int]...
class ClipBoxToImage (line 351) | class ClipBoxToImage(Transform):
method __init__ (line 362) | def __init__(self, remove_empty: bool = False) -> None:
method __call__ (line 365) | def __call__( # type: ignore
class BoxToMask (line 400) | class BoxToMask(Transform):
method __init__ (line 416) | def __init__(self, bg_label: int = -1, ellipse_mask: bool = False) -> ...
method __call__ (line 420) | def __call__( # type: ignore
class MaskToBox (line 437) | class MaskToBox(Transform):
method __init__ (line 451) | def __init__(
method __call__ (line 461) | def __call__(self, boxes_mask: NdarrayOrTensor) -> tuple[NdarrayOrTens...
class SpatialCropBox (line 475) | class SpatialCropBox(SpatialCrop):
method __init__ (line 502) | def __init__(
method __call__ (line 515) | def __call__( # type: ignore[override]
class RotateBox90 (line 546) | class RotateBox90(Rotate90):
method __call__ (line 560) | def __call__(self, boxes: NdarrayTensor, spatial_size: Sequence[int] |...
FILE: monai/apps/detection/transforms/box_ops.py
function _apply_affine_to_points (line 29) | def _apply_affine_to_points(points: torch.Tensor, affine: torch.Tensor, ...
function apply_affine_to_boxes (line 62) | def apply_affine_to_boxes(boxes: NdarrayTensor, affine: NdarrayOrTensor)...
function zoom_boxes (line 102) | def zoom_boxes(boxes: NdarrayTensor, zoom: Sequence[float] | float) -> N...
function resize_boxes (line 129) | def resize_boxes(
function flip_boxes (line 161) | def flip_boxes(
function convert_box_to_mask (line 195) | def convert_box_to_mask(
function convert_mask_to_box (line 275) | def convert_mask_to_box(
function select_labels (line 328) | def select_labels(
function swapaxes_boxes (line 357) | def swapaxes_boxes(boxes: NdarrayTensor, axis1: int, axis2: int) -> Ndar...
function rot90_boxes (line 384) | def rot90_boxes(
FILE: monai/apps/detection/transforms/dictionary.py
class StandardizeEmptyBoxd (line 102) | class StandardizeEmptyBoxd(MapTransform, InvertibleTransform):
method __init__ (line 116) | def __init__(self, box_keys: KeysCollection, box_ref_image_keys: str, ...
method __call__ (line 134) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
method inverse (line 142) | def inverse(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Ha...
class ConvertBoxModed (line 146) | class ConvertBoxModed(MapTransform, InvertibleTransform):
method __init__ (line 161) | def __init__(
method __call__ (line 182) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
method inverse (line 189) | def inverse(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Ha...
class ConvertBoxToStandardModed (line 202) | class ConvertBoxToStandardModed(MapTransform, InvertibleTransform):
method __init__ (line 219) | def __init__(
method __call__ (line 237) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
method inverse (line 244) | def inverse(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Ha...
class AffineBoxToImageCoordinated (line 257) | class AffineBoxToImageCoordinated(MapTransform, InvertibleTransform):
method __init__ (line 280) | def __init__(
method extract_affine (line 301) | def extract_affine(self, data: Mapping[Hashable, torch.Tensor]) -> tup...
method __call__ (line 329) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
method inverse (line 339) | def inverse(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Ha...
class AffineBoxToWorldCoordinated (line 349) | class AffineBoxToWorldCoordinated(AffineBoxToImageCoordinated):
method __init__ (line 372) | def __init__(
method __call__ (line 386) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
class ZoomBoxd (line 397) | class ZoomBoxd(MapTransform, InvertibleTransform):
method __init__ (line 429) | def __init__(
method __call__ (line 453) | def __call__(self, data: Mapping[Hashable, torch.Tensor]) -> dict[Hash...
method inverse (line 478) | def inverse(self, data: Mapping[Hashable, torch.Tensor]) -> dict[Hasha...
class RandZoomBoxd (line 500) | class RandZoomBoxd(RandomizableTransform, MapTransform, InvertibleTransf...
method __init__ (line 542) | def __init__(
method set_random_state (line 569) | def set_random_state(self, seed: int | None = None, state: np.random.R...
method __call__ (line 574) | def __call__(self, data: Mapping[Hashable, torch.Tensor]) -> dict[Hash...
method inverse (line 617) | def inverse(self, data: Mapping[Hashable, torch.Tensor]) -> dict[Hasha...
class FlipBoxd (line 643) | class FlipBoxd(MapTransform, InvertibleTransform):
method __init__ (line 657) | def __init__(
method __call__ (line 673) | def __call__(self, data: Mapping[Hashable, torch.Tensor]) -> dict[Hash...
method inverse (line 685) | def inverse(self, data: Mapping[Hashable, torch.Tensor]) -> dict[Hasha...
class RandFlipBoxd (line 705) | class RandFlipBoxd(RandomizableTransform, MapTransform, InvertibleTransf...
method __init__ (line 720) | def __init__(
method set_random_state (line 738) | def set_random_state(self, seed: int | None = None, state: np.random.R...
method __call__ (line 742) | def __call__(self, data: Mapping[Hashable, torch.Tensor]) -> dict[Hash...
method inverse (line 762) | def inverse(self, data: Mapping[Hashable, torch.Tensor]) -> dict[Hasha...
class ClipBoxToImaged (line 785) | class ClipBoxToImaged(MapTransform):
method __init__ (line 808) | def __init__(
method __call__ (line 835) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
class BoxToMaskd (line 846) | class BoxToMaskd(MapTransform):
method __init__ (line 903) | def __init__(
method __call__ (line 923) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
class MaskToBoxd (line 936) | class MaskToBoxd(MapTransform):
method __init__ (line 985) | def __init__(
method __call__ (line 1005) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
class RandCropBoxByPosNegLabeld (line 1014) | class RandCropBoxByPosNegLabeld(Randomizable, MapTransform):
method __init__ (line 1067) | def __init__(
method generate_fg_center_boxes_np (line 1125) | def generate_fg_center_boxes_np(self, boxes: NdarrayOrTensor, image_si...
method randomize (line 1154) | def randomize( # type: ignore
method __call__ (line 1187) | def __call__(self, data: Mapping[Hashable, torch.Tensor]) -> list[dict...
class RotateBox90d (line 1229) | class RotateBox90d(MapTransform, InvertibleTransform):
method __init__ (line 1246) | def __init__(
method __call__ (line 1262) | def __call__(self, data: Mapping[Hashable, torch.Tensor]) -> Mapping[H...
method inverse (line 1279) | def inverse(self, data: Mapping[Hashable, torch.Tensor]) -> dict[Hasha...
class RandRotateBox90d (line 1297) | class RandRotateBox90d(RandomizableTransform, MapTransform, InvertibleTr...
method __init__ (line 1317) | def __init__(
method __call__ (line 1338) | def __call__(self, data: Mapping[Hashable, torch.Tensor]) -> Mapping[H...
method randomize (line 1376) | def randomize(self, data: Any | None = None) -> None:
method inverse (line 1380) | def inverse(self, data: Mapping[Hashable, torch.Tensor]) -> dict[Hasha...
FILE: monai/apps/detection/utils/ATSS_matcher.py
class Matcher (line 92) | class Matcher(ABC):
method __init__ (line 104) | def __init__(self, similarity_fn: Callable[[Tensor, Tensor], Tensor] =...
method __call__ (line 107) | def __call__(
method compute_matches (line 145) | def compute_matches(
class ATSSMatcher (line 166) | class ATSSMatcher(Matcher):
method __init__ (line 168) | def __init__(
method compute_matches (line 199) | def compute_matches(
FILE: monai/apps/detection/utils/anchor_utils.py
class AnchorGenerator (line 52) | class AnchorGenerator(nn.Module):
method __init__ (line 111) | def __init__(
method generate_anchors (line 148) | def generate_anchors(
method set_cell_anchors (line 208) | def set_cell_anchors(self, dtype: torch.dtype, device: torch.device) -...
method num_anchors_per_location (line 214) | def num_anchors_per_location(self):
method grid_anchors (line 220) | def grid_anchors(self, grid_sizes: list[list[int]], strides: list[list...
method forward (line 284) | def forward(self, images: Tensor, feature_maps: list[Tensor]) -> list[...
class AnchorGeneratorWithAnchorShape (line 324) | class AnchorGeneratorWithAnchorShape(AnchorGenerator):
method __init__ (line 369) | def __init__(
method generate_anchors_using_shape (line 392) | def generate_anchors_using_shape(
FILE: monai/apps/detection/utils/box_coder.py
function encode_boxes (line 64) | def encode_boxes(gt_boxes: Tensor, proposals: Tensor, weights: Tensor) -...
class BoxCoder (line 105) | class BoxCoder:
method __init__ (line 125) | def __init__(self, weights: Sequence[float], boxes_xform_clip: float |...
method encode (line 132) | def encode(self, gt_boxes: Sequence[Tensor], proposals: Sequence[Tenso...
method encode_single (line 154) | def encode_single(self, gt_boxes: Tensor, proposals: Tensor) -> Tensor:
method decode (line 171) | def decode(self, rel_codes: Tensor, reference_boxes: Sequence[Tensor])...
method decode_single (line 198) | def decode_single(self, rel_codes: Tensor, reference_boxes: Tensor) ->...
FILE: monai/apps/detection/utils/box_selector.py
class BoxSelector (line 51) | class BoxSelector:
method __init__ (line 88) | def __init__(
method select_top_score_idx_per_level (line 105) | def select_top_score_idx_per_level(self, logits: Tensor) -> tuple[Tens...
method select_boxes_per_image (line 148) | def select_boxes_per_image(
FILE: monai/apps/detection/utils/detector_utils.py
function check_input_images (line 28) | def check_input_images(input_images: list[Tensor] | Tensor, spatial_dims...
function check_training_targets (line 55) | def check_training_targets(
function pad_images (line 111) | def pad_images(
function preprocess_images (line 179) | def preprocess_images(
FILE: monai/apps/detection/utils/hard_negative_sampler.py
class HardNegativeSamplerBase (line 40) | class HardNegativeSamplerBase:
method __init__ (line 60) | def __init__(self, pool_size: float = 10) -> None:
method select_negatives (line 63) | def select_negatives(self, negative: Tensor, num_neg: int, fg_probs: T...
class HardNegativeSampler (line 99) | class HardNegativeSampler(HardNegativeSamplerBase):
method __init__ (line 120) | def __init__(
method __call__ (line 129) | def __call__(self, target_labels: list[Tensor], concat_fg_probs: Tenso...
method select_samples_img_list (line 161) | def select_samples_img_list(
method select_samples_per_img (line 209) | def select_samples_per_img(self, labels_per_img: Tensor, fg_probs_per_...
method get_num_pos (line 248) | def get_num_pos(self, positive: torch.Tensor) -> int:
method get_num_neg (line 264) | def get_num_neg(self, negative: torch.Tensor, num_pos: int) -> int:
method select_positives (line 281) | def select_positives(self, positive: Tensor, num_pos: int, labels: Ten...
FILE: monai/apps/detection/utils/predict_utils.py
function ensure_dict_value_to_list_ (line 20) | def ensure_dict_value_to_list_(head_outputs: dict[str, list[Tensor]], ke...
function check_dict_values_same_length (line 44) | def check_dict_values_same_length(head_outputs: dict[str, list[Tensor]],...
function _network_sequence_output (line 63) | def _network_sequence_output(images: Tensor, network: nn.Module, keys: l...
function predict_with_inferer (line 92) | def predict_with_inferer(
FILE: monai/apps/generation/maisi/networks/autoencoderkl_maisi.py
function _empty_cuda_cache (line 31) | def _empty_cuda_cache(save_mem: bool) -> None:
class MaisiGroupNorm3D (line 37) | class MaisiGroupNorm3D(nn.GroupNorm):
method __init__ (line 51) | def __init__(
method forward (line 66) | def forward(self, input: torch.Tensor) -> torch.Tensor:
method _cat_inputs (line 100) | def _cat_inputs(self, inputs):
class MaisiConvolution (line 118) | class MaisiConvolution(nn.Module):
method __init__ (line 134) | def __init__(
method _split_tensor (line 185) | def _split_tensor(self, x: torch.Tensor, split_size: int, padding: int...
method _concatenate_tensors (line 204) | def _concatenate_tensors(self, outputs: list[torch.Tensor], split_size...
method forward (line 235) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class MaisiUpsample (line 286) | class MaisiUpsample(nn.Module):
method __init__ (line 300) | def __init__(
method forward (line 328) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class MaisiDownsample (line 343) | class MaisiDownsample(nn.Module):
method __init__ (line 356) | def __init__(
method forward (line 381) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class MaisiResBlock (line 387) | class MaisiResBlock(nn.Module):
method __init__ (line 405) | def __init__(
method forward (line 486) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class MaisiEncoder (line 512) | class MaisiEncoder(nn.Module):
method __init__ (line 536) | def __init__(
method forward (line 694) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class MaisiDecoder (line 701) | class MaisiDecoder(nn.Module):
method __init__ (line 726) | def __init__(
method forward (line 882) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class AutoencoderKlMaisi (line 889) | class AutoencoderKlMaisi(AutoencoderKL):
method __init__ (line 917) | def __init__(
FILE: monai/apps/generation/maisi/networks/controlnet_maisi.py
class ControlNetMaisi (line 22) | class ControlNetMaisi(ControlNet):
method __init__ (line 51) | def __init__(
method forward (line 97) | def forward(
method _prepare_time_and_class_embedding (line 124) | def _prepare_time_and_class_embedding(self, x, timesteps, class_labels):
method _apply_initial_convolution (line 144) | def _apply_initial_convolution(self, x):
method _apply_down_blocks (line 149) | def _apply_down_blocks(self, emb, context, h):
method _apply_mid_block (line 161) | def _apply_mid_block(self, emb, context, h):
method _apply_controlnet_blocks (line 166) | def _apply_controlnet_blocks(self, h, down_block_res_samples):
FILE: monai/apps/generation/maisi/networks/diffusion_model_unet_maisi.py
class DiffusionModelUNetMaisi (line 53) | class DiffusionModelUNetMaisi(nn.Module):
method __init__ (line 84) | def __init__(
method _create_embedding_module (line 306) | def _create_embedding_module(self, input_dim, embed_dim):
method _get_time_and_class_embedding (line 310) | def _get_time_and_class_embedding(self, x, timesteps, class_labels):
method _get_input_embeddings (line 327) | def _get_input_embeddings(self, emb, top_index, bottom_index, spacing):
method _apply_down_blocks (line 339) | def _apply_down_blocks(self, h, emb, context, down_block_additional_re...
method _apply_up_blocks (line 359) | def _apply_up_blocks(self, h, emb, context, down_block_res_samples):
method forward (line 368) | def forward(
FILE: monai/apps/mmars/mmars.py
function get_model_spec (line 41) | def get_model_spec(idx: int | str) -> dict | Any:
function _get_all_ngc_models (line 53) | def _get_all_ngc_models(pattern, page_index=0, page_size=50):
function _get_ngc_url (line 98) | def _get_ngc_url(model_name: str, version: str, model_prefix: str = "") ...
function _get_ngc_doc_url (line 102) | def _get_ngc_doc_url(model_name: str, model_prefix: str = "") -> str:
function download_mmar (line 106) | def download_mmar(
function load_from_mmar (line 188) | def load_from_mmar(
function _get_val (line 301) | def _get_val(input_dict: Mapping, key: str = "model", default: Any | Non...
FILE: monai/apps/mmars/model_desc.py
class RemoteMMARKeys (line 26) | class RemoteMMARKeys:
FILE: monai/apps/nnunet/nnunet_bundle.py
function get_nnunet_trainer (line 38) | def get_nnunet_trainer(
class ModelnnUNetWrapper (line 142) | class ModelnnUNetWrapper(torch.nn.Module):
method __init__ (line 169) | def __init__(self, predictor: object, model_folder: str | Path, model_...
method forward (line 239) | def forward(self, x: MetaTensor) -> MetaTensor:
function get_nnunet_monai_predictor (line 297) | def get_nnunet_monai_predictor(model_folder: str | Path, model_name: str...
function convert_nnunet_to_monai_bundle (line 351) | def convert_nnunet_to_monai_bundle(nnunet_config: dict, bundle_root_fold...
function get_network_from_nnunet_plans (line 425) | def get_network_from_nnunet_plans(
function convert_monai_bundle_to_nnunet (line 486) | def convert_monai_bundle_to_nnunet(nnunet_config: dict, bundle_root_fold...
FILE: monai/apps/nnunet/nnunetv2_runner.py
class nnUNetV2Runner (line 38) | class nnUNetV2Runner: # noqa: N801
method __init__ (line 153) | def __init__(
method convert_dataset (line 217) | def convert_dataset(self):
method convert_msd_dataset (line 285) | def convert_msd_dataset(self, data_dir: str, overwrite_id: str | None ...
method extract_fingerprints (line 301) | def extract_fingerprints(
method plan_experiments (line 330) | def plan_experiments(
method preprocess (line 375) | def preprocess(
method plan_and_process (line 416) | def plan_and_process(
method train_single_model (line 490) | def train_single_model(self, config: Any, fold: int, gpu_id: tuple | l...
method train_single_model_command (line 532) | def train_single_model_command(
method train (line 594) | def train(
method train_parallel_cmd (line 628) | def train_parallel_cmd(
method train_parallel (line 681) | def train_parallel(
method validate_single_model (line 724) | def validate_single_model(self, config: str, fold: int, **kwargs: Any)...
method validate (line 736) | def validate(
method find_best_configuration (line 752) | def find_best_configuration(
method predict (line 801) | def predict(
method predict_ensemble_postprocessing (line 893) | def predict_ensemble_postprocessing(
method run (line 969) | def run(
FILE: monai/apps/nnunet/utils.py
class NNUNETMode (line 31) | class NNUNETMode(StrEnum):
function analyze_data (line 38) | def analyze_data(datalist_json: dict, data_dir: str) -> tuple[int, int]:
function create_new_data_copy (line 63) | def create_new_data_copy(
function create_new_dataset_json (line 137) | def create_new_dataset_json(
FILE: monai/apps/nuclick/transforms.py
class NuclickKeys (line 30) | class NuclickKeys(StrEnum):
class FlattenLabeld (line 51) | class FlattenLabeld(MapTransform):
method __init__ (line 61) | def __init__(self, keys: KeysCollection, connectivity: int = 1, allow_...
method __call__ (line 65) | def __call__(self, data):
class ExtractPatchd (line 73) | class ExtractPatchd(MapTransform):
method __init__ (line 88) | def __init__(
method __call__ (line 101) | def __call__(self, data):
method bbox (line 114) | def bbox(self, patch_size, centroid, size):
class SplitLabeld (line 131) | class SplitLabeld(MapTransform):
method __init__ (line 145) | def __init__(
method __call__ (line 161) | def __call__(self, data):
class FilterImaged (line 198) | class FilterImaged(MapTransform):
method __init__ (line 210) | def __init__(self, keys: KeysCollection, min_size: int = 500, allow_mi...
method __call__ (line 214) | def __call__(self, data):
method filter (line 221) | def filter(self, rgb):
method filter_green_channel (line 233) | def filter_green_channel(
method filter_grays (line 246) | def filter_grays(self, rgb, tolerance=15):
method mask_percent (line 252) | def mask_percent(self, img_np):
method filter_remove_small_objects (line 260) | def filter_remove_small_objects(self, img_np, min_size=3000, avoid_ove...
class AddPointGuidanceSignald (line 269) | class AddPointGuidanceSignald(Randomizable, MapTransform):
method __init__ (line 286) | def __init__(
method __call__ (line 312) | def __call__(self, data):
method _apply_gaussian (line 333) | def _apply_gaussian(self, t):
method _seed_point (line 339) | def _seed_point(self, label):
method inclusion_map (line 360) | def inclusion_map(self, mask, dtype):
method exclusion_map (line 368) | def exclusion_map(self, others, dtype, jitter_range, drop_rate):
class AddClickSignalsd (line 394) | class AddClickSignalsd(MapTransform):
method __init__ (line 408) | def __init__(
method __call__ (line 426) | def __call__(self, data):
method get_clickmap_boundingbox (line 456) | def get_clickmap_boundingbox(self, img, cx, cy, x, y, bb=128):
method get_patches_and_signals (line 483) | def get_patches_and_signals(self, img, click_map, bounding_boxes, cx, ...
method _apply_gaussian (line 516) | def _apply_gaussian(self, t):
class PostFilterLabeld (line 523) | class PostFilterLabeld(MapTransform):
method __init__ (line 536) | def __init__(
method __call__ (line 562) | def __call__(self, data):
method post_processing (line 576) | def post_processing(self, preds, thresh=0.33, min_size=10, min_hole=30):
method gen_instance_map (line 583) | def gen_instance_map(self, masks, bounding_boxes, x, y, flatten=True, ...
class AddLabelAsGuidanced (line 597) | class AddLabelAsGuidanced(MapTransform):
method __init__ (line 605) | def __init__(self, keys: KeysCollection, source: str = "label") -> None:
method __call__ (line 609) | def __call__(self, data):
class SetLabelClassd (line 623) | class SetLabelClassd(MapTransform):
method __init__ (line 631) | def __init__(self, keys: KeysCollection, offset: int = -1) -> None:
method __call__ (line 635) | def __call__(self, data):
FILE: monai/apps/pathology/engines/utils.py
class PrepareBatchHoVerNet (line 26) | class PrepareBatchHoVerNet(PrepareBatch):
method __init__ (line 37) | def __init__(self, extra_keys: Sequence[str]) -> None:
method __call__ (line 42) | def __call__(
FILE: monai/apps/pathology/handlers/utils.py
function from_engine_hovernet (line 21) | def from_engine_hovernet(keys: KeysCollection, nested_key: str) -> Calla...
FILE: monai/apps/pathology/inferers/inferer.py
class SlidingWindowHoVerNetInferer (line 28) | class SlidingWindowHoVerNetInferer(SlidingWindowInferer):
method __init__ (line 77) | def __init__(
method process_output (line 109) | def process_output(self, seg_prob_tuple, window_data, importance_map_):
method __call__ (line 133) | def __call__(
FILE: monai/apps/pathology/losses/hovernet_loss.py
class HoVerNetLoss (line 24) | class HoVerNetLoss(_Loss):
method __init__ (line 45) | def __init__(
method _compute_sobel (line 67) | def _compute_sobel(self, image: torch.Tensor) -> torch.Tensor:
method _mse_gradient_loss (line 80) | def _mse_gradient_loss(self, prediction: torch.Tensor, target: torch.T...
method forward (line 98) | def forward(self, prediction: dict[str, torch.Tensor], target: dict[st...
FILE: monai/apps/pathology/metrics/lesion_froc.py
function tqdm (line 34) | def tqdm(x):
class LesionFROC (line 38) | class LesionFROC:
method __init__ (line 68) | def __init__(
method prepare_inference_result (line 86) | def prepare_inference_result(self, sample: dict) -> tuple[np.ndarray, ...
method prepare_ground_truth (line 108) | def prepare_ground_truth(self, sample):
method compute_fp_tp (line 130) | def compute_fp_tp(self):
method evaluate (line 159) | def evaluate(self):
FILE: monai/apps/pathology/transforms/post/array.py
class Watershed (line 59) | class Watershed(Transform):
method __init__ (line 74) | def __init__(self, connectivity: int | None = 1, dtype: DtypeLike = np...
method __call__ (line 78) | def __call__(
class GenerateWatershedMask (line 100) | class GenerateWatershedMask(Transform):
method __init__ (line 116) | def __init__(
method __call__ (line 152) | def __call__(self, prob_map: NdarrayOrTensor) -> NdarrayOrTensor:
class GenerateInstanceBorder (line 172) | class GenerateInstanceBorder(Transform):
method __init__ (line 190) | def __init__(self, kernel_size: int = 5, dtype: DtypeLike = np.float32...
method __call__ (line 194) | def __call__(self, mask: NdarrayOrTensor, hover_map: NdarrayOrTensor) ...
class GenerateDistanceMap (line 241) | class GenerateDistanceMap(Transform):
method __init__ (line 256) | def __init__(self, smooth_fn: Callable | None = None, dtype: DtypeLike...
method __call__ (line 260) | def __call__(self, mask: NdarrayOrTensor, instance_border: NdarrayOrTe...
class GenerateWatershedMarkers (line 284) | class GenerateWatershedMarkers(Transform):
method __init__ (line 305) | def __init__(
method __call__ (line 322) | def __call__(self, mask: NdarrayOrTensor, instance_border: NdarrayOrTe...
class GenerateSuccinctContour (line 356) | class GenerateSuccinctContour(Transform):
method __init__ (line 370) | def __init__(self, height: int, width: int) -> None:
method _generate_contour_coord (line 374) | def _generate_contour_coord(self, current: np.ndarray, previous: np.nd...
method _calculate_distance_from_top_left (line 402) | def _calculate_distance_from_top_left(self, sequence: Sequence[tuple[i...
method __call__ (line 427) | def __call__(self, contours: list[np.ndarray]) -> np.ndarray:
class GenerateInstanceContour (line 537) | class GenerateInstanceContour(Transform):
method __init__ (line 552) | def __init__(self, min_num_points: int = 3, contour_level: float | Non...
method __call__ (line 556) | def __call__(self, inst_mask: NdarrayOrTensor, offset: Sequence[int] |...
class GenerateInstanceCentroid (line 584) | class GenerateInstanceCentroid(Transform):
method __init__ (line 595) | def __init__(self, dtype: DtypeLike | None = int) -> None:
method __call__ (line 598) | def __call__(self, inst_mask: NdarrayOrTensor, offset: Sequence[int] |...
class GenerateInstanceType (line 617) | class GenerateInstanceType(Transform):
method __call__ (line 624) | def __call__( # type: ignore
class HoVerNetInstanceMapPostProcessing (line 655) | class HoVerNetInstanceMapPostProcessing(Transform):
method __init__ (line 681) | def __init__(
method __call__ (line 715) | def __call__( # type: ignore
class HoVerNetNuclearTypePostProcessing (line 755) | class HoVerNetNuclearTypePostProcessing(Transform):
method __init__ (line 771) | def __init__(
method __call__ (line 807) | def __call__( # type: ignore
FILE: monai/apps/pathology/transforms/post/dictionary.py
class Watershedd (line 76) | class Watershedd(MapTransform):
method __init__ (line 102) | def __init__(
method __call__ (line 116) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
class GenerateWatershedMaskd (line 127) | class GenerateWatershedMaskd(MapTransform):
method __init__ (line 145) | def __init__(
method __call__ (line 161) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
class GenerateInstanceBorderd (line 171) | class GenerateInstanceBorderd(Transform):
method __init__ (line 191) | def __init__(
method __call__ (line 204) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
class GenerateDistanceMapd (line 212) | class GenerateDistanceMapd(Transform):
method __init__ (line 227) | def __init__(
method __call__ (line 240) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
class GenerateWatershedMarkersd (line 248) | class GenerateWatershedMarkersd(Transform):
method __init__ (line 267) | def __init__(
method __call__ (line 289) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
class GenerateSuccinctContourd (line 297) | class GenerateSuccinctContourd(MapTransform):
method __init__ (line 313) | def __init__(self, keys: KeysCollection, height: int, width: int, allo...
method __call__ (line 317) | def __call__(self, data):
class GenerateInstanceContourd (line 325) | class GenerateInstanceContourd(MapTransform):
method __init__ (line 346) | def __init__(
method __call__ (line 360) | def __call__(self, data):
class GenerateInstanceCentroidd (line 372) | class GenerateInstanceCentroidd(MapTransform):
method __init__ (line 389) | def __init__(
method __call__ (line 402) | def __call__(self, data):
class GenerateInstanceTyped (line 414) | class GenerateInstanceTyped(MapTransform):
method __init__ (line 432) | def __init__(
method __call__ (line 448) | def __call__(self, data):
class HoVerNetInstanceMapPostProcessingd (line 462) | class HoVerNetInstanceMapPostProcessingd(Transform):
method __init__ (line 494) | def __init__(
method __call__ (line 533) | def __call__(self, data):
class HoVerNetNuclearTypePostProcessingd (line 547) | class HoVerNetNuclearTypePostProcessingd(Transform):
method __init__ (line 563) | def __init__(
method __call__ (line 584) | def __call__(self, data):
FILE: monai/apps/pathology/transforms/stain/array.py
class ExtractHEStains (line 19) | class ExtractHEStains(Transform):
method __init__ (line 39) | def __init__(
method _deconvolution_extract_stain (line 47) | def _deconvolution_extract_stain(self, image: np.ndarray) -> np.ndarray:
method __call__ (line 100) | def __call__(self, image: np.ndarray) -> np.ndarray:
class NormalizeHEStains (line 116) | class NormalizeHEStains(Transform):
method __init__ (line 144) | def __init__(
method __call__ (line 157) | def __call__(self, image: np.ndarray) -> np.ndarray:
FILE: monai/apps/pathology/transforms/stain/dictionary.py
class ExtractHEStainsd (line 30) | class ExtractHEStainsd(MapTransform):
method __init__ (line 47) | def __init__(
method __call__ (line 59) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
class NormalizeHEStainsd (line 66) | class NormalizeHEStainsd(MapTransform):
method __init__ (line 92) | def __init__(
method __call__ (line 105) | def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashab...
FILE: monai/apps/pathology/utils.py
function compute_multi_instance_mask (line 26) | def compute_multi_instance_mask(mask: np.ndarray, threshold: float) -> Any:
function compute_isolated_tumor_cells (line 45) | def compute_isolated_tumor_cells(tumor_mask: np.ndarray, threshold: floa...
class PathologyProbNMS (line 61) | class PathologyProbNMS(ProbNMS):
method __call__ (line 67) | def __call__(self, probs_map: np.ndarray | torch.Tensor, resolution_le...
FILE: monai/apps/reconstruction/complex_utils.py
function convert_to_tensor_complex (line 27) | def convert_to_tensor_complex(
function complex_abs_t (line 102) | def complex_abs_t(x: Tensor) -> Tensor:
function complex_abs (line 117) | def complex_abs(x: NdarrayOrTensor) -> NdarrayOrTensor:
function complex_mul_t (line 138) | def complex_mul_t(x: Tensor, y: Tensor) -> Tensor:
function complex_mul (line 158) | def complex_mul(x: NdarrayOrTensor, y: NdarrayOrTensor) -> NdarrayOrTensor:
function complex_conj_t (line 192) | def complex_conj_t(x: Tensor) -> Tensor:
function complex_conj (line 208) | def complex_conj(x: NdarrayOrTensor) -> NdarrayOrTensor:
FILE: monai/apps/reconstruction/fastmri_reader.py
class FastMRIReader (line 29) | class FastMRIReader(ImageReader):
method verify_suffix (line 46) | def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
method read (line 56) | def read(self, data: Sequence[PathLike] | PathLike) -> dict: # type: ...
method get_data (line 78) | def get_data(self, dat: dict) -> tuple[ndarray, dict]:
method _get_meta_dict (line 95) | def _get_meta_dict(self, dat: dict) -> dict:
FILE: monai/apps/reconstruction/mri_utils.py
function root_sum_of_squares_t (line 19) | def root_sum_of_squares_t(x: Tensor, spatial_dim: int) -> Tensor:
function root_sum_of_squares (line 42) | def root_sum_of_squares(x: NdarrayOrTensor, spatial_dim: int) -> Ndarray...
FILE: monai/apps/reconstruction/networks/blocks/varnetblock.py
class VarNetBlock (line 21) | class VarNetBlock(nn.Module):
method __init__ (line 34) | def __init__(self, refinement_model: nn.Module, spatial_dims: int = 2):
method soft_dc (line 43) | def soft_dc(self, x: Tensor, ref_kspace: Tensor, mask: Tensor) -> Tensor:
method forward (line 60) | def forward(self, current_kspace: Tensor, ref_kspace: Tensor, mask: Te...
FILE: monai/apps/reconstruction/networks/nets/coil_sensitivity_model.py
class CoilSensitivityModel (line 29) | class CoilSensitivityModel(nn.Module):
method __init__ (line 55) | def __init__(
method get_fully_sampled_region (line 88) | def get_fully_sampled_region(self, mask: Tensor) -> tuple[int, int]:
method forward (line 115) | def forward(self, masked_kspace: Tensor, mask: Tensor) -> Tensor:
FILE: monai/apps/reconstruction/networks/nets/complex_unet.py
class ComplexUnet (line 29) | class ComplexUnet(nn.Module):
method __init__ (line 57) | def __init__(
method forward (line 93) | def forward(self, x: Tensor) -> Tensor:
FILE: monai/apps/reconstruction/networks/nets/utils.py
function reshape_complex_to_channel_dim (line 26) | def reshape_complex_to_channel_dim(x: Tensor) -> Tensor:
function reshape_channel_complex_to_last_dim (line 52) | def reshape_channel_complex_to_last_dim(x: Tensor) -> Tensor:
function reshape_channel_to_batch_dim (line 79) | def reshape_channel_to_batch_dim(x: Tensor) -> tuple[Tensor, int]:
function reshape_batch_channel_to_channel_dim (line 104) | def reshape_batch_channel_to_channel_dim(x: Tensor, batch_size: int) -> ...
function complex_normalize (line 129) | def complex_normalize(x: Tensor) -> tuple[Tensor, Tensor, Tensor]:
function divisible_pad_t (line 169) | def divisible_pad_t(
function inverse_divisible_pad_t (line 231) | def inverse_divisible_pad_t(
function floor_ceil (line 256) | def floor_ceil(n: float) -> tuple[int, int]:
function sensitivity_map_reduce (line 271) | def sensitivity_map_reduce(kspace: Tensor, sens_maps: Tensor, spatial_di...
function sensitivity_map_expand (line 291) | def sensitivity_map_expand(img: Tensor, sens_maps: Tensor, spatial_dims:...
FILE: monai/apps/reconstruction/networks/nets/varnet.py
class VariationalNetworkModel (line 25) | class VariationalNetworkModel(nn.Module):
method __init__ (line 45) | def __init__(
method forward (line 57) | def forward(self, masked_kspace: Tensor, mask: Tensor) -> Tensor:
FILE: monai/apps/reconstruction/transforms/array.py
class KspaceMask (line 29) | class KspaceMask(RandomizableTransform):
method __init__ (line 39) | def __init__(
method __call__ (line 75) | def __call__(self, kspace: NdarrayOrTensor) -> Sequence[Tensor]:
method randomize_choose_acceleration (line 89) | def randomize_choose_acceleration(self) -> Sequence[float]:
class RandomKspaceMask (line 107) | class RandomKspaceMask(KspaceMask):
method __call__ (line 139) | def __call__(self, kspace: NdarrayOrTensor) -> Sequence[Tensor]:
class EquispacedKspaceMask (line 196) | class EquispacedKspaceMask(KspaceMask):
method __call__ (line 227) | def __call__(self, kspace: NdarrayOrTensor) -> Sequence[Tensor]:
FILE: monai/apps/reconstruction/transforms/dictionary.py
class ExtractDataKeyFromMetaKeyd (line 31) | class ExtractDataKeyFromMetaKeyd(MapTransform):
method __init__ (line 47) | def __init__(self, keys: KeysCollection, meta_key: str, allow_missing_...
method __call__ (line 51) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
class RandomKspaceMaskd (line 72) | class RandomKspaceMaskd(RandomizableTransform, MapTransform):
method __init__ (line 100) | def __init__(
method set_random_state (line 117) | def set_random_state(
method __call__ (line 124) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
class EquispacedKspaceMaskd (line 141) | class EquispacedKspaceMaskd(RandomKspaceMaskd):
method __init__ (line 168) | def __init__(
method set_random_state (line 185) | def set_random_state(
class ReferenceBasedSpatialCropd (line 193) | class ReferenceBasedSpatialCropd(MapTransform, InvertibleTransform):
method __init__ (line 215) | def __init__(self, keys: KeysCollection, ref_key: str, allow_missing_k...
method __call__ (line 219) | def __call__(self, data: Mapping[Hashable, Tensor]) -> dict[Hashable, ...
class ReferenceBasedNormalizeIntensityd (line 246) | class ReferenceBasedNormalizeIntensityd(MapTransform):
method __init__ (line 277) | def __init__(
method __call__ (line 292) | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[H...
FILE: monai/apps/tcia/utils.py
function get_tcia_metadata (line 37) | def get_tcia_metadata(query: str, attribute: str | None = None) -> list:
function download_tcia_series_instance (line 76) | def download_tcia_series_instance(
function get_tcia_ref_uid (line 117) | def get_tcia_ref_uid(
function match_tcia_ref_uid_in_study (line 149) | def match_tcia_ref_uid_in_study(study_uid, ref_sop_uid):
FILE: monai/apps/utils.py
function get_logger (line 51) | def get_logger(
function _basename (line 84) | def _basename(p: PathLike) -> str:
function _download_with_progress (line 90) | def _download_with_progress(url: str, filepath: Path, progress: bool = T...
function safe_extract_member (line 125) | def safe_extract_member(member, extract_to):
function check_hash (line 157) | def check_hash(filepath: PathLike, val: str | None = None, hash_type: st...
function download_url (line 191) | def download_url(
function _extract_zip (line 277) | def _extract_zip(filepath, output_dir):
function _extract_tar (line 289) | def _extract_tar(filepath, output_dir):
function extractall (line 303) | def extractall(
function get_filename_from_url (line 358) | def get_filename_from_url(data_url: str) -> str:
function download_and_extract (line 381) | def download_and_extract(
FILE: monai/apps/vista3d/inferer.py
function point_based_window_inferer (line 28) | def point_based_window_inferer(
function _get_window_idx_c (line 143) | def _get_window_idx_c(p: int, roi: int, s: int) -> tuple[int, int]:
function _get_window_idx (line 154) | def _get_window_idx(p: int, roi: int, s: int, center_only: bool = True, ...
function _pad_previous_mask (line 166) | def _pad_previous_mask(
FILE: monai/apps/vista3d/sampler.py
function _get_point_label (line 34) | def _get_point_label(id: int) -> tuple[int, int]:
function sample_prompt_pairs (line 41) | def sample_prompt_pairs(
FILE: monai/apps/vista3d/transforms.py
function _get_name_to_index_mapping (line 29) | def _get_name_to_index_mapping(labels_dict: dict | None) -> dict:
function _convert_name_to_index (line 37) | def _convert_name_to_index(name_to_index_mapping: dict, label_prompt: li...
class VistaPreTransformd (line 57) | class VistaPreTransformd(MapTransform):
method __init__ (line 58) | def __init__(
method __call__ (line 91) | def __call__(self, data):
class VistaPostTransformd (line 123) | class VistaPostTransformd(MapTransform):
method __init__ (line 124) | def __init__(self, keys: KeysCollection, allow_missing_keys: bool = Fa...
method __call__ (line 142) | def __call__(self, data):
class Relabeld (line 177) | class Relabeld(MapTransform):
method __init__ (line 178) | def __init__(
method __call__ (line 216) | def __call__(self, data):
FILE: monai/auto3dseg/algo_gen.py
class Algo (line 18) | class Algo:
method set_data_stats (line 26) | def set_data_stats(self, *args, **kwargs):
method train (line 29) | def train(self, *args, **kwargs):
method predict (line 32) | def predict(self, *args, **kwargs):
method get_score (line 35) | def get_score(self, *args, **kwargs):
method get_output_path (line 38) | def get_output_path(self, *args, **kwargs):
class AlgoGen (line 42) | class AlgoGen(Randomizable):
method set_data_stats (line 66) | def set_data_stats(self, *args, **kwargs): # type ignore
method set_budget (line 69) | def set_budget(self, *args, **kwargs):
method set_score (line 72) | def set_score(self, *args, **kwargs):
method get_data_stats (line 75) | def get_data_stats(self, *args, **kwargs):
method get_budget (line 78) | def get_budget(self, *args, **kwargs):
method get_history (line 81) | def get_history(self, *args, **kwargs):
method generate (line 84) | def generate(self):
method run_algo (line 87) | def run_algo(self, *args, **kwargs):
FILE: monai/auto3dseg/analyzer.py
class Analyzer (line 58) | class Analyzer(MapTransform, ABC):
method __init__ (line 70) | def __init__(self, stats_name: str, report_format: dict) -> None:
method update_ops (line 77) | def update_ops(self, key: str, op: Operations) -> None:
method update_ops_nested_label (line 94) | def update_ops_nested_label(self, nested_key: str, op: Operations) -> ...
method get_report_format (line 119) | def get_report_format(self) -> dict:
method unwrap_ops (line 131) | def unwrap_ops(func):
method resolve_format (line 152) | def resolve_format(self, report: dict) -> None:
method __call__ (line 169) | def __call__(self, data: Any) -> dict:
class ImageStats (line 174) | class ImageStats(Analyzer):
method __init__ (line 201) | def __init__(self, image_key: str, stats_name: str = DataStatsKeys.IMA...
method __call__ (line 219) | def __call__(self, data):
class FgImageStats (line 292) | class FgImageStats(Analyzer):
method __init__ (line 315) | def __init__(self, image_key: str, label_key: str, stats_name: str = D...
method __call__ (line 324) | def __call__(self, data: Mapping) -> dict:
class LabelStats (line 373) | class LabelStats(Analyzer):
method __init__ (line 397) | def __init__(
method __call__ (line 421) | def __call__(self, data: Mapping[Hashable, MetaTensor]) -> dict[Hashab...
class ImageStatsSumm (line 542) | class ImageStatsSumm(Analyzer):
method __init__ (line 554) | def __init__(self, stats_name: str = DataStatsKeys.IMAGE_STATS, averag...
method __call__ (line 573) | def __call__(self, data: list[dict]) -> dict:
class FgImageStatsSumm (line 632) | class FgImageStatsSumm(Analyzer):
method __init__ (line 644) | def __init__(self, stats_name: str = DataStatsKeys.FG_IMAGE_STATS, ave...
method __call__ (line 651) | def __call__(self, data: list[dict]) -> dict:
class LabelStatsSumm (line 696) | class LabelStatsSumm(Analyzer):
method __init__ (line 708) | def __init__(
method __call__ (line 740) | def __call__(self, data: list[dict]) -> dict:
class FilenameStats (line 827) | class FilenameStats(Analyzer):
method __init__ (line 838) | def __init__(self, key: str | None, stats_name: str) -> None:
method __call__ (line 842) | def __call__(self, data):
class ImageHistogram (line 859) | class ImageHistogram(Analyzer):
method __init__ (line 885) | def __init__(
method __call__ (line 922) | def __call__(self, data: dict) -> dict:
class ImageHistogramSumm (line 976) | class ImageHistogramSumm(Analyzer):
method __init__ (line 988) | def __init__(self, stats_name: str = DataStatsKeys.IMAGE_HISTOGRAM, av...
method __call__ (line 995) | def __call__(self, data: list[dict]) -> dict:
FILE: monai/auto3dseg/operations.py
class Operations (line 23) | class Operations(UserDict):
method evaluate (line 28) | def evaluate(self, data: Any, **kwargs: Any) -> dict:
class SampleOperations (line 44) | class SampleOperations(Operations):
method __init__ (line 70) | def __init__(self) -> None:
method evaluate (line 86) | def evaluate(self, data: Any, **kwargs: Any) -> dict:
class SummaryOperations (line 106) | class SummaryOperations(Operations):
method __init__ (line 131) | def __init__(self) -> None:
method evaluate (line 144) | def evaluate(self, data: Any, **kwargs: Any) -> dict:
FILE: monai/auto3dseg/seg_summarizer.py
class SegSummarizer (line 34) | class SegSummarizer(Compose):
method __init__ (line 83) | def __init__(
method add_analyzer (line 123) | def add_analyzer(self, case_analyzer: Analyzer, summary_analyzer: Anal...
method summarize (line 173) | def summarize(self, data: list[dict]) -> dict[str, dict]:
FILE: monai/auto3dseg/utils.py
function get_foreground_image (line 50) | def get_foreground_image(image: MetaTensor) -> np.ndarray:
function get_foreground_label (line 70) | def get_foreground_label(image: MetaTensor, label: MetaTensor) -> MetaTe...
function get_label_ccp (line 86) | def get_label_ccp(mask_index: MetaTensor, use_gpu: bool = True) -> tuple...
function concat_val_to_np (line 129) | def concat_val_to_np(
function concat_multikeys_to_dict (line 186) | def concat_multikeys_to_dict(
function datafold_read (line 213) | def datafold_read(datalist: str | dict, basedir: str, fold: int = 0, key...
function verify_report_format (line 252) | def verify_report_format(report: dict, report_format: dict) -> bool:
function algo_to_pickle (line 277) | def algo_to_pickle(algo: Algo, template_path: PathLike | None = None, **...
function algo_from_pickle (line 300) | def algo_from_pickle(pkl_filename: str, template_path: PathLike | None =...
function list_to_python_fire_arg_str (line 378) | def list_to_python_fire_arg_str(args: list) -> str:
function check_and_set_optional_args (line 392) | def check_and_set_optional_args(params: dict) -> str:
function _prepare_cmd_default (line 404) | def _prepare_cmd_default(cmd: str, cmd_prefix: str | None = None, **kwar...
function _prepare_cmd_torchrun (line 434) | def _prepare_cmd_torchrun(cmd: str, **kwargs: Any) -> str:
function _prepare_cmd_bcprun (line 456) | def _prepare_cmd_bcprun(cmd: str, cmd_prefix: str | None = None, **kwarg...
function _run_cmd_torchrun (line 479) | def _run_cmd_torchrun(cmd: str, **kwargs: Any) -> subprocess.CompletedPr...
function _run_cmd_bcprun (line 505) | def _run_cmd_bcprun(cmd: str, **kwargs: Any) -> subprocess.CompletedProc...
FILE: monai/bundle/config_item.py
class Instantiable (line 30) | class Instantiable(ABC):
method is_disabled (line 36) | def is_disabled(self, *args: Any, **kwargs: Any) -> bool:
method instantiate (line 43) | def instantiate(self, *args: Any, **kwargs: Any) -> object:
class ComponentLocator (line 50) | class ComponentLocator:
method __init__ (line 62) | def __init__(self, excludes: Sequence[str] | str | None = None):
method _find_module_names (line 66) | def _find_module_names(self) -> list[str]:
method _find_classes_or_functions (line 73) | def _find_classes_or_functions(self, modnames: Sequence[str] | str) ->...
method get_component_module_name (line 96) | def get_component_module_name(self, name: str) -> list[str] | str | None:
class ConfigItem (line 117) | class ConfigItem:
method __init__ (line 131) | def __init__(self, config: Any, id: str = "") -> None:
method get_id (line 135) | def get_id(self) -> str:
method update_config (line 142) | def update_config(self, config: Any) -> None:
method get_config (line 153) | def get_config(self):
method __repr__ (line 160) | def __repr__(self) -> str:
class ConfigComponent (line 164) | class ConfigComponent(ConfigItem, Instantiable):
method __init__ (line 215) | def __init__(
method is_instantiable (line 226) | def is_instantiable(config: Any) -> bool:
method resolve_module_name (line 236) | def resolve_module_name(self):
method resolve_args (line 260) | def resolve_args(self):
method is_disabled (line 267) | def is_disabled(self) -> bool:
method instantiate (line 275) | def instantiate(self, **kwargs: Any) -> object:
class ConfigExpression (line 295) | class ConfigExpression(ConfigItem):
method __init__ (line 325) | def __init__(self, config: Any, id: str = "", globals: dict | None = N...
method _parse_import_string (line 329) | def _parse_import_string(self, import_string: str) -> Any | None:
method evaluate (line 348) | def evaluate(self, globals: dict | None = None, locals: dict | None = ...
method is_expression (line 387) | def is_expression(cls, config: dict | list | str) -> bool:
method is_import_statement (line 399) | def is_import_statement(cls, config: dict | list | str) -> bool:
FILE: monai/bundle/config_parser.py
class ConfigParser (line 38) | class ConfigParser:
method __init__ (line 102) | def __init__(
method __repr__ (line 123) | def __repr__(self):
method __getattr__ (line 126) | def __getattr__(self, id):
method __getitem__ (line 139) | def __getitem__(self, id: str | int) -> Any:
method __setitem__ (line 164) | def __setitem__(self, id: str | int, config: Any) -> None:
method get (line 190) | def get(self, id: str = "", default: Any | None = None) -> Any:
method set (line 204) | def set(self, config: Any, id: str = "", recursive: bool = True) -> None:
method update (line 226) | def update(self, pairs: dict[str, Any]) -> None:
method __contains__ (line 238) | def __contains__(self, id: str | int) -> bool:
method parse (line 251) | def parse(self, reset: bool = True) -> None:
method get_parsed_content (line 265) | def get_parsed_content(self, id: str = "", **kwargs: Any) -> Any:
method read_meta (line 292) | def read_meta(self, f: PathLike | Sequence[PathLike] | dict, **kwargs:...
method read_config (line 306) | def read_config(self, f: PathLike | Sequence[PathLike] | dict, **kwarg...
method _do_resolve (line 322) | def _do_resolve(self, config: Any, id: str = "") -> Any:
method resolve_macro_and_relative_ids (line 350) | def resolve_macro_and_relative_ids(self):
method _do_parse (line 360) | def _do_parse(self, config: Any, id: str = "") -> None:
method load_config_file (line 384) | def load_config_file(cls, filepath: PathLike, **kwargs: Any) -> dict:
method load_config_files (line 406) | def load_config_files(cls, files: PathLike | Sequence[PathLike] | dict...
method export_config_file (line 433) | def export_config_file(cls, config: dict, filepath: PathLike, fmt: str...
method split_path_id (line 455) | def split_path_id(cls, src: str) -> tuple[str, str]:
method resolve_relative_ids (line 474) | def resolve_relative_ids(cls, id: str, value: str) -> str:
FILE: monai/bundle/reference_resolver.py
class ReferenceResolver (line 26) | class ReferenceResolver:
method __init__ (line 60) | def __init__(self, items: Sequence[ConfigItem] | None = None):
method reset (line 65) | def reset(self):
method is_resolved (line 73) | def is_resolved(self) -> bool:
method add_item (line 76) | def add_item(self, item: ConfigItem) -> None:
method get_item (line 89) | def get_item(self, id: str, resolve: bool = False, **kwargs: Any) -> C...
method _resolve_one_item (line 107) | def _resolve_one_item(
method get_resolved_content (line 181) | def get_resolved_content(self, id: str, **kwargs: Any) -> ConfigExpres...
method remove_resolved_content (line 195) | def remove_resolved_content(self, id: str) -> Any | None:
method normalize_id (line 206) | def normalize_id(cls, id: str | int) -> str:
method normalize_meta_id (line 215) | def normalize_meta_id(self, config: Any) -> Any:
method split_id (line 233) | def split_id(cls, id: str | int, last: bool = False) -> list[str]:
method iter_subconfigs (line 247) | def iter_subconfigs(cls, id: str, config: Any) -> Iterator[tuple[str, ...
method match_refs_pattern (line 260) | def match_refs_pattern(cls, value: str) -> dict[str, int]:
method update_refs_pattern (line 282) | def update_refs_pattern(cls, value: str, refs: dict) -> str:
method find_refs_in_config (line 320) | def find_refs_in_config(cls, config: Any, id: str, refs: dict[str, int...
method update_config_with_refs (line 346) | def update_config_with_refs(cls, config: Any, id: str, refs: dict | No...
FILE: monai/bundle/scripts.py
function update_kwargs (line 74) | def update_kwargs(args: str | dict | None = None, ignore_none: bool = Tr...
function _pop_args (line 114) | def _pop_args(src: dict, *args: Any, **kwargs: Any) -> tuple:
function _log_input_summary (line 122) | def _log_input_summary(tag: str, args: dict) -> None:
function _get_var_names (line 129) | def _get_var_names(expr: str) -> list[str]:
function _get_fake_spatial_shape (line 141) | def _get_fake_spatial_shape(shape: Sequence[str | int], p: int = 1, n: i...
function _get_git_release_url (line 170) | def _get_git_release_url(repo_owner: str, repo_name: str, tag_name: str,...
function _get_ngc_bundle_url (line 174) | def _get_ngc_bundle_url(model_name: str, version: str) -> str:
function _get_ngc_private_base_url (line 178) | def _get_ngc_private_base_url(repo: str) -> str:
function _get_ngc_private_bundle_url (line 182) | def _get_ngc_private_bundle_url(model_name: str, version: str, repo: str...
function _get_monaihosting_bundle_url (line 186) | def _get_monaihosting_bundle_url(model_name: str, version: str) -> str:
function _download_from_github (line 190) | def _download_from_github(repo: str, download_path: Path, filename: str,...
function _download_from_monaihosting (line 200) | def _download_from_monaihosting(download_path: Path, filename: str, vers...
function _download_from_bundle_info (line 207) | def _download_from_bundle_info(download_path: Path, filename: str, versi...
function _add_ngc_prefix (line 217) | def _add_ngc_prefix(name: str, prefix: str = "monai_") -> str:
function _remove_ngc_prefix (line 223) | def _remove_ngc_prefix(name: str, prefix: str = "monai_") -> str:
function _get_all_download_files (line 229) | def _get_all_download_files(request_url: str, headers: dict | None = Non...
function _download_from_ngc (line 244) | def _download_from_ngc(
function _download_from_ngc_private (line 263) | def _download_from_ngc_private(
function _get_ngc_token (line 294) | def _get_ngc_token(api_key, retry=0):
function _examine_monai_version (line 311) | def _examine_monai_version(monai_version: str) -> tuple[bool, str]:
function _check_monai_version (line 330) | def _check_monai_version(bundle_dir: PathLike, name: str) -> None:
function _list_latest_versions (line 343) | def _list_latest_versions(data: dict, max_versions: int = 3) -> list[str]:
function _get_latest_bundle_version_ngc (line 376) | def _get_latest_bundle_version_ngc(name: str, repo: str | None = None, h...
function _get_latest_bundle_version (line 407) | def _get_latest_bundle_version(
function _process_bundle_dir (line 436) | def _process_bundle_dir(bundle_dir: PathLike | None = None) -> Path:
function download (line 446) | def download(
function load (line 628) | def load(
function _get_all_bundles_info (line 771) | def _get_all_bundles_info(
function get_all_bundles_list (line 815) | def get_all_bundles_list(
function get_bundle_versions (line 849) | def get_bundle_versions(
function get_bundle_info (line 883) | def get_bundle_info(
function run (line 924) | def run(
function run_workflow (line 1016) | def run_workflow(
function verify_metadata (line 1047) | def verify_metadata(
function _get_net_io_info (line 1108) | def _get_net_io_info(parser: ConfigParser | None = None, prefix: str = "...
function _get_fake_input_shape (line 1145) | def _get_fake_input_shape(parser: ConfigParser) -> tuple:
function verify_net_in_out (line 1158) | def verify_net_in_out(
function _export (line 1259) | def _export(
function onnx_export (line 1323) | def onnx_export(
function ckpt_export (line 1437) | def ckpt_export(
function trt_export (line 1571) | def trt_export(
function init_bundle (line 1747) | def init_bundle(
function _add_model_card_metadata (line 1837) | def _add_model_card_metadata(new_modelcard_path):
function push_to_hf_hub (line 1861) | def push_to_hf_hub(
function create_workflow (line 1921) | def create_workflow(
function download_large_files (line 1978) | def download_large_files(bundle_path: str | None = None, large_file_name...
FILE: monai/bundle/utils.py
function load_bundle_config (line 173) | def load_bundle_config(bundle_path: str, *config_names: str, **load_kw_a...
function merge_kv (line 248) | def merge_kv(args: dict | Any, k: str, v: Any) -> None:
FILE: monai/bundle/workflows.py
class BundleWorkflow (line 37) | class BundleWorkflow(ABC):
method __init__ (line 64) | def __init__(
method initialize (line 140) | def initialize(self, *args: Any, **kwargs: Any) -> Any:
method run (line 148) | def run(self, *args: Any, **kwargs: Any) -> Any:
method finalize (line 156) | def finalize(self, *args: Any, **kwargs: Any) -> Any:
method _get_property (line 164) | def _get_property(self, name: str, property: dict) -> Any:
method _set_property (line 176) | def _set_property(self, name: str, property: dict, value: Any) -> Any:
method __getattr__ (line 188) | def __getattr__(self, name):
method __setattr__ (line 194) | def __setattr__(self, name, value):
method get_workflow_type (line 200) | def get_workflow_type(self):
method get_meta_file (line 207) | def get_meta_file(self):
method add_property (line 214) | def add_property(self, name: str, required: str, desc: str | None = No...
method check_properties (line 232) | def check_properties(self) -> list[str] | None:
class PythonicWorkflow (line 243) | class PythonicWorkflow(BundleWorkflow):
method __init__ (line 281) | def __init__(
method initialize (line 306) | def initialize(self, *args: Any, **kwargs: Any) -> Any:
method _get_property (line 313) | def _get_property(self, name: str, property: dict) -> Any:
method _set_property (line 346) | def _set_property(self, name: str, property: dict, value: Any) -> Any:
class ConfigWorkflow (line 361) | class ConfigWorkflow(BundleWorkflow):
method __init__ (line 405) | def __init__(
method initialize (line 466) | def initialize(self) -> Any:
method run (line 476) | def run(self) -> Any:
method finalize (line 490) | def finalize(self) -> Any:
method check_properties (line 497) | def check_properties(self) -> list[str] | None:
method _run_expr (line 521) | def _run_expr(self, id: str, **kwargs: dict) -> list[Any]:
method _get_prop_id (line 539) | def _get_prop_id(self, name: str, property: dict) -> Any:
method _get_property (line 548) | def _get_property(self, name: str, property: dict) -> Any:
method _set_property (line 562) | def _set_property(self, name: str, property: dict, value: Any) -> None:
method add_property (line 579) | def add_property( # type: ignore[override]
method _check_optional_id (line 598) | def _check_optional_id(self, name: str, property: dict) -> bool:
method patch_bundle_tracking (line 629) | def patch_bundle_tracking(parser: ConfigParser, settings: dict) -> None:
FILE: monai/config/deviceconfig.py
function get_config_values (line 54) | def get_config_values():
function get_optional_config_values (line 67) | def get_optional_config_values():
function print_config (line 95) | def print_config(file=sys.stdout):
function _dict_append (line 120) | def _dict_append(in_dict, key, fn):
function get_system_info (line 127) | def get_system_info() -> OrderedDict:
function print_system_info (line 186) | def print_system_info(file: TextIO = sys.stdout) -> None:
function get_gpu_info (line 200) | def get_gpu_info() -> OrderedDict:
function print_gpu_info (line 234) | def print_gpu_info(file: TextIO = sys.stdout) -> None:
function print_debug_info (line 245) | def print_debug_info(file: TextIO = sys.stdout) -> None:
class IgniteInfo (line 267) | class IgniteInfo:
FILE: monai/csrc/ext.cpp
function PYBIND11_MODULE (line 21) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
FILE: monai/csrc/filtering/bilateral/bilateral.cpp
function BilateralFilter (line 21) | torch::Tensor BilateralFilter(torch::Tensor input, float spatial_sigma, ...
FILE: monai/csrc/filtering/bilateral/bilateralfilter_cpu.cpp
function BilateralFilterCpu (line 21) | void BilateralFilterCpu(torch::Tensor inputTensor, torch::Tensor outputT...
function BilateralFilterCpu (line 126) | torch::Tensor BilateralFilterCpu(torch::Tensor inputTensor, float spatia...
FILE: monai/csrc/filtering/bilateral/bilateralfilter_cpu_phl.cpp
function BilateralFilterPHLCpu (line 20) | void BilateralFilterPHLCpu(
function BilateralFilterPHLCpu (line 80) | torch::Tensor BilateralFilterPHLCpu(torch::Tensor inputTensor, float spa...
FILE: monai/csrc/filtering/permutohedral/permutohedral.cpp
function PermutohedralFilter (line 22) | torch::Tensor PermutohedralFilter(torch::Tensor input, torch::Tensor fea...
FILE: monai/csrc/filtering/permutohedral/permutohedral_cpu.cpp
class HashTablePermutohedral (line 57) | class HashTablePermutohedral {
method HashTablePermutohedral (line 63) | HashTablePermutohedral(int kd_, int vd_) : kd(kd_), vd(vd_) {
method size (line 73) | int size() {
method scalar_t (line 83) | scalar_t* getValues() {
method lookupOffset (line 93) | int lookupOffset(short* key, size_t h, bool create = true) {
method scalar_t (line 134) | scalar_t* lookup(short* k, bool create = true) {
method hash (line 144) | size_t hash(const short* key) {
method grow (line 155) | void grow() {
type Entry (line 191) | struct Entry {
method Entry (line 192) | Entry() : keyIdx(-1), valueIdx(-1) {}
class PermutohedralLattice (line 212) | class PermutohedralLattice {
method filter (line 218) | static void filter(scalar_t* data, scalar_t* features, int dataChannel...
method PermutohedralLattice (line 256) | PermutohedralLattice(int d_, int vd_, int nData_) : d(d_), vd(vd_), nD...
method splat (line 301) | void splat(scalar_t* position, scalar_t* value) {
method beginSlice (line 392) | void beginSlice() {
method slice (line 400) | void slice(scalar_t* col) {
method blur (line 413) | void blur() {
type ReplayEntry (line 484) | struct ReplayEntry {
function PermutohedralCPU (line 497) | void PermutohedralCPU(scalar_t* data, scalar_t* features, int dataChanne...
FILE: monai/csrc/filtering/trainable_bilateral/bf_layer_cpu_backward.cpp
function BilateralFilterCpuBackward_3d (line 35) | void BilateralFilterCpuBackward_3d(
function BilateralFilterCpuBackward (line 204) | torch::Tensor BilateralFilterCpuBackward(
FILE: monai/csrc/filtering/trainable_bilateral/bf_layer_cpu_forward.cpp
function BilateralFilterCpuForward_3d (line 35) | void BilateralFilterCpuForward_3d(
function BilateralFilterCpuForward (line 241) | std::tuple<torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor, t...
FILE: monai/csrc/filtering/trainable_bilateral/trainable_bilateral.cpp
function TrainableBilateralFilterForward (line 37) | std::tuple<torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor, t...
function TrainableBilateralFilterBackward (line 74) | torch::Tensor TrainableBilateralFilterBackward(
FILE: monai/csrc/filtering/trainable_joint_bilateral/jbf_layer_cpu_backward.cpp
function JointBilateralFilterCpuBackward_3d (line 35) | void JointBilateralFilterCpuBackward_3d(
function JointBilateralFilterCpuBackward (line 214) | std::tuple<torch::Tensor, torch::Tensor> JointBilateralFilterCpuBackward(
FILE: monai/csrc/filtering/trainable_joint_bilateral/jbf_layer_cpu_forward.cpp
function JointBilateralFilterCpuForward_3d (line 35) | void JointBilateralFilterCpuForward_3d(
function JointBilateralFilterCpuForward (line 243) | std::tuple<torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor, t...
FILE: monai/csrc/filtering/trainable_joint_bilateral/trainable_joint_bilateral.cpp
function TrainableJointBilateralFilterForward (line 37) | std::tuple<torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor, t...
function TrainableJointBilateralFilterBackward (line 75) | std::tuple<torch::Tensor, torch::Tensor> TrainableJointBilateralFilterBa...
FILE: monai/csrc/lltm/lltm_cpu.cpp
function d_sigmoid (line 18) | torch::Tensor d_sigmoid(torch::Tensor z) {
function d_tanh (line 24) | torch::Tensor d_tanh(torch::Tensor z) {
function d_elu (line 29) | torch::Tensor d_elu(torch::Tensor z, torch::Scalar alpha = 1.0) {
function lltm_cpu_forward (line 35) | std::vector<torch::Tensor> lltm_cpu_forward(
function lltm_cpu_backward (line 56) | std::vector<torch::Tensor> lltm_cpu_backward(
FILE: monai/csrc/resample/bounds_common.h
function namespace (line 32) | namespace monai {
FILE: monai/csrc/resample/interpolation_common.h
function namespace (line 47) | namespace monai {
FILE: monai/csrc/resample/pushpull.h
function namespace (line 52) | namespace monai {
FILE: monai/csrc/resample/pushpull_cpu.cpp
type monai (line 73) | namespace monai {
function MONAI_HOST (line 314) | MONAI_HOST
function MONAI_HOST (line 330) | MONAI_HOST
function MONAI_HOST (line 347) | MONAI_HOST
function MONAI_HOST (line 354) | MONAI_HOST
function MONAI_HOST (line 370) | MONAI_HOST
function MONAI_HOST (line 389) | MONAI_HOST
class PushPullImpl (line 490) | class PushPullImpl {
method PushPullImpl (line 493) | PushPullImpl(const PushPullAllocator& info)
method voxcount (line 582) | int64_t voxcount() const {
method MONAI_DEVICE (line 594) | MONAI_DEVICE void interpolate1d_sliding(scalar_t x, offset_t w, offs...
method MONAI_DEVICE (line 596) | MONAI_DEVICE void interpolate1d_sliding_nearest(scalar_t x, offset_t...
method MONAI_DEVICE (line 598) | MONAI_DEVICE void interpolate1d_sliding_linear(scalar_t x, offset_t ...
method MONAI_DEVICE (line 603) | MONAI_DEVICE void interpolate2d_sliding(scalar_t x, scalar_t y, offs...
method MONAI_DEVICE (line 605) | MONAI_DEVICE void interpolate2d_sliding_nearest(scalar_t x, scalar_t...
method MONAI_DEVICE (line 608) | MONAI_DEVICE void interpolate2d_sliding_bilinear(scalar_t x, scalar_...
method MONAI_DEVICE (line 629) | MONAI_DEVICE void interpolate3d_sliding(
method MONAI_DEVICE (line 638) | MONAI_DEVICE void interpolate3d_sliding_nearest(
method MONAI_DEVICE (line 647) | MONAI_DEVICE void interpolate3d_sliding_trilinear(
function MONAI_HOST (line 730) | MONAI_HOST void PushPullImpl<scalar_t, offset_t>::loop() const {
function MONAI_DEVICE (line 788) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::check3d(offset_t w...
function MONAI_DEVICE (line 841) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::check2d(offset_t w...
function MONAI_DEVICE (line 889) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::check1d(offset_t w...
function MONAI_DEVICE (line 939) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::interpolate3d(
function MONAI_DEVICE (line 1153) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::interpolate2d(
function MONAI_DEVICE (line 1332) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::interpolate1d(scal...
function MONAI_DEVICE (line 1476) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::interpolate3d_tril...
function MONAI_DEVICE (line 1767) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::interpolate2d_bili...
function MONAI_DEVICE (line 1947) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::interpolate1d_line...
function MONAI_DEVICE (line 2057) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::interpolate3d_near...
function MONAI_DEVICE (line 2105) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::interpolate2d_near...
function MONAI_DEVICE (line 2148) | MONAI_DEVICE void PushPullImpl<scalar_t, offset_t>::interpolate1d_near...
function MONAI_HOST (line 2218) | MONAI_HOST std::deque<Tensor> pushpull(
function MONAI_HOST (line 2244) | MONAI_HOST std::deque<Tensor> pushpull(
FILE: monai/csrc/utils/resample_utils.h
function namespace (line 44) | namespace monai {
function namespace (line 61) | namespace monai {
type class (line 79) | enum class
function InterpolationType (line 93) | enum class InterpolationType : int64_t {
FILE: monai/csrc/utils/tensor_description.h
function TensorDescription (line 19) | struct TensorDescription {
FILE: monai/csrc/utils/tensor_indexing.h
function Indexer (line 17) | struct Indexer {
FILE: monai/data/__init__.py
function _rebuild_meta (line 124) | def _rebuild_meta(cls, storage, dtype, metadata):
function reduce_meta_tensor (line 133) | def reduce_meta_tensor(meta_tensor):
FILE: monai/data/box_utils.py
class BoxMode (line 52) | class BoxMode(ABC):
method get_name (line 85) | def get_name(cls, spatial_dims: int) -> str:
method boxes_to_corners (line 98) | def boxes_to_corners(self, boxes: torch.Tensor) -> tuple:
method corners_to_boxes (line 119) | def corners_to_boxes(self, corners: Sequence) -> torch.Tensor:
class CornerCornerModeTypeA (line 140) | class CornerCornerModeTypeA(BoxMode):
method boxes_to_corners (line 156) | def boxes_to_corners(self, boxes: torch.Tensor) -> tuple:
method corners_to_boxes (line 161) | def corners_to_boxes(self, corners: Sequence) -> torch.Tensor:
class CornerCornerModeTypeB (line 167) | class CornerCornerModeTypeB(BoxMode):
method boxes_to_corners (line 183) | def boxes_to_corners(self, boxes: torch.Tensor) -> tuple:
method corners_to_boxes (line 194) | def corners_to_boxes(self, corners: Sequence) -> torch.Tensor:
class CornerCornerModeTypeC (line 204) | class CornerCornerModeTypeC(BoxMode):
method boxes_to_corners (line 220) | def boxes_to_corners(self, boxes: torch.Tensor) -> tuple:
method corners_to_boxes (line 230) | def corners_to_boxes(self, corners: Sequence) -> torch.Tensor:
class CornerSizeMode (line 240) | class CornerSizeMode(BoxMode):
method boxes_to_corners (line 256) | def boxes_to_corners(self, boxes: torch.Tensor) -> tuple:
method corners_to_boxes (line 275) | def corners_to_boxes(self, corners: Sequence) -> torch.Tensor:
class CenterSizeMode (line 289) | class CenterSizeMode(BoxMode):
method boxes_to_corners (line 305) | def boxes_to_corners(self, boxes: torch.Tensor) -> tuple:
method corners_to_boxes (line 329) | def corners_to_boxes(self, corners: Sequence) -> torch.Tensor:
function get_spatial_dims (line 365) | def get_spatial_dims(
function get_boxmode (line 457) | def get_boxmode(mode: str | BoxMode | type[BoxMode] | None = None, *args...
function standardize_empty_box (line 519) | def standardize_empty_box(boxes: NdarrayOrTensor, spatial_dims: int) -> ...
function convert_box_mode (line 546) | def convert_box_mode(
function convert_box_to_standard_mode (line 606) | def convert_box_to_standard_mode(
function box_centers (line 634) | def box_centers(boxes: NdarrayOrTensor) -> NdarrayOrTensor:
function centers_in_boxes (line 649) | def centers_in_boxes(centers: NdarrayOrTensor, boxes: NdarrayOrTensor, e...
function boxes_center_distance (line 680) | def boxes_center_distance(
function is_valid_box_values (line 723) | def is_valid_box_values(boxes: NdarrayOrTensor) -> bool:
function box_area (line 740) | def box_area(boxes: NdarrayOrTensor) -> NdarrayOrTensor:
function _box_inter_union (line 782) | def _box_inter_union(
function box_iou (line 820) | def box_iou(boxes1: NdarrayOrTensor, boxes2: NdarrayOrTensor) -> Ndarray...
function box_giou (line 863) | def box_giou(boxes1: NdarrayOrTensor, boxes2: NdarrayOrTensor) -> Ndarra...
function box_pair_giou (line 927) | def box_pair_giou(boxes1: NdarrayOrTensor, boxes2: NdarrayOrTensor) -> N...
function spatial_crop_boxes (line 1011) | def spatial_crop_boxes(
function clip_boxes_to_image (line 1068) | def clip_boxes_to_image(
function non_max_suppression (line 1087) | def non_max_suppression(
function batched_nms (line 1162) | def batched_nms(
FILE: monai/data/csv_saver.py
class CSVSaver (line 26) | class CSVSaver:
method __init__ (line 37) | def __init__(
method finalize (line 69) | def finalize(self) -> None:
method save (line 85) | def save(self, data: torch.Tensor | np.ndarray, meta_data: dict | None...
method save_batch (line 101) | def save_batch(self, batch_data: torch.Tensor | np.ndarray, meta_data:...
method get_cache (line 115) | def get_cache(self) -> OrderedDict:
method reset_cache (line 120) | def reset_cache(self) -> None:
FILE: monai/data/dataloader.py
class DataLoader (line 26) | class DataLoader(_TorchDataLoader):
method __init__ (line 79) | def __init__(self, dataset: Dataset, num_workers: int = 0, **kwargs) -...
FILE: monai/data/dataset.py
class Dataset (line 57) | class Dataset(_TorchDataset):
method __init__ (line 73) | def __init__(self, data: Sequence, transform: Sequence[Callable] | Cal...
method __len__ (line 87) | def __len__(self) -> int:
method _transform (line 90) | def _transform(self, index: int):
method __getitem__ (line 97) | def __getitem__(self, index: int | slice | Sequence[int]):
class DatasetFunc (line 112) | class DatasetFunc(Dataset):
method __init__ (line 141) | def __init__(self, data: Any, func: Callable, **kwargs) -> None:
method reset (line 148) | def reset(self, data: Any | None = None, func: Callable | None = None,...
class PersistentDataset (line 162) | class PersistentDataset(Dataset):
method __init__ (line 223) | def __init__(
method set_transform_hash (line 303) | def set_transform_hash(self, hash_xform_func: Callable[..., bytes]):
method set_data (line 323) | def set_data(self, data: Sequence):
method _pre_transform (line 333) | def _pre_transform(self, item_transformed):
method _post_transform (line 354) | def _post_transform(self, item_transformed):
method _cachecheck (line 372) | def _cachecheck(self, item_transformed):
method _transform (line 436) | def _transform(self, index: int):
class CacheNTransDataset (line 441) | class CacheNTransDataset(PersistentDataset):
method __init__ (line 447) | def __init__(
method _pre_transform (line 507) | def _pre_transform(self, item_transformed):
method _post_transform (line 522) | def _post_transform(self, item_transformed):
class LMDBDataset (line 535) | class LMDBDataset(PersistentDataset):
method __init__ (line 551) | def __init__(
method set_data (line 615) | def set_data(self, data: Sequence):
method _safe_serialize (line 623) | def _safe_serialize(self, val):
method _safe_deserialize (line 629) | def _safe_deserialize(self, val):
method _fill_cache_start_reader (line 632) | def _fill_cache_start_reader(self, show_progress=True):
method _cachecheck (line 689) | def _cachecheck(self, item_transformed):
method info (line 708) | def info(self):
class CacheDataset (line 721) | class CacheDataset(Dataset):
method __init__ (line 776) | def __init__(
method set_data (line 848) | def set_data(self, data: Sequence) -> None:
method _fill_cache (line 885) | def _fill_cache(self, indices=None) -> list:
method _load_cache_item (line 905) | def _load_cache_item(self, idx: int):
method _transform (line 921) | def _transform(self, index: int):
class SmartCacheDataset (line 956) | class SmartCacheDataset(Randomizable, CacheDataset):
method __init__ (line 1029) | def __init__(
method set_data (line 1087) | def set_data(self, data: Sequence):
method randomize (line 1103) | def randomize(self, data: Sequence) -> None:
method _compute_data_idx (line 1109) | def _compute_data_idx(self) -> None:
method is_started (line 1120) | def is_started(self):
method start (line 1127) | def start(self):
method _restart (line 1135) | def _restart(self):
method _try_update_cache (line 1144) | def _try_update_cache(self):
method update_cache (line 1167) | def update_cache(self):
method _try_shutdown (line 1179) | def _try_shutdown(self):
method shutdown (line 1193) | def shutdown(self):
method _replace_cache_thread (line 1207) | def _replace_cache_thread(self, index: int):
method _compute_replacements (line 1215) | def _compute_replacements(self):
method _try_manage_replacement (line 1226) | def _try_manage_replacement(self, check_round):
method manage_replacement (line 1241) | def manage_replacement(self) -> None:
method __len__ (line 1252) | def __len__(self):
class ZipDataset (line 1260) | class ZipDataset(Dataset):
method __init__ (line 1283) | def __init__(self, datasets: Sequence, transform: Callable | None = No...
method __len__ (line 1291) | def __len__(self) -> int:
method _transform (line 1294) | def _transform(self, index: int):
class ArrayDataset (line 1310) | class ArrayDataset(Randomizable, _TorchDataset):
method __init__ (line 1360) | def __init__(
method __len__ (line 1389) | def __len__(self) -> int:
method randomize (line 1392) | def randomize(self, data: Any | None = None) -> None:
method __getitem__ (line 1395) | def __getitem__(self, index: int):
class NPZDictItemDataset (line 1409) | class NPZDictItemDataset(Dataset):
method __init__ (line 1424) | def __init__(
method __len__ (line 1449) | def __len__(self):
method _transform (line 1452) | def _transform(self, index: int):
class CSVDataset (line 1461) | class CSVDataset(Dataset):
method __init__ (line 1509) | def __init__(
class GDSDataset (line 1536) | class GDSDataset(PersistentDataset):
method __init__ (line 1547) | def __init__(
method _cachecheck (line 1595) | def _cachecheck(self, item_transformed):
method _create_new_cache (line 1674) | def _create_new_cache(self, data, data_hashfile, meta_hash_file_name):
method _load_meta_cache (line 1706) | def _load_meta_cache(self, meta_hash_file_name):
FILE: monai/data/dataset_summary.py
class DatasetSummary (line 31) | class DatasetSummary:
method __init__ (line 45) | def __init__(
method collect_meta_data (line 81) | def collect_meta_data(self):
method get_target_spacing (line 96) | def get_target_spacing(self, spacing_key: str = "affine", anisotropic_...
method calculate_statistics (line 136) | def calculate_statistics(self, foreground_threshold: int = 0):
method calculate_percentiles (line 173) | def calculate_percentiles(
FILE: monai/data/decathlon_datalist.py
function _compute_path (line 27) | def _compute_path(base_dir: PathLike, element: PathLike, check_path: boo...
function _compute_path (line 31) | def _compute_path(base_dir: PathLike, element: list[PathLike], check_pat...
function _compute_path (line 34) | def _compute_path(base_dir, element, check_path=False):
function _append_paths (line 64) | def _append_paths(base_dir: PathLike, is_segmentation: bool, items: list...
function load_decathlon_datalist (line 87) | def load_decathlon_datalist(
function load_decathlon_properties (line 170) | def load_decathlon_properties(data_property_file_path: PathLike, propert...
function check_missing_files (line 196) | def check_missing_files(
function create_cross_validation_datalist (line 234) | def create_cross_validation_datalist(
FILE: monai/data/fft_utils.py
function ifftn_centered (line 21) | def ifftn_centered(ksp: NdarrayOrTensor, spatial_dims: int, is_complex: ...
function fftn_centered (line 60) | def fftn_centered(im: NdarrayOrTensor, spatial_dims: int, is_complex: bo...
FILE: monai/data/folder_layout.py
function default_name_formatter (line 23) | def default_name_formatter(metadict: dict, saver: monai.transforms.Trans...
class FolderLayoutBase (line 35) | class FolderLayoutBase(ABC):
method filename (line 78) | def filename(self, **kwargs) -> PathLike:
class FolderLayout (line 86) | class FolderLayout(FolderLayoutBase):
method __init__ (line 111) | def __init__(
method filename (line 137) | def filename(self, subject: PathLike = "subject", idx=None, **kwargs) ...
FILE: monai/data/grid_dataset.py
class PatchIter (line 42) | class PatchIter:
method __init__ (line 49) | def __init__(
method __call__ (line 85) | def __call__(self, array: NdarrayTensor) -> Generator[tuple[NdarrayTen...
class PatchIterd (line 102) | class PatchIterd:
method __init__ (line 130) | def __init__(
method __call__ (line 141) | def __call__(
class GridPatchDataset (line 160) | class GridPatchDataset(IterableDataset):
method __init__ (line 221) | def __init__(
method set_data (line 265) | def set_data(self, data: Sequence) -> None:
method _fill_cache (line 283) | def _fill_cache(self, indices=None) -> list:
method _load_cache_item (line 303) | def _load_cache_item(self, idx: int):
method _generate_patches (line 321) | def _generate_patches(self, src, **apply_args):
method __iter__ (line 339) | def __iter__(self):
class PatchDataset (line 366) | class PatchDataset(IterableDataset):
method __init__ (line 407) | def __init__(
method __len__ (line 426) | def __len__(self) -> int:
method __iter__ (line 429) | def __iter__(self):
FILE: monai/data/image_dataset.py
class ImageDataset (line 26) | class ImageDataset(Dataset, Randomizable):
method __init__ (line 36) | def __init__(
method __len__ (line 96) | def __len__(self) -> int:
method randomize (line 99) | def randomize(self, data: Any | None = None) -> None:
method __getitem__ (line 102) | def __getitem__(self, index: int):
FILE: monai/data/image_reader.py
class ImageReader (line 70) | class ImageReader(ABC):
method verify_suffix (line 90) | def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
method read (line 104) | def read(self, data: Sequence[PathLike] | PathLike, **kwargs) -> Seque...
method get_data (line 117) | def get_data(self, img) -> tuple[np.ndarray, dict]:
function _copy_compatible_dict (line 130) | def _copy_compatible_dict(from_dict: dict, to_dict: dict):
function _stack_images (line 153) | def _stack_images(image_list: list, meta_dict: dict, to_cupy: bool = Fal...
class ITKReader (line 169) | class ITKReader(ImageReader):
method __init__ (line 200) | def __init__(
method verify_suffix (line 217) | def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
method read (line 228) | def read(self, data: Sequence[PathLike] | PathLike, **kwargs):
method get_data (line 279) | def get_data(self, img) -> tuple[np.ndarray, dict]:
method _get_meta_dict (line 312) | def _get_meta_dict(self, img) -> dict:
method _get_affine (line 331) | def _get_affine(self, img, lps_to_ras: bool = True):
method _get_spatial_shape (line 354) | def _get_spatial_shape(self, img):
method _get_array_data (line 369) | def _get_array_data(self, img):
class PydicomReader (line 393) | class PydicomReader(ImageReader):
method __init__ (line 440) | def __init__(
method warmup_kvikio (line 470) | def warmup_kvikio(self):
method verify_suffix (line 487) | def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
method read (line 498) | def read(self, data: Sequence[PathLike] | PathLike, **kwargs):
method _combine_dicom_series (line 555) | def _combine_dicom_series(self, data: Iterable, filenames: Sequence[Pa...
method get_data (line 626) | def get_data(self, data) -> tuple[np.ndarray, dict]:
method _get_meta_dict (line 703) | def _get_meta_dict(self, img) -> dict:
method _get_affine (line 729) | def _get_affine(self, metadata: dict, lps_to_ras: bool = True):
method _get_frame_data (line 773) | def _get_frame_data(self, img, filename, array_data) -> Iterator:
method _get_seg_data (line 829) | def _get_seg_data(self, img, filename):
method _get_array_data_from_gpu (line 906) | def _get_array_data_from_gpu(self, img, filename):
method _get_array_data (line 961) | def _get_array_data(self, img, filename):
class NibabelReader (line 1001) | class NibabelReader(ImageReader):
method __init__ (line 1021) | def __init__(
method warmup_kvikio (line 1045) | def warmup_kvikio(self):
method verify_suffix (line 1062) | def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
method read (line 1074) | def read(self, data: Sequence[PathLike] | PathLike, **kwargs):
method get_data (line 1099) | def get_data(self, img) -> tuple[np.ndarray, dict]:
method _get_meta_dict (line 1142) | def _get_meta_dict(self, img) -> dict:
method _get_affine (line 1157) | def _get_affine(self, img):
method _get_spatial_shape (line 1168) | def _get_spatial_shape(self, img):
method _get_array_data (line 1192) | def _get_array_data(self, img, filename):
class NumpyReader (line 1223) | class NumpyReader(ImageReader):
method __init__ (line 1238) | def __init__(self, npz_keys: KeysCollection | None = None, channel_dim...
method verify_suffix (line 1246) | def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
method read (line 1257) | def read(self, data: Sequence[PathLike] | PathLike, **kwargs):
method get_data (line 1287) | def get_data(self, img) -> tuple[np.ndarray, dict]:
class PILReader (line 1323) | class PILReader(ImageReader):
method __init__ (line 1337) | def __init__(self, converter: Callable | None = None, reverse_indexing...
method verify_suffix (line 1343) | def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
method read (line 1354) | def read(self, data: Sequence[PathLike] | PathLike | np.ndarray, **kwa...
method get_data (line 1380) | def get_data(self, img) -> tuple[np.ndarray, dict]:
method _get_meta_dict (line 1409) | def _get_meta_dict(self, img) -> dict:
method _get_spatial_shape (line 1418) | def _get_spatial_shape(self, img):
class NrrdImage (line 1428) | class NrrdImage:
class NrrdReader (line 1436) | class NrrdReader(ImageReader):
method __init__ (line 1456) | def __init__(
method verify_suffix (line 1470) | def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
method read (line 1482) | def read(self, data: Sequence[PathLike] | PathLike, **kwargs) -> Seque...
method get_data (line 1501) | def get_data(self, img: NrrdImage | list[NrrdImage]) -> tuple[np.ndarr...
method _get_affine (line 1541) | def _get_affine(self, header: dict) -> np.ndarray:
method _switch_lps_ras (line 1560) | def _switch_lps_ras(self, header: dict) -> dict:
method _convert_f_to_c_order (line 1576) | def _convert_f_to_c_order(self, header: dict) -> dict:
FILE: monai/data/image_writer.py
function register_writer (line 67) | def register_writer(ext_name, *im_writers):
function resolve_writer (line 92) | def resolve_writer(ext_name, error_if_not_found=True) -> Sequence:
class ImageWriter (line 125) | class ImageWriter:
method __init__ (line 178) | def __init__(self, **kwargs):
method set_data_array (line 188) | def set_data_array(self, data_array, **kwargs):
method set_metadata (line 191) | def set_metadata(self, meta_dict: Mapping | None, **options):
method write (line 194) | def write(self, filename: PathLike, verbose: bool = True, **kwargs):
method create_backend_obj (line 200) | def create_backend_obj(cls, data_array: NdarrayOrTensor, **kwargs) -> ...
method resample_if_needed (line 208) | def resample_if_needed(
method convert_to_channel_last (line 284) | def convert_to_channel_last(
method get_meta_info (line 333) | def get_meta_info(cls, metadata: Mapping | None = None):
class ITKWriter (line 347) | class ITKWriter(ImageWriter):
method __init__ (line 376) | def __init__(self, output_dtype: DtypeLike = np.float32, affine_lps_to...
method set_data_array (line 396) | def set_data_array(
method set_metadata (line 425) | def set_metadata(self, meta_dict: Mapping | None = None, resample: boo...
method write (line 451) | def write(self, filename: PathLike, verbose: bool = False, **kwargs):
method create_backend_obj (line 479) | def create_backend_obj(
class NibabelWriter (line 534) | class NibabelWriter(ImageWriter):
method __init__ (line 554) | def __init__(self, output_dtype: DtypeLike = np.float32, **kwargs):
method set_data_array (line 566) | def set_data_array(
method set_metadata (line 587) | def set_metadata(self, meta_dict: Mapping | None, resample: bool = Tru...
method write (line 615) | def write(self, filename: PathLike, verbose: bool = False, **obj_kwargs):
method create_backend_obj (line 641) | def create_backend_obj(
class PILWriter (line 675) | class PILWriter(ImageWriter):
method __init__ (line 697) | def __init__(
method set_data_array (line 711) | def set_data_array(
method set_metadata (line 739) | def set_metadata(self, meta_dict: Mapping | None = None, resample: boo...
method write (line 759) | def write(self, filename: PathLike, verbose: bool = False, **kwargs):
method get_meta_info (line 785) | def get_meta_info(cls, metadata: Mapping | None = None):
method resample_and_clip (line 789) | def resample_and_clip(
method create_backend_obj (line 822) | def create_backend_obj(
function init (line 865) | def init():
FILE: monai/data/iterable_dataset.py
class IterableDataset (line 28) | class IterableDataset(_TorchIterableDataset):
method __init__ (line 43) | def __init__(self, data: Iterable[Any], transform: Callable | None = N...
method __iter__ (line 53) | def __iter__(self):
class ShuffleBuffer (line 66) | class ShuffleBuffer(Randomizable, IterableDataset):
method __init__ (line 100) | def __init__(self, data, transform=None, buffer_size: int = 512, seed:...
method randomized_pop (line 107) | def randomized_pop(self, buffer):
method generate_item (line 114) | def generate_item(self):
method __iter__ (line 124) | def __iter__(self):
method randomize (line 134) | def randomize(self, size: int) -> None:
class CSVIterableDataset (line 138) | class CSVIterableDataset(IterableDataset):
method __init__ (line 200) | def __init__(
method reset (line 228) | def reset(self, src: str | Sequence[str] | Iterable | Sequence[Iterabl...
method close (line 252) | def close(self):
method _flattened (line 264) | def _flattened(self):
method __iter__ (line 274) | def __iter__(self):
FILE: monai/data/itk_torch_bridge.py
function itk_image_to_metatensor (line 43) | def itk_image_to_metatensor(
function metatensor_to_itk_image (line 69) | def metatensor_to_itk_image(
function itk_to_monai_affine (line 105) | def itk_to_monai_affine(image, matrix, translation, center_of_rotation=N...
function monai_to_itk_affine (line 157) | def monai_to_itk_affine(image, affine_matrix, center_of_rotation=None):
function get_itk_image_center (line 194) | def get_itk_image_center(image):
function _assert_itk_regions_match_array (line 213) | def _assert_itk_regions_match_array(image):
function _compute_offset_matrix (line 244) | def _compute_offset_matrix(image, center_of_rotation) -> tuple[torch.Ten...
function _compute_spacing_matrix (line 255) | def _compute_spacing_matrix(image) -> tuple[torch.Tensor, torch.Tensor]:
function _compute_direction_matrix (line 267) | def _compute_direction_matrix(image) -> tuple[torch.Tensor, torch.Tensor]:
function _compute_reference_space_affine_matrix (line 279) | def _compute_reference_space_affine_matrix(image, ref_image) -> torch.Te...
function monai_to_itk_ddf (line 310) | def monai_to_itk_ddf(image, ddf):
FILE: monai/data/meta_obj.py
function set_track_meta (line 30) | def set_track_meta(val: bool) -> None:
function get_track_meta (line 47) | def get_track_meta() -> bool:
class MetaObj (line 63) | class MetaObj:
method __init__ (line 82) | def __init__(self) -> None:
method flatten_meta_objs (line 89) | def flatten_meta_objs(*args: Iterable):
method copy_items (line 108) | def copy_items(data):
method copy_meta_from (line 118) | def copy_meta_from(self, input_objs, copy_attr=True, keys=None):
method get_default_meta (line 141) | def get_default_meta() -> dict:
method get_default_applied_operations (line 150) | def get_default_applied_operations() -> list:
method __repr__ (line 158) | def __repr__(self) -> str:
method meta (line 177) | def meta(self) -> dict:
method meta (line 182) | def meta(self, d) -> None:
method applied_operations (line 190) | def applied_operations(self) -> list[dict]:
method applied_operations (line 197) | def applied_operations(self, t) -> None:
method push_applied_operation (line 205) | def push_applied_operation(self, t: Any) -> None:
method pop_applied_operation (line 208) | def pop_applied_operation(self) -> Any:
method pending_operations (line 212) | def pending_operations(self) -> list[dict]:
method has_pending_operations (line 219) | def has_pending_operations(self) -> bool:
method push_pending_operation (line 227) | def push_pending_operation(self, t: Any) -> None:
method pop_pending_operation (line 230) | def pop_pending_operation(self) -> Any:
method clear_pending_operations (line 233) | def clear_pending_operations(self) -> Any:
method is_batch (line 237) | def is_batch(self) -> bool:
method is_batch (line 242) | def is_batch(self, val: bool) -> None:
FILE: monai/data/meta_tensor.py
function _get_named_tuple_like_type (line 35) | def _get_named_tuple_like_type(func):
function _not_requiring_metadata (line 46) | def _not_requiring_metadata(ret):
class MetaTensor (line 52) | class MetaTensor(MetaObj, torch.Tensor):
method __new__ (line 107) | def __new__(
method __init__ (line 119) | def __init__(
method update_meta (line 175) | def update_meta(rets: Sequence, func, args, kwargs) -> Sequence:
method _handle_batched (line 230) | def _handle_batched(cls, ret, idx, metas, func, args, kwargs):
method __torch_function__ (line 279) | def __torch_function__(cls, func, types, args=(), kwargs=None) -> Any:
method _convert (line 308) | def _convert(x):
method __array_function__ (line 313) | def __array_function__(self, func, types, args, kwargs):
method __array_ufunc__ (line 324) | def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):
method get_default_affine (line 346) | def get_default_affine(dtype=torch.float64) -> torch.Tensor:
method as_tensor (line 349) | def as_tensor(self) -> torch.Tensor:
method get_array (line 356) | def get_array(self, output_type=np.ndarray, dtype=None, device=None, *...
method set_array (line 372) | def set_array(self, src, non_blocking: bool = False, *_args, **_kwargs):
method array (line 395) | def array(self):
method array (line 407) | def array(self, src) -> None:
method as_dict (line 411) | def as_dict(self, key: str, output_type=torch.Tensor, dtype=None) -> d...
method astype (line 434) | def astype(self, dtype, device=None, *_args, **_kwargs):
method affine (line 464) | def affine(self) -> torch.Tensor:
method affine (line 469) | def affine(self, d: NdarrayTensor) -> None:
method pixdim (line 474) | def pixdim(self):
method peek_pending_shape (line 480) | def peek_pending_shape(self):
method peek_pending_affine (line 491) | def peek_pending_affine(self):
method peek_pending_rank (line 505) | def peek_pending_rank(self):
method new_empty (line 509) | def new_empty(self, size, dtype=None, device=None, requires_grad=False...
method clone (line 520) | def clone(self, **kwargs):
method ensure_torch_and_prune_meta (line 534) | def ensure_torch_and_prune_meta(
method __repr__ (line 583) | def __repr__(self): # type: ignore[override]
method __str__ (line 591) | def __str__(self):
method __format__ (line 599) | def __format__(self, format_spec):
method print_verbose (line 605) | def print_verbose(self) -> None:
FILE: monai/data/samplers.py
class DistributedSampler (line 23) | class DistributedSampler(_TorchDistributedSampler):
method __init__ (line 43) | def __init__(
class DistributedWeightedRandomSampler (line 64) | class DistributedWeightedRandomSampler(DistributedSampler):
method __init__ (line 88) | def __init__(
method __iter__ (line 105) | def __iter__(self):
method __len__ (line 114) | def __len__(self):
FILE: monai/data/synthetic.py
function create_test_image_2d (line 21) | def create_test_image_2d(
function create_test_image_3d (line 97) | def create_test_image_3d(
FILE: monai/data/test_time_augmentation.py
function _identity (line 45) | def _identity(x):
class TestTimeAugmentation (line 49) | class TestTimeAugmentation:
method __init__ (line 115) | def __init__(
method _check_transforms (line 159) | def _check_transforms(self):
method __call__ (line 179) | def __call__(
FILE: monai/data/thread_buffer.py
class ThreadBuffer (line 23) | class ThreadBuffer:
method __init__ (line 40) | def __init__(self, src, buffer_size: int = 1, timeout: float = 0.01):
method enqueue_values (line 48) | def enqueue_values(self):
method stop (line 60) | def stop(self):
method __iter__ (line 68) | def __iter__(self):
function buffer_iterator (line 83) | def buffer_iterator(src, buffer_size: int = 1, timeout: float = 0.01, re...
class _ProcessThread (line 104) | class _ProcessThread(Thread):
method pid (line 108) | def pid(self):
method run (line 111) | def run(self):
class _ProcessQueue (line 118) | class _ProcessQueue(Queue):
method close (line 121) | def close(self):
method cancel_join_thread (line 124) | def cancel_join_thread(self):
class _ProcessThreadContext (line 128) | class _ProcessThreadContext(SpawnContext):
class ThreadDataLoader (line 137) | class ThreadDataLoader(DataLoader):
method __init__ (line 178) | def __init__(
method __iter__ (line 198) | def __iter__(self):
FILE: monai/data/torchscript_utils.py
function save_net_with_metadata (line 28) | def save_net_with_metadata(
function load_net_with_metadata (line 103) | def load_net_with_metadata(
FILE: monai/data/ultrasound_confidence_map.py
class UltrasoundConfidenceMap (line 29) | class UltrasoundConfidenceMap:
method __init__ (line 52) | def __init__(
method sub2ind (line 79) | def sub2ind(self, size: tuple[int, ...], rows: NDArray, cols: NDArray)...
method get_seed_and_labels (line 97) | def get_seed_and_labels(
method normalize (line 171) | def normalize(self, inp: NDArray) -> NDArray:
method attenuation_weighting (line 176) | def attenuation_weighting(self, img: NDArray, alpha: float) -> NDArray:
method confidence_laplacian (line 195) | def confidence_laplacian(self, padded_index: NDArray, padded_image: ND...
method _solve_linear_system (line 282) | def _solve_linear_system(self, lap, rhs):
method confidence_estimation (line 294) | def confidence_estimation(self, img, seeds, labels, beta, gamma):
method __call__ (line 352) | def __call__(self, data: NDArray, sink_mask: NDArray | None = None) ->...
FILE: monai/data/utils.py
function get_random_patch (line 105) | def get_random_patch(
function iter_patch_slices (line 130) | def iter_patch_slices(
function dense_patch_slices (line 164) | def dense_patch_slices(
function iter_patch_position (line 207) | def iter_patch_position(
function iter_patch (line 255) | def iter_patch(
function get_valid_patch_size (line 341) | def get_valid_patch_size(image_size: Sequence[int], patch_size: Sequence...
function dev_collate (line 355) | def dev_collate(batch, level: int = 1, logger_name: str = "dev_collate"):
function collate_meta_tensor_fn (line 419) | def collate_meta_tensor_fn(batch, *, collate_fn_map=None):
function collate_meta_tensor (line 438) | def collate_meta_tensor(batch):
function list_data_collate (line 455) | def list_data_collate(batch: Sequence):
function _non_zipping_check (line 512) | def _non_zipping_check(batch_data: Mapping | Iterable, detach: bool, pad...
function decollate_batch (line 538) | def decollate_batch(batch, detach: bool = True, pad=True, fill_value=None):
function pad_list_data_collate (line 644) | def pad_list_data_collate(batch: Sequence, method: str = Method.SYMMETRI...
function no_collation (line 670) | def no_collation(x):
function worker_init_fn (line 677) | def worker_init_fn(worker_id: int) -> None:
function set_rnd (line 687) | def set_rnd(obj, seed: int) -> int:
function affine_to_spacing (line 712) | def affine_to_spacing(affine: NdarrayTensor, r: int = 3, dtype=float, su...
function correct_nifti_header_if_necessary (line 738) | def correct_nifti_header_if_necessary(img_nii):
function rectify_header_sform_qform (line 761) | def rectify_header_sform_qform(img_nii):
function zoom_affine (line 798) | def zoom_affine(affine: np.ndarray, scale: np.ndarray | Sequence[float],...
function compute_shape_offset (line 850) | def compute_shape_offset(
function to_affine_nd (line 913) | def to_affine_nd(r: np.ndarray | int, affine: NdarrayTensor, dtype=np.fl...
function reorient_spatial_axes (line 960) | def reorient_spatial_axes(
function create_file_basename (line 984) | def create_file_basename(
function compute_importance_map (line 1059) | def compute_importance_map(
function is_supported_format (line 1112) | def is_supported_format(filename: Sequence[PathLike] | PathLike, suffixe...
function partition_dataset (line 1132) | def partition_dataset(
function partition_dataset_classes (line 1242) | def partition_dataset_classes(
function resample_datalist (line 1310) | def resample_datalist(data: Sequence, factor: float, random_pick: bool =...
function select_cross_validation_folds (line 1335) | def select_cross_validation_folds(partitions: Sequence[Iterable], folds:...
function json_hashing (line 1360) | def json_hashing(item) -> bytes:
function pickle_hashing (line 1380) | def pickle_hashing(item, protocol=pickle.HIGHEST_PROTOCOL) -> bytes:
function sorted_dict (line 1401) | def sorted_dict(item, key=None, reverse=False):
function convert_tables_to_dicts (line 1408) | def convert_tables_to_dicts(
function orientation_ras_lps (line 1485) | def orientation_ras_lps(affine: NdarrayTensor) -> NdarrayTensor:
function remove_keys (line 1501) | def remove_keys(data: dict, keys: list[str]) -> None:
function remove_extra_metadata (line 1516) | def remove_extra_metadata(meta: dict) -> None:
function get_extra_metadata_keys (line 1530) | def get_extra_metadata_keys() -> list[str]:
function is_no_channel (line 1564) | def is_no_channel(val) -> bool:
FILE: monai/data/video_dataset.py
function import_cv (line 36) | def import_cv():
class SuppressStderr (line 43) | class SuppressStderr:
method __enter__ (line 46) | def __enter__(self):
method __exit__ (line 55) | def __exit__(self, *_):
class VideoDataset (line 62) | class VideoDataset:
method __init__ (line 66) | def __init__(
method open_video (line 113) | def open_video(video_source: str | int):
method _get_cap (line 132) | def _get_cap(self):
method get_fps (line 136) | def get_fps(self) -> int:
method get_frame (line 140) | def get_frame(self) -> Any:
class VideoFileDataset (line 154) | class VideoFileDataset(Dataset, VideoDataset):
method __init__ (line 161) | def __init__(self, *args, **kwargs) -> None:
method get_available_codecs (line 168) | def get_available_codecs() -> dict[str, str]:
method get_num_frames (line 187) | def get_num_frames(self) -> int:
method __len__ (line 199) | def __len__(self):
method __getitem__ (line 202) | def __getitem__(self, index: int) -> Any:
class CameraDataset (line 212) | class CameraDataset(IterableDataset, VideoDataset):
method get_num_devices (line 230) | def get_num_devices() -> int:
method __iter__ (line 243) | def __iter__(self):
FILE: monai/data/wsi_datasets.py
class PatchWSIDataset (line 32) | class PatchWSIDataset(Dataset):
method __init__ (line 69) | def __init__(
method _get_wsi_object (line 114) | def _get_wsi_object(self, sample: dict):
method _get_label (line 120) | def _get_label(self, sample: dict):
method _get_location (line 123) | def _get_location(self, sample: dict):
method _get_level (line 130) | def _get_level(self, sample: dict):
method _get_size (line 135) | def _get_size(self, sample: dict):
method _get_data (line 140) | def _get_data(self, sample: dict):
method _transform (line 150) | def _transform(self, index: int):
class SlidingPatchWSIDataset (line 172) | class SlidingPatchWSIDataset(Randomizable, PatchWSIDataset):
method __init__ (line 213) | def __init__(
method _get_offset (line 278) | def _get_offset(self, sample):
method _evaluate_patch_locations (line 287) | def _evaluate_patch_locations(self, sample):
class MaskedPatchWSIDataset (line 321) | class MaskedPatchWSIDataset(PatchWSIDataset):
method __init__ (line 355) | def __init__(
method _evaluate_patch_locations (line 388) | def _evaluate_patch_locations(self, sample):
FILE: monai/data/wsi_reader.py
class BaseWSIReader (line 43) | class BaseWSIReader(ImageReader):
method __init__ (line 92) | def __init__(
method set_dtype (line 122) | def set_dtype(self, dtype):
method set_device (line 129) | def set_device(self, device):
method get_size (line 136) | def get_size(self, wsi, level: int) -> tuple[int, int]:
method _find_closest_level (line 147) | def _find_closest_level(
method get_valid_level (line 173) | def get_valid_level(
method get_level_count (line 220) | def get_level_count(self, wsi) -> int:
method get_downsample_ratio (line 231) | def get_downsample_ratio(self, wsi, level: int) -> float:
method get_file_path (line 243) | def get_file_path(self, wsi) -> str:
method get_mpp (line 248) | def get_mpp(self, wsi, level: int) -> tuple[float, float]:
method get_power (line 260) | def get_power(self, wsi, level: int) -> float:
method _get_patch (line 272) | def _get_patch(
method _get_metadata (line 290) | def _get_metadata(
method get_data (line 322) | def get_data(
method verify_suffix (line 436) | def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
class WSIReader (line 449) | class WSIReader(BaseWSIReader):
method __init__ (line 479) | def __init__(
method get_level_count (line 561) | def get_level_count(self, wsi) -> int:
method get_size (line 571) | def get_size(self, wsi, level: int) -> tuple[int, int]:
method get_downsample_ratio (line 582) | def get_downsample_ratio(self, wsi, level: int) -> float:
method get_file_path (line 593) | def get_file_path(self, wsi) -> str:
method get_mpp (line 597) | def get_mpp(self, wsi, level: int) -> tuple[float, float]:
method get_power (line 608) | def get_power(self, wsi, level: int) -> float:
method _get_patch (line 619) | def _get_patch(
method read (line 637) | def read(self, data: Sequence[PathLike] | PathLike | np.ndarray, **kwa...
class CuCIMWSIReader (line 653) | class CuCIMWSIReader(BaseWSIReader):
method __init__ (line 684) | def __init__(self, num_workers: int = 0, **kwargs):
method get_level_count (line 689) | def get_level_count(wsi) -> int:
method get_size (line 699) | def get_size(self, wsi, level: int) -> tuple[int, int]:
method get_downsample_ratio (line 710) | def get_downsample_ratio(self, wsi, level: int) -> float:
method get_file_path (line 722) | def get_file_path(wsi) -> str:
method get_mpp (line 726) | def get_mpp(self, wsi, level: int) -> tuple[float, float]:
method get_power (line 749) | def get_power(self, wsi, level: int) -> float:
method read (line 769) | def read(self, data: Sequence[PathLike] | PathLike | np.ndarray, **kwa...
method _get_patch (line 794) | def _get_patch(
class OpenSlideWSIReader (line 835) | class OpenSlideWSIReader(BaseWSIReader):
method __init__ (line 864) | def __init__(self, **kwargs):
method get_level_count (line 868) | def get_level_count(wsi) -> int:
method get_size (line 878) | def get_size(self, wsi, level: int) -> tuple[int, int]:
method get_downsample_ratio (line 889) | def get_downsample_ratio(self, wsi, level: int) -> float:
method get_file_path (line 901) | def get_file_path(wsi) -> str:
method get_mpp (line 905) | def get_mpp(self, wsi, level: int) -> tuple[float, float]:
method get_power (line 945) | def get_power(self, wsi, level: int) -> float:
method read (line 961) | def read(self, data: Sequence[PathLike] | PathLike | np.ndarray, **kwa...
method _get_patch (line 984) | def _get_patch(
class TiffFileWSIReader (line 1017) | class TiffFileWSIReader(BaseWSIReader):
method __init__ (line 1044) | def __init__(self, **kwargs):
method get_level_count (line 1048) | def get_level_count(wsi) -> int:
method get_size (line 1058) | def get_size(self, wsi, level: int) -> tuple[int, int]:
method get_downsample_ratio (line 1069) | def get_downsample_ratio(self, wsi, level: int) -> float:
method get_file_path (line 1081) | def get_file_path(wsi) -> str:
method get_mpp (line 1085) | def get_mpp(self, wsi, level: int) -> tuple[float, float]:
method get_power (line 1115) | def get_power(self, wsi, level: int) -> float:
method read (line 1129) | def read(self, data: Sequence[PathLike] | PathLike | np.ndarray, **kwa...
method _get_patch (line 1152) | def _get_patch(
FILE: monai/engines/evaluator.py
class Evaluator (line 44) | class Evaluator(Workflow):
method __init__ (line 90) | def __init__(
method run (line 139) | def run(self, global_epoch: int = 1) -> None: # type: ignore[override]
method get_stats (line 153) | def get_stats(self, *vars):
class SupervisedEvaluator (line 174) | class SupervisedEvaluator(Evaluator):
method __init__ (line 226) | def __init__(
method _iteration (line 278) | def _iteration(self, engine: SupervisedEvaluator, batchdata: dict[str,...
class EnsembleEvaluator (line 350) | class EnsembleEvaluator(Evaluator):
method __init__ (line 402) | def __init__(
method _iteration (line 455) | def _iteration(self, engine: EnsembleEvaluator, batchdata: dict[str, t...
FILE: monai/engines/trainer.py
class Trainer (line 42) | class Trainer(Workflow):
method run (line 48) | def run(self) -> None: # type: ignore[override]
method get_stats (line 57) | def get_stats(self, *vars):
class SupervisedTrainer (line 80) | class SupervisedTrainer(Trainer):
method __init__ (line 136) | def __init__(
method _iteration (line 194) | def _iteration(self, engine: SupervisedTrainer, batchdata: dict[str, t...
class GanTrainer (line 281) | class GanTrainer(Trainer):
method __init__ (line 343) | def __init__(
method _iteration (line 409) | def _iteration(
class AdversarialTrainer (line 470) | class AdversarialTrainer(Trainer):
method __init__ (line 519) | def __init__(
method _complete_state_dict_user_keys (line 591) | def _complete_state_dict_user_keys(self) -> None:
method _iteration (line 615) | def _iteration(
FILE: monai/engines/utils.py
class IterationEvents (line 47) | class IterationEvents(EventEnum):
function get_devices_spec (line 68) | def get_devices_spec(devices: Sequence[torch.device | str] | None = None...
function default_prepare_batch (line 100) | def default_prepare_batch(
class PrepareBatch (line 152) | class PrepareBatch(ABC):
method __call__ (line 162) | def __call__(
class PrepareBatchDefault (line 172) | class PrepareBatchDefault(PrepareBatch):
method __call__ (line 177) | def __call__(
class PrepareBatchExtraInput (line 193) | class PrepareBatchExtraInput(PrepareBatch):
method __init__ (line 206) | def __init__(self, extra_keys: str | Sequence[str] | dict[str, str]) -...
method __call__ (line 209) | def __call__(
class DiffusionPrepareBatch (line 243) | class DiffusionPrepareBatch(PrepareBatch):
method __init__ (line 256) | def __init__(self, num_train_timesteps: int, condition_name: str | Non...
method get_noise (line 260) | def get_noise(self, images: torch.Tensor) -> torch.Tensor:
method get_timesteps (line 264) | def get_timesteps(self, images: torch.Tensor) -> torch.Tensor:
method get_target (line 268) | def get_target(self, images: torch.Tensor, noise: torch.Tensor, timest...
method __call__ (line 272) | def __call__(
class VPredictionPrepareBatch (line 293) | class VPredictionPrepareBatch(DiffusionPrepareBatch):
method __init__ (line 307) | def __init__(self, scheduler: nn.Module, num_train_timesteps: int, con...
method get_target (line 311) | def get_target(self, images, noise, timesteps):
function default_make_latent (line 315) | def default_make_latent(
function engine_apply_transform (line 325) | def engine_apply_transform(batch: Any, output: Any, transform: Callable[...
function default_metric_cmp_fn (line 353) | def default_metric_cmp_fn(current_metric: float, prev_best: float) -> bool:
FILE: monai/engines/workflow.py
class Workflow (line 47) | class Workflow(Engine):
method __init__ (line 103) | def __init__(
method _register_decollate (line 196) | def _register_decollate(self):
method _register_postprocessing (line 211) | def _register_postprocessing(self, posttrans: Callable) -> None:
method _register_metrics (line 227) | def _register_metrics(self, k_metric: dict, add_metrics: dict | None =...
method _register_handlers (line 262) | def _register_handlers(self, handlers: Sequence) -> None:
method run (line 271) | def run(self) -> None: # type: ignore[override]
method _iteration (line 284) | def _iteration(self, engine: Any, batchdata: dict[str, torch.Tensor]) ...
method get_stats (line 299) | def get_stats(self, *vars):
FILE: monai/fl/client/client_algo.py
class BaseClient (line 17) | class BaseClient:
method initialize (line 30) | def initialize(self, extra: dict | None = None) -> None:
method finalize (line 38) | def finalize(self, extra: dict | None = None) -> None:
method abort (line 46) | def abort(self, extra: dict | None = None) -> None:
class ClientAlgoStats (line 55) | class ClientAlgoStats(BaseClient):
method get_data_stats (line 57) | def get_data_stats(self, extra: dict | None = None) -> ExchangeObject:
class ClientAlgo (line 87) | class ClientAlgo(ClientAlgoStats):
method train (line 102) | def train(self, data: ExchangeObject, extra: dict | None = None) -> None:
method get_weights (line 115) | def get_weights(self, extra: dict | None = None) -> ExchangeObject:
method evaluate (line 138) | def evaluate(self, data: ExchangeObject, extra: dict | None = None) ->...
FILE: monai/fl/client/monai_algo.py
function convert_global_weights (line 37) | def convert_global_weights(global_weights: Mapping, local_var_dict: Muta...
function compute_weight_diff (line 56) | def compute_weight_diff(global_weights, local_var_dict):
function disable_ckpt_loaders (line 77) | def disable_ckpt_loaders(parser: ConfigParser) -> None:
class MonaiAlgoStats (line 85) | class MonaiAlgoStats(ClientAlgoStats):
method __init__ (line 100) | def __init__(
method initialize (line 131) | def initialize(self, extra=None):
method get_data_stats (line 171) | def get_data_stats(self, extra: dict | None = None) -> ExchangeObject:
method _get_data_key_stats (line 248) | def _get_data_key_stats(self, data, data_key, hist_bins, hist_range, o...
method _compute_total_stats (line 273) | def _compute_total_stats(case_stats_lists, hist_bins, hist_range):
method _add_config_files (line 292) | def _add_config_files(self, config_files):
class MonaiAlgo (line 311) | class MonaiAlgo(ClientAlgo, MonaiAlgoStats):
method __init__ (line 346) | def __init__(
method initialize (line 411) | def initialize(self, extra=None):
method train (line 507) | def train(self, data: ExchangeObject, extra: dict | None = None) -> None:
method get_weights (line 547) | def get_weights(self, extra=None):
method evaluate (line 626) | def evaluate(self, data: ExchangeObject, extra: dict | None = None) ->...
method abort (line 674) | def abort(self, extra=None):
method finalize (line 688) | def finalize(self, extra: dict | None = None) -> None:
method _check_converted (line 706) | def _check_converted(self, global_weights, local_var_dict, n_converted):
method _set_cuda_device (line 716) | def _set_cuda_device(self):
FILE: monai/fl/utils/constants.py
class WeightType (line 17) | class WeightType(StrEnum):
class ModelType (line 22) | class ModelType(StrEnum):
class ExtraItems (line 27) | class ExtraItems(StrEnum):
class FlPhase (line 36) | class FlPhase(StrEnum):
class FlStatistics (line 44) | class FlStatistics(StrEnum):
class FiltersType (line 56) | class FiltersType(StrEnum):
FILE: monai/fl/utils/exchange_object.py
class ExchangeObject (line 17) | class ExchangeObject(dict):
method __init__ (line 29) | def __init__(
method metrics (line 46) | def metrics(self):
method metrics (line 50) | def metrics(self, metrics):
method statistics (line 57) | def statistics(self):
method statistics (line 61) | def statistics(self, statistics):
method weight_type (line 68) | def weight_type(self):
method weight_type (line 72) | def weight_type(self, weight_type):
method is_valid_weights (line 78) | def is_valid_weights(self):
method _add_to_summary (line 85) | def _add_to_summary(self, key, value):
method summary (line 94) | def summary(self):
method __repr__ (line 103) | def __repr__(self):
method __str__ (line 106) | def __str__(self):
FILE: monai/fl/utils/filters.py
class Filter (line 19) | class Filter(abc.ABC):
method __call__ (line 25) | def __call__(self, data: ExchangeObject, extra: dict | None = None) ->...
class SummaryFilter (line 39) | class SummaryFilter(Filter):
method __call__ (line 44) | def __call__(self, data: ExchangeObject, extra: dict | None = None) ->...
FILE: monai/handlers/average_precision.py
class AveragePrecision (line 21) | class AveragePrecision(IgniteMetricHandler):
method __init__ (line 51) | def __init__(self, average: Average | str = Average.MACRO, output_tran...
FILE: monai/handlers/calibration.py
class CalibrationError (line 23) | class CalibrationError(IgniteMetricHandler):
method __init__ (line 93) | def __init__(
FILE: monai/handlers/checkpoint_loader.py
class CheckpointLoader (line 31) | class CheckpointLoader:
method __init__ (line 87) | def __init__(
method attach (line 111) | def attach(self, engine: Engine) -> None:
method __call__ (line 120) | def __call__(self, engine: Engine) -> None:
FILE: monai/handlers/checkpoint_saver.py
class CheckpointSaver (line 33) | class CheckpointSaver:
method __init__ (line 89) | def __init__(
method load_state_dict (line 207) | def load_state_dict(self, state_dict: dict) -> None:
method attach (line 233) | def attach(self, engine: Engine) -> None:
method _delete_previous_final_ckpt (line 251) | def _delete_previous_final_ckpt(self):
method completed (line 259) | def completed(self, engine: Engine) -> None:
method exception_raised (line 281) | def exception_raised(self, engine: Engine, e: Exception) -> None:
method metrics_completed (line 306) | def metrics_completed(self, engine: Engine) -> None:
method interval_completed (line 316) | def interval_completed(self, engine: Engine) -> None:
FILE: monai/handlers/classification_saver.py
class ClassificationSaver (line 34) | class ClassificationSaver:
method __init__ (line 41) | def __init__(
method attach (line 94) | def attach(self, engine: Engine) -> None:
method _started (line 108) | def _started(self, _engine: Engine) -> None:
method __call__ (line 119) | def __call__(self, engine: Engine) -> None:
method _finalize (line 137) | def _finalize(self, _engine: Engine) -> None:
FILE: monai/handlers/clearml_handlers.py
class ClearMLHandler (line 22) | class ClearMLHandler:
method __init__ (line 33) | def __init__(
class ClearMLStatsHandler (line 79) | class ClearMLStatsHandler(ClearMLHandler, TensorBoardStatsHandler):
method __init__ (line 90) | def __init__(
class ClearMLImageHandler (line 130) | class ClearMLImageHandler(ClearMLHandler, TensorBoardImageHandler):
method __init__ (line 141) | def __init__(
FILE: monai/handlers/confusion_matrix.py
class ConfusionMatrix (line 21) | class ConfusionMatrix(IgniteMetricHandler):
method __init__ (line 26) | def __init__(
FILE: monai/handlers/decollate_batch.py
class DecollateBatch (line 28) | class DecollateBatch:
method __init__ (line 51) | def __init__(
method attach (line 78) | def attach(self, engine: Engine) -> None:
method __call__ (line 88) | def __call__(self, engine: Engine) -> None:
FILE: monai/handlers/earlystop_handler.py
class EarlyStopHandler (line 30) | class EarlyStopHandler:
method __init__ (line 79) | def __init__(
method attach (line 98) | def attach(self, engine: Engine) -> None:
method set_trainer (line 108) | def set_trainer(self, trainer: Engine) -> None:
method __call__ (line 120) | def __call__(self, engine: Engine) -> None:
FILE: monai/handlers/garbage_collector.py
class GarbageCollector (line 30) | class GarbageCollector:
method __init__ (line 49) | def __init__(self, trigger_event: str | Events | CallableEventWithFilt...
method attach (line 65) | def attach(self, engine: Engine) -> None:
method __call__ (line 69) | def __call__(self, engine: Engine) -> None:
FILE: monai/handlers/hausdorff_distance.py
class HausdorffDistance (line 21) | class HausdorffDistance(IgniteMetricHandler):
method __init__ (line 26) | def __init__(
FILE: monai/handlers/ignite_metric.py
class IgniteMetricHandler (line 43) | class IgniteMetricHandler(Metric):
method __init__ (line 66) | def __init__(
method reset (line 93) | def reset(self) -> None:
method update (line 97) | def update(self, output: Sequence[torch.Tensor]) -> None:
method compute (line 113) | def compute(self) -> Any:
method attach (line 139) | def attach(self, engine: Engine, name: str) -> None: # type: ignore[o...
FILE: monai/handlers/logfile_handler.py
class LogfileHandler (line 29) | class LogfileHandler:
method __init__ (line 49) | def __init__(
method attach (line 65) | def attach(self, engine: Engine) -> None:
method _start (line 70) | def _start(self, engine: Engine) -> None:
method _completed (line 83) | def _completed(self, engine: Engine) -> None:
FILE: monai/handlers/lr_schedule_handler.py
class LrScheduleHandler (line 31) | class LrScheduleHandler:
method __init__ (line 36) | def __init__(
method attach (line 69) | def attach(self, engine: Engine) -> None:
method __call__ (line 81) | def __call__(self, engine: Engine) -> None:
FILE: monai/handlers/mean_dice.py
class MeanDice (line 21) | class MeanDice(IgniteMetricHandler):
method __init__ (line 26) | def __init__(
FILE: monai/handlers/mean_iou.py
class MeanIoUHandler (line 21) | class MeanIoUHandler(IgniteMetricHandler):
method __init__ (line 26) | def __init__(
FILE: monai/handlers/metric_logger.py
function _get_loss_from_output (line 32) | def _get_loss_from_output(output: Sequence[Mapping[str, Any]], loss_key:...
class MetricLoggerKeys (line 36) | class MetricLoggerKeys(Enum):
class MetricLogger (line 41) | class MetricLogger:
method __init__ (line 71) | def __init__(
method attach (line 87) | def attach(self, engine: Engine) -> None:
method attach_evaluator (line 94) | def attach_evaluator(self, evaluator: Engine) -> None:
method __call__ (line 103) | def __call__(self, engine: Engine) -> None:
method log_metrics (line 115) | def log_metrics(self, engine: Engine) -> None:
method state_dict (line 127) | def state_dict(self):
method load_state_dict (line 130) | def load_state_dict(self, state_dict):
FILE: monai/handlers/metrics_reloaded_handler.py
class MetricsReloadedBinaryHandler (line 21) | class MetricsReloadedBinaryHandler(IgniteMetricHandler):
method __init__ (line 26) | def __init__(
class MetricsReloadedCategoricalHandler (line 68) | class MetricsReloadedCategoricalHandler(IgniteMetricHandler):
method __init__ (line 73) | def __init__(
FILE: monai/handlers/metrics_saver.py
class MetricsSaver (line 31) | class MetricsSaver:
method __init__ (line 82) | def __init__(
method attach (line 103) | def attach(self, engine: Engine) -> None:
method _started (line 112) | def _started(self, _engine: Engine) -> None:
method _get_filenames (line 122) | def _get_filenames(self, engine: Engine) -> None:
method __call__ (line 131) | def __call__(self, engine: Engine) -> None:
FILE: monai/handlers/mlflow_handler.py
class MLFlowHandler (line 50) | class MLFlowHandler:
method __init__ (line 124) | def __init__(
method _delete_exist_param_in_dict (line 167) | def _delete_exist_param_in_dict(self, param_dict: dict) -> None:
method attach (line 184) | def attach(self, engine: Engine) -> None:
method start (line 209) | def start(self, engine: Engine) -> None:
method _set_experiment (line 241) | def _set_experiment(self):
method _get_pandas_dataset_info (line 265) | def _get_pandas_dataset_info(pandas_dataset):
method _log_dataset (line 272) | def _log_dataset(self, sample_dict: dict[str, Any], context: str = "tr...
method _log_params (line 294) | def _log_params(self, params: dict[str, Any]) -> None:
method _log_metrics (line 300) | def _log_metrics(self, metrics: dict[str, Any], step: int | None = Non...
method _parse_artifacts (line 311) | def _parse_artifacts(self):
method complete (line 330) | def complete(self) -> None:
method close (line 339) | def close(self) -> None:
method epoch_completed (line 348) | def epoch_completed(self, engine: Engine) -> None:
method iteration_completed (line 362) | def iteration_completed(self, engine: Engine) -> None:
method _default_epoch_log (line 376) | def _default_epoch_log(self, engine: Engine) -> None:
method _default_iteration_log (line 397) | def _default_iteration_log(self, engine: Engine) -> None:
method _default_dataset_log (line 427) | def _default_dataset_log(self, dataset_dict: Mapping[str, Dataset] | N...
FILE: monai/handlers/nvtx_handlers.py
class RangeHandler (line 35) | class RangeHandler:
method __init__ (line 56) | def __init__(self, events: str | tuple[str | Events, str | Events], ms...
method resolve_events (line 68) | def resolve_events(self, events: str | tuple) -> tuple[Events, Events]:
method create_paired_events (line 79) | def create_paired_events(self, event: str) -> tuple[Events, Events]:
method get_event (line 87) | def get_event(self, event: str | Events) -> Events:
method attach (line 90) | def attach(self, engine: Engine) -> None:
method range_push (line 99) | def range_push(self):
method range_pop (line 102) | def range_pop(self):
class RangePushHandler (line 106) | class RangePushHandler:
method __init__ (line 115) | def __init__(self, event: str | Events, msg: str | None = None) -> None:
method attach (line 122) | def attach(self, engine: Engine) -> None:
method range_push (line 130) | def range_push(self):
class RangePopHandler (line 134) | class RangePopHandler:
method __init__ (line 143) | def __init__(self, event: str | Events) -> None:
method attach (line 146) | def attach(self, engine: Engine) -> None:
method range_pop (line 154) | def range_pop(self):
class MarkHandler (line 158) | class MarkHandler:
method __init__ (line 166) | def __init__(self, event: str | Events, msg: str | None = None) -> None:
method attach (line 172) | def attach(self, engine: Engine) -> None:
method mark (line 180) | def mark(self):
FILE: monai/handlers/panoptic_quality.py
class PanopticQuality (line 21) | class PanopticQuality(IgniteMetricHandler):
method __init__ (line 26) | def __init__(
FILE: monai/handlers/parameter_scheduler.py
class ParamSchedulerHandler (line 28) | class ParamSchedulerHandler:
method __init__ (line 43) | def __init__(
method _get_value_calculator (line 69) | def _get_value_calculator(self, value_calculator):
method __call__ (line 78) | def __call__(self, engine: Engine) -> None:
method attach (line 87) | def attach(self, engine: Engine) -> None:
method _linear (line 97) | def _linear(
method _exponential (line 124) | def _exponential(initial_value: float, gamma: float, current_step: int...
method _step (line 142) | def _step(initial_value: float, gamma: float, step_size: int, current_...
method _multistep (line 161) | def _multistep(initial_value: float, gamma: float, milestones: list[in...
FILE: monai/handlers/postprocessing.py
class PostProcessing (line 27) | class PostProcessing:
method __init__ (line 36) | def __init__(self, transform: Callable, event: str = "MODEL_COMPLETED"...
method attach (line 51) | def attach(self, engine: Engine) -> None:
method __call__ (line 61) | def __call__(self, engine: Engine) -> None:
FILE: monai/handlers/probability_maps.py
class ProbMapProducer (line 32) | class ProbMapProducer:
method __init__ (line 40) | def __init__(
method attach (line 76) | def attach(self, engine: Engine) -> None:
method __call__ (line 98) | def __call__(self, engine: Engine) -> None:
method save_prob_map (line 117) | def save_prob_map(self, name: str) -> None:
method finalize (line 133) | def finalize(self, engine: Engine) -> None:
FILE: monai/handlers/regression_metrics.py
class MeanSquaredError (line 21) | class MeanSquaredError(IgniteMetricHandler):
method __init__ (line 26) | def __init__(
class MeanAbsoluteError (line 54) | class MeanAbsoluteError(IgniteMetricHandler):
method __init__ (line 59) | def __init__(
class RootMeanSquaredError (line 87) | class RootMeanSquaredError(IgniteMetricHandler):
method __init__ (line 92) | def __init__(
class PeakSignalToNoiseRatio (line 120) | class PeakSignalToNoiseRatio(IgniteMetricHandler):
method __init__ (line 125) | def __init__(
FILE: monai/handlers/roc_auc.py
class ROCAUC (line 21) | class ROCAUC(IgniteMetricHandler):
method __init__ (line 51) | def __init__(self, average: Average | str = Average.MACRO, output_tran...
FILE: monai/handlers/smartcache_handler.py
class SmartCacheHandler (line 26) | class SmartCacheHandler:
method __init__ (line 33) | def __init__(self, smartcacher: SmartCacheDataset) -> None:
method attach (line 46) | def attach(self, engine: Engine) -> None:
method started (line 55) | def started(self, engine: Engine) -> None:
method epoch_completed (line 64) | def epoch_completed(self, engine: Engine) -> None:
method completed (line 73) | def completed(self, engine: Engine) -> None:
FILE: monai/handlers/stats_handler.py
class StatsHandler (line 36) | class StatsHandler:
method __init__ (line 68) | def __init__(
method attach (line 129) | def attach(self, engine: Engine) -> None:
method epoch_completed (line 161) | def epoch_completed(self, engine: Engine) -> None:
method iteration_completed (line 175) | def iteration_completed(self, engine: Engine) -> None:
method exception_raised (line 189) | def exception_raised(self, _engine: Engine, e: Exception) -> None:
method _default_epoch_print (line 203) | def _default_epoch_print(self, engine: Engine) -> None:
method _default_iteration_print (line 239) | def _default_iteration_print(self, engine: Engine) -> None:
FILE: monai/handlers/surface_distance.py
class SurfaceDistance (line 21) | class SurfaceDistance(IgniteMetricHandler):
method __init__ (line 26) | def __init__(
FILE: monai/handlers/tensorboard_handlers.py
class TensorBoardHandler (line 40) | class TensorBoardHandler:
method __init__ (line 51) | def __init__(self, summary_writer: SummaryWriter | SummaryWriterX | No...
method attach (line 59) | def attach(self, engine: Engine) -> None:
method close (line 62) | def close(self):
class TensorBoardStatsHandler (line 71) | class TensorBoardStatsHandler(TensorBoardHandler):
method __init__ (line 89) | def __init__(
method attach (line 147) | def attach(self, engine: Engine) -> None:
method epoch_completed (line 170) | def epoch_completed(self, engine: Engine) -> None:
method iteration_completed (line 184) | def iteration_completed(self, engine: Engine) -> None:
method _write_scalar (line 198) | def _write_scalar(
method _default_epoch_writer (line 215) | def _default_epoch_writer(self, engine: Engine, writer: SummaryWriter ...
method _default_iteration_writer (line 237) | def _default_iteration_writer(self, engine: Engine, writer: SummaryWri...
class TensorBoardImageHandler (line 288) | class TensorBoardImageHandler(TensorBoardHandler):
method __init__ (line 314) | def __init__(
method attach (line 367) | def attach(self, engine: Engine) -> None:
method __call__ (line 377) | def __call__(self, engine: Engine) -> None:
FILE: monai/handlers/trt_handler.py
class TrtHandler (line 26) | class TrtHandler:
method __init__ (line 35) | def __init__(self, model, base_path, args=None, submodule=None):
method attach (line 47) | def attach(self, engine: Engine) -> None:
method __call__ (line 55) | def __call__(self, engine: Engine) -> None:
FILE: monai/handlers/utils.py
function stopping_fn_from_metric (line 34) | def stopping_fn_from_metric(metric_name: str) -> Callable[[Engine], Any]:
function stopping_fn_from_loss (line 45) | def stopping_fn_from_loss() -> Callable[[Engine], Any]:
function write_metrics_reports (line 56) | def write_metrics_reports(
function from_engine (line 170) | def from_engine(keys: KeysCollection, first: bool = False) -> Callable:
function ignore_data (line 213) | def ignore_data(x: Any) -> None:
FILE: monai/handlers/validation_handler.py
class ValidationHandler (line 26) | class ValidationHandler:
method __init__ (line 33) | def __init__(
method set_validator (line 58) | def set_validator(self, validator: Evaluator) -> None:
method attach (line 66) | def attach(self, engine: Engine) -> None:
method __call__ (line 78) | def __call__(self, engine: Engine) -> None:
FILE: monai/inferers/inferer.py
class Inferer (line 62) | class Inferer(ABC):
method __call__ (line 83) | def __call__(self, inputs: torch.Tensor, network: Callable, *args: Any...
class PatchInferer (line 100) | class PatchInferer(Inferer):
method __init__ (line 130) | def __init__(
method _batch_sampler (line 193) | def _batch_sampler(
method _ensure_tuple_outputs (line 233) | def _ensure_tuple_outputs(self, outputs: Any) -> tuple:
method _run_inference (line 240) | def _run_inference(self, network: Callable, patch: torch.Tensor, *args...
method _initialize_mergers (line 252) | def _initialize_mergers(self, inputs, outputs, patches, batch_size):
method _aggregate (line 280) | def _aggregate(self, outputs, locations, batch_size, mergers, ratios):
method _get_merged_shapes (line 287) | def _get_merged_shapes(self, inputs, out_patch, ratio):
method __call__ (line 309) | def __call__(
class SimpleInferer (line 420) | class SimpleInferer(Inferer):
method __init__ (line 427) | def __init__(self) -> None:
method __call__ (line 430) | def __call__(
class SlidingWindowInferer (line 446) | class SlidingWindowInferer(Inferer):
method __init__ (line 502) | def __init__(
method __call__ (line 554) | def __call__(
class SlidingWindowInfererAdapt (line 608) | class SlidingWindowInfererAdapt(SlidingWindowInferer):
method __call__ (line 618) | def __call__(
class SaliencyInferer (line 697) | class SaliencyInferer(Inferer):
method __init__ (line 710) | def __init__(
method __call__ (line 722) | def __call__(self, inputs: torch.Tensor, network: nn.Module, *args: An...
class SliceInferer (line 744) | class SliceInferer(SlidingWindowInferer):
method __init__ (line 766) | def __init__(self, spatial_dim: int = 0, *args: Any, **kwargs: Any) ->...
method __call__ (line 771) | def __call__(
method network_wrapper (line 817) | def network_wrapper(
class DiffusionInferer (line 850) | class DiffusionInferer(Inferer):
method __init__ (line 859) | def __init__(self, scheduler: Scheduler) -> None: # type: ignore[over...
method __call__ (line 864) | def __call__( # type: ignore[override]
method sample (line 907) | def sample(
method get_likelihood (line 1000) | def get_likelihood(
method _approx_standard_normal_cdf (line 1128) | def _approx_standard_normal_cdf(self, x):
method _get_decoder_log_likelihood (line 1138) | def _get_decoder_log_likelihood(
class LatentDiffusionInferer (line 1180) | class LatentDiffusionInferer(DiffusionInferer):
method __init__ (line 1194) | def __init__(
method __call__ (line 1211) | def __call__( # type: ignore[override]
method sample (line 1253) | def sample( # type: ignore[override]
method get_likelihood (line 1340) | def get_likelihood( # type: ignore[override]
class ControlNetDiffusionInferer (line 1405) | class ControlNetDiffusionInferer(DiffusionInferer):
method __init__ (line 1414) | def __init__(self, scheduler: Scheduler) -> None:
method __call__ (line 1418) | def __call__( # type: ignore[override]
method sample (line 1473) | def sample( # type: ignore[override]
method get_likelihood (line 1599) | def get_likelihood( # type: ignore[override]
class ControlNetLatentDiffusionInferer (line 1750) | class ControlNetLatentDiffusionInferer(ControlNetDiffusionInferer):
method __init__ (line 1765) | def __init__(
method __call__ (line 1782) | def __call__( # type: ignore[override]
method sample (line 1834) | def sample( # type: ignore[override]
method get_likelihood (line 1931) | def get_likelihood( # type: ignore[override]
class VQVAETransformerInferer (line 2006) | class VQVAETransformerInferer(nn.Module):
method __init__ (line 2011) | def __init__(self) -> None:
method __call__ (line 2014) | def __call__(
method sample (line 2064) | def sample(
method get_likelihood (line 2128) | def get_likelihood(
FILE: monai/inferers/merger.py
class Merger (line 41) | class Merger(ABC):
method __init__ (line 57) | def __init__(
method aggregate (line 72) | def aggregate(self, values: torch.Tensor, location: Sequence[int]) -> ...
method finalize (line 88) | def finalize(self) -> Any:
class AvgMerger (line 103) | class AvgMerger(Merger):
method __init__ (line 115) | def __init__(
method aggregate (line 131) | def aggregate(self, values: torch.Tensor, location: Sequence[int]) -> ...
method finalize (line 151) | def finalize(self) -> torch.Tensor:
method get_output (line 174) | def get_output(self) -> torch.Tensor:
method get_values (line 183) | def get_values(self) -> torch.Tensor:
method get_counts (line 196) | def get_counts(self) -> torch.Tensor:
class ZarrAvgMerger (line 207) | class ZarrAvgMerger(Merger):
method __init__ (line 263) | def __init__(
method aggregate (line 430) | def aggregate(self, values: torch.Tensor, location: Sequence[int]) -> ...
method finalize (line 447) | def finalize(self) -> zarr.Array:
method get_output (line 471) | def get_output(self) -> zarr.Array:
method get_values (line 480) | def get_values(self) -> zarr.Array:
method get_counts (line 490) | def get_counts(self) -> zarr.Array:
function iterate_over_chunks (line 500) | def iterate_over_chunks(chunks, cdata_shape, slice_tuple=()):
FILE: monai/inferers/splitter.py
class Splitter (line 31) | class Splitter(ABC):
method __init__ (line 41) | def __init__(self, patch_size: Sequence[int] | int, device: torch.devi...
method get_input_shape (line 46) | def get_input_shape(self, inputs: Any) -> tuple:
method get_padded_shape (line 61) | def get_padded_shape(self, inputs: Any) -> tuple:
method __call__ (line 78) | def __call__(self, inputs: Any) -> Iterable[tuple[torch.Tensor, Sequen...
class SlidingWindowSplitter (line 94) | class SlidingWindowSplitter(Splitter):
method __init__ (line 119) | def __init__(
method _validate_filter_fn (line 150) | def _validate_filter_fn(filter_fn):
method _calculate_pad_size (line 172) | def _calculate_pad_size(self, spatial_shape, spatial_ndim, patch_size,...
method _get_valid_shape_parameters (line 194) | def _get_valid_shape_parameters(
method _get_patch (line 214) | def _get_patch(self, inputs: Any, location: tuple[int, ...], patch_siz...
method get_input_shape (line 218) | def get_input_shape(self, inputs: Any) -> tuple:
method get_padded_shape (line 231) | def get_padded_shape(self, inputs: Any) -> tuple:
method __call__ (line 255) | def __call__(self, inputs: Any) -> Iterable[tuple[torch.Tensor, Sequen...
class WSISlidingWindowSplitter (line 295) | class WSISlidingWindowSplitter(SlidingWindowSplitter):
method __init__ (line 328) | def __init__(
method _set_reader (line 356) | def _set_reader(self, reader: str | BaseWSIReader | type[BaseWSIReader...
method _get_patch (line 378) | def _get_patch(self, inputs: Any, location: tuple[int, ...], patch_siz...
method get_input_shape (line 382) | def get_input_shape(self, inputs: Any) -> tuple:
method __call__ (line 398) | def __call__(self, inputs: PathLike | Sequence[PathLike]) -> Iterable[...
FILE: monai/inferers/utils.py
function sliding_window_inference (line 42) | def sliding_window_inference(
function _create_buffered_slices (line 360) | def _create_buffered_slices(slices, batch_size, sw_batch_size, buffer_di...
function _compute_coords (line 387) | def _compute_coords(coords, z_scale, out, patch):
function _get_scan_interval (line 399) | def _get_scan_interval(
function _flatten_struct (line 423) | def _flatten_struct(seg_out):
function _pack_struct (line 436) | def _pack_struct(seg_out, dict_keys=None):
FILE: monai/losses/adversarial_loss.py
class AdversarialCriterions (line 24) | class AdversarialCriterions(StrEnum):
class PatchAdversarialLoss (line 30) | class PatchAdversarialLoss(_Loss):
method __init__ (line 50) | def __init__(
method get_target_tensor (line 83) | def get_target_tensor(self, input: torch.Tensor, target_is_real: bool)...
method get_zero_tensor (line 98) | def get_zero_tensor(self, input: torch.Tensor) -> torch.Tensor:
method forward (line 111) | def forward(
method _forward_single (line 165) | def _forward_single(self, input: torch.Tensor, target: torch.Tensor) -...
FILE: monai/losses/barlow_twins.py
class BarlowTwinsLoss (line 18) | class BarlowTwinsLoss(_Loss):
method __init__ (line 36) | def __init__(self, lambd: float = 5e-3) -> None:
method forward (line 50) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
FILE: monai/losses/cldice.py
function soft_erode (line 19) | def soft_erode(img: torch.Tensor) -> torch.Tensor: # type: ignore
function soft_dilate (line 40) | def soft_dilate(img: torch.Tensor) -> torch.Tensor: # type: ignore
function soft_open (line 56) | def soft_open(img: torch.Tensor) -> torch.Tensor:
function soft_skel (line 71) | def soft_skel(img: torch.Tensor, iter_: int) -> torch.Tensor:
function soft_dice (line 95) | def soft_dice(y_true: torch.Tensor, y_pred: torch.Tensor, smooth: float ...
class SoftclDiceLoss (line 115) | class SoftclDiceLoss(_Loss):
method __init__ (line 126) | def __init__(self, iter_: int = 3, smooth: float = 1.0) -> None:
method forward (line 136) | def forward(self, y_true: torch.Tensor, y_pred: torch.Tensor) -> torch...
class SoftDiceclDiceLoss (line 149) | class SoftDiceclDiceLoss(_Loss):
method __init__ (line 160) | def __init__(self, iter_: int = 3, alpha: float = 0.5, smooth: float =...
method forward (line 172) | def forward(self, y_true: torch.Tensor, y_pred: torch.Tensor) -> torch...
FILE: monai/losses/contrastive.py
class ContrastiveLoss (line 21) | class ContrastiveLoss(_Loss):
method __init__ (line 33) | def __init__(self, temperature: float = 0.5, batch_size: int = -1) -> ...
method forward (line 49) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
FILE: monai/losses/deform.py
function spatial_gradient (line 20) | def spatial_gradient(x: torch.Tensor, dim: int) -> torch.Tensor:
class BendingEnergyLoss (line 47) | class BendingEnergyLoss(_Loss):
method __init__ (line 58) | def __init__(self, normalize: bool = False, reduction: LossReduction |...
method forward (line 74) | def forward(self, pred: torch.Tensor) -> torch.Tensor:
class DiffusionLoss (line 128) | class DiffusionLoss(_Loss):
method __init__ (line 143) | def __init__(self, normalize: bool = False, reduction: LossReduction |...
method forward (line 159) | def forward(self, pred: torch.Tensor) -> torch.Tensor:
FILE: monai/losses/dice.py
class DiceLoss (line 30) | class DiceLoss(_Loss):
method __init__ (line 55) | def __init__(
method forward (line 130) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
class MaskedDiceLoss (line 231) | class MaskedDiceLoss(DiceLoss):
method __init__ (line 241) | def __init__(
method forward (line 289) | def forward(self, input: torch.Tensor, target: torch.Tensor, mask: tor...
class GeneralizedDiceLoss (line 312) | class GeneralizedDiceLoss(_Loss):
method __init__ (line 323) | def __init__(
method w_func (line 387) | def w_func(self, grnd):
method forward (line 394) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
class GeneralizedWassersteinDiceLoss (line 474) | class GeneralizedWassersteinDiceLoss(_Loss):
method __init__ (line 491) | def __init__(
method forward (line 562) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
method wasserstein_distance_map (line 611) | def wasserstein_distance_map(self, flat_proba: torch.Tensor, flat_targ...
method _compute_generalized_true_positive (line 649) | def _compute_generalized_true_positive(
method _compute_denominator (line 667) | def _compute_denominator(
method _compute_alpha_generalized_true_positives (line 685) | def _compute_alpha_generalized_true_positives(self, flat_target: torch...
class DiceCELoss (line 703) | class DiceCELoss(_Loss):
method __init__ (line 713) | def __init__(
method ce (line 803) | def ce(self, input: torch.Tensor, target: torch.Tensor) -> torch.Tensor:
method bce (line 819) | def bce(self, input: torch.Tensor, target: torch.Tensor) -> torch.Tensor:
method forward (line 829) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
class DiceFocalLoss (line 863) | class DiceFocalLoss(_Loss):
method __init__ (line 875) | def __init__(
method forward (line 961) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
class GeneralizedDiceFocalLoss (line 1000) | class GeneralizedDiceFocalLoss(_Loss):
method __init__ (line 1039) | def __init__(
method forward (line 1083) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
FILE: monai/losses/ds_loss.py
class DeepSupervisionLoss (line 19) | class DeepSupervisionLoss(_Loss):
method __init__ (line 25) | def __init__(self, loss: _Loss, weight_mode: str = "exp", weights: lis...
method get_weights (line 43) | def get_weights(self, levels: int = 1) -> list[float]:
method get_loss (line 61) | def get_loss(self, input: torch.Tensor, target: torch.Tensor) -> torch...
method forward (line 71) | def forward(self, input: None | torch.Tensor | list[torch.Tensor], tar...
FILE: monai/losses/focal_loss.py
class FocalLoss (line 25) | class FocalLoss(_Loss):
method __init__ (line 67) | def __init__(
method forward (line 128) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
function softmax_focal_loss (line 217) | def softmax_focal_loss(
function sigmoid_focal_loss (line 253) | def sigmoid_focal_loss(
FILE: monai/losses/giou_loss.py
class BoxGIoULoss (line 21) | class BoxGIoULoss(_Loss):
method __init__ (line 36) | def __init__(self, reduction: LossReduction | str = LossReduction.MEAN...
method forward (line 39) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
FILE: monai/losses/hausdorff_loss.py
class HausdorffDTLoss (line 30) | class HausdorffDTLoss(_Loss):
method __init__ (line 44) | def __init__(
method distance_field (line 98) | def distance_field(self, img: torch.Tensor) -> torch.Tensor:
method forward (line 124) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
class LogHausdorffDTLoss (line 214) | class LogHausdorffDTLoss(HausdorffDTLoss):
method forward (line 228) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
FILE: monai/losses/image_dissimilarity.py
function make_rectangular_kernel (line 23) | def make_rectangular_kernel(kernel_size: int) -> torch.Tensor:
function make_triangular_kernel (line 27) | def make_triangular_kernel(kernel_size: int) -> torch.Tensor:
function make_gaussian_kernel (line 36) | def make_gaussian_kernel(kernel_size: int) -> torch.Tensor:
class LocalNormalizedCrossCorrelationLoss (line 51) | class LocalNormalizedCrossCorrelationLoss(_Loss):
method __init__ (line 94) | def __init__(
method get_kernel_vol (line 121) | def get_kernel_vol(self):
method forward (line 127) | def forward(self, pred: torch.Tensor, target: torch.Tensor) -> torch.T...
class GlobalMutualInformationLoss (line 181) | class GlobalMutualInformationLoss(_Loss):
method __init__ (line 189) | def __init__(
method parzen_windowing (line 238) | def parzen_windowing(
method parzen_windowing_b_spline (line 253) | def parzen_windowing_b_spline(self, img: torch.Tensor, order: int) -> ...
method parzen_windowing_gaussian (line 304) | def parzen_windowing_gaussian(self, img: torch.Tensor) -> tuple[torch....
method forward (line 320) | def forward(self, pred: torch.Tensor, target: torch.Tensor) -> torch.T...
FILE: monai/losses/multi_scale.py
function make_gaussian_kernel (line 21) | def make_gaussian_kernel(sigma: int) -> torch.Tensor:
function make_cauchy_kernel (line 27) | def make_cauchy_kernel(sigma: int) -> torch.Tensor:
class MultiScaleLoss (line 40) | class MultiScaleLoss(_Loss):
method __init__ (line 49) | def __init__(
method forward (line 69) | def forward(self, y_true: torch.Tensor, y_pred: torch.Tensor) -> torch...
FILE: monai/losses/nacl_loss.py
class NACLLoss (line 24) | class NACLLoss(_Loss):
method __init__ (line 40) | def __init__(
method get_constr_target (line 85) | def get_constr_target(self, mask: torch.Tensor) -> torch.Tensor:
method forward (line 107) | def forward(self, inputs: torch.Tensor, targets: torch.Tensor) -> torc...
FILE: monai/losses/perceptual.py
class PercetualNetworkType (line 26) | class PercetualNetworkType(StrEnum):
class PerceptualLoss (line 36) | class PerceptualLoss(nn.Module):
method __init__ (line 75) | def __init__(
method _calculate_axis_loss (line 133) | def _calculate_axis_loss(self, input: torch.Tensor, target: torch.Tens...
method forward (line 169) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
class MedicalNetPerceptualSimilarity (line 196) | class MedicalNetPerceptualSimilarity(nn.Module):
method __init__ (line 210) | def __init__(
method forward (line 223) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
function spatial_average_3d (line 273) | def spatial_average_3d(x: torch.Tensor, keepdim: bool = True) -> torch.T...
function normalize_tensor (line 277) | def normalize_tensor(x: torch.Tensor, eps: float = 1e-10) -> torch.Tensor:
function medicalnet_intensity_normalisation (line 282) | def medicalnet_intensity_normalisation(volume):
class RadImageNetPerceptualSimilarity (line 289) | class RadImageNetPerceptualSimilarity(nn.Module):
method __init__ (line 301) | def __init__(self, net: str = "radimagenet_resnet50", verbose: bool = ...
method forward (line 309) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
class TorchvisionModelPerceptualSimilarity (line 343) | class TorchvisionModelPerceptualSimilarity(nn.Module):
method __init__ (line 359) | def __init__(
method forward (line 391) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
function spatial_average (line 422) | def spatial_average(x: torch.Tensor, keepdim: bool = True) -> torch.Tensor:
function torchvision_zscore_norm (line 426) | def torchvision_zscore_norm(x: torch.Tensor) -> torch.Tensor:
function subtract_mean (line 435) | def subtract_mean(x: torch.Tensor) -> torch.Tensor:
FILE: monai/losses/spatial_mask.py
class MaskedLoss (line 25) | class MaskedLoss(_Loss):
method __init__ (line 34) | def __init__(
method forward (line 50) | def forward(self, input: torch.Tensor, target: torch.Tensor, mask: tor...
FILE: monai/losses/spectral_loss.py
class JukeboxLoss (line 22) | class JukeboxLoss(_Loss):
method __init__ (line 43) | def __init__(
method forward (line 57) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
method _get_fft_amplitude (line 74) | def _get_fft_amplitude(self, images: torch.Tensor) -> torch.Tensor:
FILE: monai/losses/ssim_loss.py
class SSIMLoss (line 23) | class SSIMLoss(_Loss):
method __init__ (line 35) | def __init__(
method data_range (line 89) | def data_range(self) -> float:
method data_range (line 93) | def data_range(self, value: float) -> None:
method forward (line 97) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
FILE: monai/losses/sure_loss.py
function complex_diff_abs_loss (line 21) | def complex_diff_abs_loss(x: torch.Tensor, y: torch.Tensor) -> torch.Ten...
function sure_loss_function (line 41) | def sure_loss_function(
class SURELoss (line 111) | class SURELoss(_Loss):
method __init__ (line 134) | def __init__(self, perturb_noise: torch.Tensor | None = None, eps: flo...
method forward (line 147) | def forward(
FILE: monai/losses/tversky.py
class TverskyLoss (line 25) | class TverskyLoss(_Loss):
method __init__ (line 40) | def __init__(
method forward (line 105) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch....
FILE: monai/losses/unified_focal_loss.py
class AsymmetricFocalTverskyLoss (line 23) | class AsymmetricFocalTverskyLoss(_Loss):
method __init__ (line 35) | def __init__(
method forward (line 56) | def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch...
class AsymmetricFocalLoss (line 87) | class AsymmetricFocalLoss(_Loss):
method __init__ (line 99) | def __init__(
method forward (line 120) | def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch...
class AsymmetricUnifiedFocalLoss (line 145) | class AsymmetricUnifiedFocalLoss(_Loss):
method __init__ (line 157) | def __init__(
method forward (line 194) | def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch...
FILE: monai/losses/utils.py
function compute_tp_fp_fn (line 18) | def compute_tp_fp_fn(
FILE: monai/metrics/active_learning_metrics.py
class VarianceMetric (line 25) | class VarianceMetric(Metric):
method __init__ (line 41) | def __init__(
method __call__ (line 54) | def __call__(self, y_pred: Any) -> Any:
class LabelQualityScore (line 73) | class LabelQualityScore(Metric):
method __init__ (line 88) | def __init__(self, include_background: bool = True, scalar_reduction: ...
method __call__ (line 93) | def __call__(self, y_pred: Any, y: Any) -> torch.Tensor | None:
function compute_variance (line 108) | def compute_variance(
function label_quality_score (line 165) | def label_quality_score(
FILE: monai/metrics/average_precision.py
class AveragePrecisionMetric (line 29) | class AveragePrecisionMetric(CumulativeIterationMetric):
method __init__ (line 64) | def __init__(self, average: Average | str = Average.MACRO) -> None:
method _compute_tensor (line 68) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor) -> tu...
method aggregate (line 71) | def aggregate(self, average: Average | str | None = None) -> np.ndarra...
function _calculate (line 89) | def _calculate(y_pred: torch.Tensor, y: torch.Tensor) -> float:
function compute_average_precision (line 119) | def compute_average_precision(
FILE: monai/metrics/calibration.py
function calibration_binning (line 26) | def calibration_binning(
class CalibrationReduction (line 141) | class CalibrationReduction(StrEnum):
class CalibrationErrorMetric (line 162) | class CalibrationErrorMetric(CumulativeIterationMetric):
method __init__ (line 252) | def __init__(
method _compute_tensor (line 269) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor, **kwa...
method aggregate (line 314) | def aggregate(
FILE: monai/metrics/confusion_matrix.py
class ConfusionMatrixMetric (line 25) | class ConfusionMatrixMetric(CumulativeIterationMetric):
method __init__ (line 65) | def __init__(
method _compute_tensor (line 80) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
method aggregate (line 101) | def aggregate(
function get_confusion_matrix (line 134) | def get_confusion_matrix(y_pred: torch.Tensor, y: torch.Tensor, include_...
function compute_confusion_matrix_metric (line 179) | def compute_confusion_matrix_metric(metric_name: str, confusion_matrix: ...
function check_confusion_matrix_metric_name (line 274) | def check_confusion_matrix_metric_name(metric_name: str) -> str:
FILE: monai/metrics/cumulative_average.py
class CumulativeAverage (line 23) | class CumulativeAverage:
method __init__ (line 46) | def __init__(self) -> None:
method reset (line 49) | def reset(self) -> None:
method get_current (line 58) | def get_current(self, to_numpy: bool = True) -> NdarrayOrTensor:
method aggregate (line 81) | def aggregate(self, to_numpy: bool = True) -> NdarrayOrTensor:
method append (line 107) | def append(self, val: Any, count: Any | None = 1) -> None:
FILE: monai/metrics/f_beta_score.py
class FBetaScore (line 24) | class FBetaScore(CumulativeIterationMetric):
method __init__ (line 26) | def __init__(
method _compute_tensor (line 39) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
method aggregate (line 45) | def aggregate(
function get_f_beta_score (line 63) | def get_f_beta_score(y_pred: torch.Tensor, y: torch.Tensor, include_back...
function compute_f_beta_score (line 90) | def compute_f_beta_score(confusion_matrix: torch.Tensor, beta: float) ->...
FILE: monai/metrics/fid.py
class FIDMetric (line 23) | class FIDMetric(Metric):
method __call__ (line 36) | def __call__(self, y_pred: torch.Tensor, y: torch.Tensor) -> torch.Ten...
function get_fid_score (line 40) | def get_fid_score(y_pred: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
function _cov (line 61) | def _cov(input_data: torch.Tensor, rowvar: bool = True) -> torch.Tensor:
function _sqrtm (line 83) | def _sqrtm(input_data: torch.Tensor) -> torch.Tensor:
function compute_frechet_distance (line 89) | def compute_frechet_distance(
FILE: monai/metrics/froc.py
function compute_fp_tp_probs_nd (line 22) | def compute_fp_tp_probs_nd(
function compute_fp_tp_probs (line 78) | def compute_fp_tp_probs(
function compute_froc_curve_data (line 122) | def compute_froc_curve_data(
function compute_froc_score (line 158) | def compute_froc_score(
FILE: monai/metrics/generalized_dice.py
class GeneralizedDiceScore (line 22) | class GeneralizedDiceScore(CumulativeIterationMetric):
method __init__ (line 49) | def __init__(
method _compute_tensor (line 66) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
method aggregate (line 95) | def aggregate(self, reduction: MetricReduction | str | None = None) ->...
function compute_generalized_dice (line 115) | def compute_generalized_dice(
FILE: monai/metrics/hausdorff_distance.py
class HausdorffDistanceMetric (line 28) | class HausdorffDistanceMetric(CumulativeIterationMetric):
method __init__ (line 57) | def __init__(
method _compute_tensor (line 74) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor, **kwa...
method aggregate (line 111) | def aggregate(
function compute_hausdorff_distance (line 132) | def compute_hausdorff_distance(
function _compute_percentile_hausdorff_distance (line 196) | def _compute_percentile_hausdorff_distance(
FILE: monai/metrics/loss_metric.py
class LossMetric (line 26) | class LossMetric(CumulativeIterationMetric):
method __init__ (line 72) | def __init__(
method aggregate (line 80) | def aggregate(
method _compute_tensor (line 97) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor | None...
FILE: monai/metrics/meandice.py
class DiceMetric (line 24) | class DiceMetric(CumulativeIterationMetric):
method __init__ (line 101) | def __init__(
method _compute_tensor (line 126) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
method aggregate (line 143) | def aggregate(
function compute_dice (line 172) | def compute_dice(
class DiceHelper (line 210) | class DiceHelper:
method __init__ (line 253) | def __init__(
method compute_channel (line 281) | def compute_channel(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
method __call__ (line 300) | def __call__(self, y_pred: torch.Tensor, y: torch.Tensor) -> torch.Ten...
FILE: monai/metrics/meaniou.py
class MeanIoU (line 22) | class MeanIoU(CumulativeIterationMetric):
method __init__ (line 51) | def __init__(
method _compute_tensor (line 64) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
method aggregate (line 84) | def aggregate(
function compute_iou (line 105) | def compute_iou(
FILE: monai/metrics/metric.py
class Metric (line 26) | class Metric(ABC):
method __call__ (line 34) | def __call__(self, *args: Any, **kwargs: Any) -> Any:
method __str__ (line 40) | def __str__(self):
class IterationMetric (line 44) | class IterationMetric(Metric):
method __call__ (line 54) | def __call__(
method _compute_list (line 83) | def _compute_list(
method _compute_tensor (line 116) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor | None...
class Cumulative (line 125) | class Cumulative:
method __init__ (line 183) | def __init__(self) -> None:
method reset (line 194) | def reset(self):
method extend (line 203) | def extend(self, *data: Any) -> None:
method append (line 227) | def append(self, *data: Any) -> None:
method aggregate (line 248) | def aggregate(self, *args: Any, **kwargs: Any) -> Any:
method _sync (line 256) | def _sync(self):
method __len__ (line 272) | def __len__(self):
method get_buffer (line 282) | def get_buffer(self):
class CumulativeIterationMetric (line 296) | class CumulativeIterationMetric(Cumulative, IterationMetric):
method __call__ (line 327) | def __call__(
FILE: monai/metrics/mmd.py
class MMDMetric (line 21) | class MMDMetric(Metric):
method __init__ (line 35) | def __init__(self, y_mapping: Callable | None = None) -> None:
method __call__ (line 39) | def __call__(self, y: torch.Tensor, y_pred: torch.Tensor) -> torch.Ten...
function compute_mmd (line 43) | def compute_mmd(y: torch.Tensor, y_pred: torch.Tensor, y_mapping: Callab...
FILE: monai/metrics/panoptic_quality.py
class PanopticQualityMetric (line 27) | class PanopticQualityMetric(CumulativeIterationMetric):
method __init__ (line 63) | def __init__(
method _compute_tensor (line 80) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
method aggregate (line 132) | def aggregate(self, reduction: MetricReduction | str | None = None) ->...
function compute_panoptic_quality (line 171) | def compute_panoptic_quality(
function _get_id_list (line 238) | def _get_id_list(gt: torch.Tensor) -> list[torch.Tensor]:
function _get_pairwise_iou (line 247) | def _get_pairwise_iou(
function _get_paired_iou (line 281) | def _get_paired_iou(
function _check_panoptic_metric_name (line 303) | def _check_panoptic_metric_name(metric_name: str) -> str:
function compute_mean_iou (line 315) | def compute_mean_iou(confusion_matrix: torch.Tensor, smooth_numerator: f...
FILE: monai/metrics/regression.py
class RegressionMetric (line 30) | class RegressionMetric(CumulativeIterationMetric):
method __init__ (line 48) | def __init__(self, reduction: MetricReduction | str = MetricReduction....
method aggregate (line 53) | def aggregate(
method _check_shape (line 69) | def _check_shape(self, y_pred: torch.Tensor, y: torch.Tensor) -> None:
method _compute_metric (line 78) | def _compute_metric(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
method _compute_tensor (line 81) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
class MSEMetric (line 88) | class MSEMetric(RegressionMetric):
method __init__ (line 109) | def __init__(self, reduction: MetricReduction | str = MetricReduction....
method _compute_metric (line 113) | def _compute_metric(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
class MAEMetric (line 117) | class MAEMetric(RegressionMetric):
method __init__ (line 138) | def __init__(self, reduction: MetricReduction | str = MetricReduction....
method _compute_metric (line 142) | def _compute_metric(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
class MAPEMetric (line 146) | class MAPEMetric(RegressionMetric):
method __init__ (line 169) | def __init__(
method _compute_metric (line 175) | def _compute_metric(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
class RMSEMetric (line 179) | class RMSEMetric(RegressionMetric):
method __init__ (line 201) | def __init__(self, reduction: MetricReduction | str = MetricReduction....
method _compute_metric (line 205) | def _compute_metric(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
class PSNRMetric (line 210) | class PSNRMetric(RegressionMetric):
method __init__ (line 237) | def __init__(
method _compute_metric (line 244) | def _compute_metric(self, y_pred: torch.Tensor, y: torch.Tensor) -> Any:
function compute_mean_error_metrics (line 249) | def compute_mean_error_metrics(y_pred: torch.Tensor, y: torch.Tensor, fu...
function compute_mape_metric (line 256) | def compute_mape_metric(y_pred: torch.Tensor, y: torch.Tensor, epsilon: ...
class KernelType (line 273) | class KernelType(StrEnum):
class SSIMMetric (line 278) | class SSIMMetric(RegressionMetric):
method __init__ (line 307) | def __init__(
method _compute_metric (line 336) | def _compute_metric(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
function _gaussian_kernel (line 379) | def _gaussian_kernel(
function compute_ssim_and_cs (line 419) | def compute_ssim_and_cs(
class MultiScaleSSIMMetric (line 484) | class MultiScaleSSIMMetric(RegressionMetric):
method __init__ (line 508) | def __init__(
method _compute_metric (line 539) | def _compute_metric(self, y_pred: torch.Tensor, y: torch.Tensor) -> to...
function compute_ms_ssim (line 554) | def compute_ms_ssim(
FILE: monai/metrics/rocauc.py
class ROCAUCMetric (line 29) | class ROCAUCMetric(CumulativeIterationMetric):
method __init__ (line 53) | def __init__(self, average: Average | str = Average.MACRO) -> None:
method _compute_tensor (line 57) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor) -> tu...
method aggregate (line 60) | def aggregate(self, average: Average | str | None = None) -> np.ndarra...
function _calculate (line 78) | def _calculate(y_pred: torch.Tensor, y: torch.Tensor) -> float:
function compute_roc_auc (line 115) | def compute_roc_auc(
FILE: monai/metrics/surface_dice.py
class SurfaceDiceMetric (line 26) | class SurfaceDiceMetric(CumulativeIterationMetric):
method __init__ (line 62) | def __init__(
method _compute_tensor (line 79) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor, **kwa...
method aggregate (line 113) | def aggregate(
function compute_surface_dice (line 137) | def compute_surface_dice(
FILE: monai/metrics/surface_distance.py
class SurfaceDistanceMetric (line 26) | class SurfaceDistanceMetric(CumulativeIterationMetric):
method __init__ (line 52) | def __init__(
method _compute_tensor (line 67) | def _compute_tensor(self, y_pred: torch.Tensor, y: torch.Tensor, **kwa...
method aggregate (line 102) | def aggregate(
function compute_average_surface_distance (line 123) | def compute_average_surface_distance(
FILE: monai/metrics/utils.py
function ignore_background (line 54) | def ignore_background(y_pred: NdarrayTensor, y: NdarrayTensor) -> tuple[...
function do_metric_reduction (line 71) | def do_metric_reduction(
function get_mask_edges (line 139) | def get_mask_edges(
function get_surface_distance (line 242) | def get_surface_distance(
function get_edge_surface_distance (line 288) | def get_edge_surface_dis
Copy disabled (too large)
Download .json
Condensed preview — 1461 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (11,758K chars).
[
{
"path": ".clang-format",
"chars": 2570,
"preview": "---\nAccessModifierOffset: -1\nAlignAfterOpenBracket: AlwaysBreak\nAlignConsecutiveAssignments: false\nAlignConsecutiveDecla"
},
{
"path": ".coderabbit.yaml",
"chars": 2404,
"preview": "# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json\n\n# This file configures CodeRabbit wit"
},
{
"path": ".deepsource.toml",
"chars": 349,
"preview": "version = 1\n\ntest_patterns = [\"tests/**\"]\n\nexclude_patterns = [\n \"monai/_version.py\",\n \"versioneer.py\"\n]\n\n[[analyz"
},
{
"path": ".dockerignore",
"chars": 198,
"preview": "# Ignore the following files/folders during docker build\n\n__pycache__/\ndocs/\n\n.vscode\n.git\n.mypy_cache\n.ruff_cache\n.pyty"
},
{
"path": ".gitattributes",
"chars": 31,
"preview": "monai/_version.py export-subst\n"
},
{
"path": ".github/CODEOWNERS",
"chars": 787,
"preview": "/monai/ @KumoLiu @ericspod @Nic-Ma\n/docs/ @KumoLiu @ericspod @Nic-Ma\n/tests/ @KumoLiu @ericspod @Nic-Ma\n/.github/ @KumoL"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 681,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 595,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
},
{
"path": ".github/ISSUE_TEMPLATE/question.md",
"chars": 487,
"preview": "---\nname: Question (please use the Discussion tab)\nabout: https://github.com/Project-MONAI/MONAI/discussions\ntitle: 'Ple"
},
{
"path": ".github/codecov.yml",
"chars": 811,
"preview": "coverage:\n status:\n project:\n default:\n target: 70%\n threshold: 10\n base: parent\n i"
},
{
"path": ".github/dco.yml",
"chars": 44,
"preview": "allowRemediationCommits:\n individual: true\n"
},
{
"path": ".github/dependabot.yml",
"chars": 217,
"preview": "# Set update schedule for GitHub Actions\n\nversion: 2\nupdates:\n\n - package-ecosystem: \"github-actions\"\n directory: \"/"
},
{
"path": ".github/pull_request_template.md",
"chars": 733,
"preview": "Fixes # .\n\n### Description\n\nA few sentences describing the changes proposed in this pull request.\n\n### Types of changes\n"
},
{
"path": ".github/workflows/blossom-ci.yml",
"chars": 3364,
"preview": "# A workflow to trigger ci on hybrid infra (github + self hosted runner)\nname: Blossom-CI\non:\n issue_comment:\n types"
},
{
"path": ".github/workflows/chatops.yml",
"chars": 1001,
"preview": "# triggering the workflows by commenting `/black` and `/integration-test`\nname: chatops\n\n# currently dispatches /black c"
},
{
"path": ".github/workflows/codeql-analysis.yml",
"chars": 2578,
"preview": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# Y"
},
{
"path": ".github/workflows/conda.yml",
"chars": 2357,
"preview": "# daily tests for different OS with conda\nname: cron-conda\n\non:\n schedule:\n - cron: \"0 3 * * *\" # at 03:00 UTC\n # "
},
{
"path": ".github/workflows/cron-ngc-bundle.yml",
"chars": 1332,
"preview": "# daily tests for ngc bundles\nname: cron-ngc-bundle\n\non:\n schedule:\n - cron: \"0 2 * * *\" # at 02:00 UTC\n # Allows "
},
{
"path": ".github/workflows/cron.yml",
"chars": 11223,
"preview": "# nightly: Jenkinsfile.monai-pytorch-versions, monai-latest-image, monai-pip, monai-latest-docker, monai-notebooks\nname:"
},
{
"path": ".github/workflows/docker.yml",
"chars": 3472,
"preview": "# this is the docker image releasing pipeline, pushing to https://hub.docker.com/r/projectmonai/monai\nname: docker\n# ver"
},
{
"path": ".github/workflows/integration.yml",
"chars": 6170,
"preview": "# manually trigger integration with the latest pytorch\nname: integration\n\non:\n repository_dispatch:\n type: [integrat"
},
{
"path": ".github/workflows/pythonapp-gpu.yml",
"chars": 5443,
"preview": "# Jenkinsfile.monai-premerge\nname: premerge-gpu\n\non:\n # quick tests for pull requests and the releasing branches\n push"
},
{
"path": ".github/workflows/pythonapp-min.yml",
"chars": 5702,
"preview": "# Jenkinsfile.monai-premerge\nname: premerge-min\n\non:\n # quick tests for pull requests and the releasing branches\n push"
},
{
"path": ".github/workflows/pythonapp.yml",
"chars": 7362,
"preview": "# Jenkinsfile.monai-premerge\nname: premerge\n\non:\n # quick tests for pull requests and the releasing branches\n push:\n "
},
{
"path": ".github/workflows/release.yml",
"chars": 5400,
"preview": "name: release\n# generating and testing package artefacts from the main branch\n\non:\n push:\n branches:\n - main\n "
},
{
"path": ".github/workflows/setupapp.yml",
"chars": 6148,
"preview": "# Jenkinsfile.monai-postmerge\nname: deploy\n\non:\n # full tests for all the important branches\n push:\n branches:\n "
},
{
"path": ".github/workflows/weekly-preview.yml",
"chars": 2525,
"preview": "name: weekly-preview\n\non:\n schedule:\n - cron: \"0 2 * * 0\" # 02:00 of every Sunday\n\njobs:\n flake8-py3:\n runs-on: u"
},
{
"path": ".gitignore",
"chars": 2257,
"preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
},
{
"path": ".pre-commit-config.yaml",
"chars": 1157,
"preview": "default_language_version:\n python: python3\n\nci:\n autofix_prs: true\n autoupdate_commit_msg: '[pre-commit.ci] pre-commi"
},
{
"path": ".readthedocs.yml",
"chars": 626,
"preview": "# .readthedocs.yml\n# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html fo"
},
{
"path": "CHANGELOG.md",
"chars": 71172,
"preview": "# Changelog\nAll notable changes to MONAI are documented in this file.\n\nThe format is based on [Keep a Changelog](http://"
},
{
"path": "CITATION.cff",
"chars": 3855,
"preview": "# YAML 1.2\n# Metadata for citation of this software according to the CFF format (https://citation-file-format.github.io/"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3355,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": "CONTRIBUTING.md",
"chars": 23760,
"preview": "- [Introduction](#introduction)\n- [The contribution process](#the-contribution-process)\n - [Preparing pull requests](#p"
},
{
"path": "Dockerfile",
"chars": 2805,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "Dockerfile.slim",
"chars": 4033,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "MANIFEST.in",
"chars": 83,
"preview": "include versioneer.py\ninclude monai/_version.py\n\ninclude README.md\ninclude LICENSE\n"
},
{
"path": "README.md",
"chars": 7040,
"preview": "<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/docs/images/MONAI-logo-color.png\""
},
{
"path": "SECURITY.md",
"chars": 1161,
"preview": "# Security Policy\n\n## Reporting a Vulnerability\nMONAI takes security seriously and appreciate your efforts to responsibl"
},
{
"path": "docs/.readthedocs.yaml",
"chars": 276,
"preview": "# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file for details\n\nversion: 2\n\nbuil"
},
{
"path": "docs/Makefile",
"chars": 884,
"preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line, and also\n# from the "
},
{
"path": "docs/_static/custom.css",
"chars": 292,
"preview": "@import url('https://fonts.googleapis.com/css?family=Lekton:700|Roboto&display=swap');\nbody{font-family:'Roboto',sans-se"
},
{
"path": "docs/requirements.txt",
"chars": 915,
"preview": "-f https://download.pytorch.org/whl/cpu/torch-2.4.1%2Bcpu-cp39-cp39-linux_x86_64.whl\ntorch>=2.4.1\npytorch-ignite==0.4.11"
},
{
"path": "docs/source/api.rst",
"chars": 275,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\nAPI Reference\n=============\n\n.. toctree::\n :maxdepth: 1\n\n apps\n"
},
{
"path": "docs/source/apidocs/modules.rst",
"chars": 62,
"preview": ":orphan:\n\nmonai\n=====\n\n.. toctree::\n :maxdepth: 4\n\n monai\n"
},
{
"path": "docs/source/apidocs/monai.rst",
"chars": 138,
"preview": "monai package\n=============\n\nModule contents\n---------------\n\n.. automodule:: monai\n :members:\n :undoc-members:\n :"
},
{
"path": "docs/source/applications.md",
"chars": 7439,
"preview": "# Research and Application Highlights\n\n### COPLE-Net for COVID-19 Pneumonia Lesion Segmentation\n[A reimplementation](htt"
},
{
"path": "docs/source/apps.rst",
"chars": 6649,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _apps:\n\nApplications\n============\n.. currentmodule:: monai.apps\n"
},
{
"path": "docs/source/auto3dseg.rst",
"chars": 155,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _auto3dseg:\n\nAuto3dseg\n=========\n\n.. automodule:: monai.auto3dse"
},
{
"path": "docs/source/bundle.rst",
"chars": 1022,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _bundle:\n\nModel Bundle\n============\n.. currentmodule:: monai.bun"
},
{
"path": "docs/source/bundle_intro.rst",
"chars": 2203,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\nBundle\n======\n\nMONAI Bundles are a specification and file structure"
},
{
"path": "docs/source/conf.py",
"chars": 8035,
"preview": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common op"
},
{
"path": "docs/source/config_syntax.md",
"chars": 10113,
"preview": "# MONAI Bundle Configuration\n\nThe `monai.bundle` module supports building Python-based workflows via structured configur"
},
{
"path": "docs/source/contrib.rst",
"chars": 228,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\nDevelopment\n===========\n\nFor guidance on making a contribution to M"
},
{
"path": "docs/source/data.rst",
"chars": 6006,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _data:\n\nData\n====\n\nGeneric Interfaces\n------------------\n.. curr"
},
{
"path": "docs/source/engines.rst",
"chars": 818,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _engines:\n\nEngines\n=======\n\nWorkflows\n---------\n\n.. currentmodul"
},
{
"path": "docs/source/fl.rst",
"chars": 476,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _fl:\n\nFederated Learning\n==================\n.. currentmodule:: m"
},
{
"path": "docs/source/handlers.rst",
"chars": 3951,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _handlers:\n\nEvent handlers\n==============\n.. currentmodule:: mon"
},
{
"path": "docs/source/highlights.rst",
"chars": 139,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\nHighlights\n==========\n\n.. toctree::\n :maxdepth: 1\n\n modules.md\n"
},
{
"path": "docs/source/index.rst",
"chars": 3708,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. MONAI documentation main file, created by\n sphinx-quickstart o"
},
{
"path": "docs/source/inferers.rst",
"chars": 2330,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _inferers:\n\nInference methods\n=================\n\nInferers\n------"
},
{
"path": "docs/source/installation.md",
"chars": 9635,
"preview": "# Installation Guide\n\n## Table of Contents\n\n- [Installation Guide](#installation-guide)\n\t- [Table of Contents](#table-of"
},
{
"path": "docs/source/lazy_resampling.rst",
"chars": 13013,
"preview": ".. _lazy_resampling:\n\n:github_url: https://github.com/Project-MONAI/MONAI\n\nLazy Resampling\n===============\n\n.. toctree::"
},
{
"path": "docs/source/losses.rst",
"chars": 2772,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _losses:\n\nLoss functions\n==============\n\nSegmentation Losses\n---"
},
{
"path": "docs/source/mb_properties.rst",
"chars": 490,
"preview": "MONAI Bundle Properties\n=======================\n\n\nTrain properties\n----------------\n\n.. csv-table::\n :header-rows: 1\n "
},
{
"path": "docs/source/mb_specification.rst",
"chars": 15444,
"preview": "\n==========================\nMONAI Bundle Specification\n==========================\n\nOverview\n========\n\nThis is the specif"
},
{
"path": "docs/source/metrics.rst",
"chars": 3790,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _metrics:\n\nMetrics\n=======\n.. currentmodule:: monai.metrics\n\n`FR"
},
{
"path": "docs/source/modules.md",
"chars": 21845,
"preview": "# Modules\n\nMONAI aims at facilitating deep learning in medical image analysis at multiple granularities. This document p"
},
{
"path": "docs/source/networks.rst",
"chars": 13431,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _networks:\n\nNetwork architectures\n=====================\n\nBlocks\n"
},
{
"path": "docs/source/optimizers.rst",
"chars": 611,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _optimizers:\n\nOptimizers\n==========\n.. currentmodule:: monai.opt"
},
{
"path": "docs/source/precision_accelerating.md",
"chars": 3261,
"preview": "# Precision and Accelerating\n\nModern GPU architectures usually can use reduced precision tensor data or computational op"
},
{
"path": "docs/source/transforms.rst",
"chars": 58994,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _transform_api:\n\nTransforms\n==========\n\nGeneric Interfaces\n-----"
},
{
"path": "docs/source/transforms_idx.rst",
"chars": 1343,
"preview": ".. _transforms_idx:\n\n.. currentmodule:: monai.transforms\n\nCrop and pad\n^^^^^^^^^^^^\n\n.. autosummary::\n :toctree: _gen\n"
},
{
"path": "docs/source/utils.rst",
"chars": 1198,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _utils:\n\nUtilities\n=========\n\nConfigurations\n--------------\n.. a"
},
{
"path": "docs/source/visualize.rst",
"chars": 651,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\n.. _visualize:\n\nVisualizations\n==============\n\n.. currentmodule:: m"
},
{
"path": "docs/source/whatsnew.rst",
"chars": 357,
"preview": ":github_url: https://github.com/Project-MONAI/MONAI\n\nWhat's New\n==========\n\n.. toctree::\n :maxdepth: 1\n\n whatsnew_1_"
},
{
"path": "docs/source/whatsnew_0_5.md",
"chars": 6923,
"preview": "# What's new in 0.5\n\n- Invert spatial transforms and test-time augmentations\n- Lesion detection in digital pathology\n- D"
},
{
"path": "docs/source/whatsnew_0_6.md",
"chars": 8297,
"preview": "# What's new in 0.6\n\n- Decollating mini-batches as an essential post-processing step\n- Pythonic APIs to load the pretrai"
},
{
"path": "docs/source/whatsnew_0_7.md",
"chars": 3660,
"preview": "# What's new in 0.7\n\n- Performance enhancements with profiling and tuning guides\n- Major usability improvements in `mona"
},
{
"path": "docs/source/whatsnew_0_8.md",
"chars": 3153,
"preview": "# What's new in 0.8\n\n- Differentiable neural network topology search\n- Multiple instance learning for digital pathology "
},
{
"path": "docs/source/whatsnew_0_9.md",
"chars": 3386,
"preview": "# What's new in 0.9\n\n- MONAI Bundle\n- Object detection in medical images\n- Swin Transformers for 3D medical image analys"
},
{
"path": "docs/source/whatsnew_1_0.md",
"chars": 4688,
"preview": "# What's new in 1.0\n\n- Model Zoo\n- Auto3DSeg\n- Federated Learning Client\n- MetaTensor Support for Digital Pathology Work"
},
{
"path": "docs/source/whatsnew_1_1.md",
"chars": 5118,
"preview": "# What's new in 1.1\n\n- Digital pathology workflows\n- Experiment management for MONAI bundle\n- Auto3dSeg enhancements\n- N"
},
{
"path": "docs/source/whatsnew_1_2.md",
"chars": 5474,
"preview": "# What's new in 1.2\n\n- Auto3DSeg enhancements and benchmarks\n- nnUNet integration\n- TensorRT-optimized networks\n- Metric"
},
{
"path": "docs/source/whatsnew_1_3.md",
"chars": 1314,
"preview": "# What's new in 1.3\n\n- Bundle usability enhancements\n- Integrating MONAI Generative into MONAI core\n\n\n## Bundle usabilit"
},
{
"path": "docs/source/whatsnew_1_4.md",
"chars": 6015,
"preview": "# What's new in 1.4\n\n- MAISI: state-of-the-art 3D Latent Diffusion Model\n- VISTA-3D: interactive foundation model for se"
},
{
"path": "docs/source/whatsnew_1_5.md",
"chars": 4939,
"preview": "\n# What's new in 1.5\n\n- Support numpy 2.x and Pytorch 2.6\n- MAISI inference accelerate\n- Bundles storage changed to hugg"
},
{
"path": "docs/source/whatsnew_1_5_1.md",
"chars": 934,
"preview": "\n# What's new in 1.5.1\n\nThis is a minor update for MONAI to address security concerns and improve compatibility with the"
},
{
"path": "docs/source/whatsnew_1_5_2.md",
"chars": 230,
"preview": "\n# What's new in 1.5.2 🎉🎉\n\nThis is a minor update for MONAI to address a security concern.\n\n- Security fix to address ad"
},
{
"path": "environment-dev.yml",
"chars": 226,
"preview": "name: monai\nchannels:\n - pytorch\n - defaults\n - nvidia\n - conda-forge\ndependencies:\n - numpy>=1.24,<3.0\n - pytorch"
},
{
"path": "monai/README.md",
"chars": 1520,
"preview": "# MONAI\n\n* **apps**: high level medical domain specific deep learning applications.\n\n* **auto3dseg**: automated machine "
},
{
"path": "monai/__init__.py",
"chars": 4036,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/_extensions/__init__.py",
"chars": 642,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/_extensions/gmm/gmm.cpp",
"chars": 2931,
"preview": "/*\nCopyright (c) MONAI Consortium\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this f"
},
{
"path": "monai/_extensions/gmm/gmm.h",
"chars": 1760,
"preview": "/*\nCopyright (c) MONAI Consortium\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this f"
},
{
"path": "monai/_extensions/gmm/gmm_cpu.cpp",
"chars": 1118,
"preview": "/*\nCopyright (c) MONAI Consortium\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this f"
},
{
"path": "monai/_extensions/gmm/gmm_cuda.cu",
"chars": 15983,
"preview": "/*\nCopyright (c) MONAI Consortium\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this f"
},
{
"path": "monai/_extensions/gmm/gmm_cuda_linalg.cuh",
"chars": 3520,
"preview": "/*\nCopyright (c) MONAI Consortium\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this f"
},
{
"path": "monai/_extensions/loader.py",
"chars": 3643,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/_version.py",
"chars": 23611,
"preview": "\n# This file helps to compute a version number in source trees obtained from\n# git-archive tarball (such as those provid"
},
{
"path": "monai/apps/__init__.py",
"chars": 908,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/auto3dseg/__init__.py",
"chars": 1016,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/auto3dseg/__main__.py",
"chars": 1411,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/auto3dseg/auto_runner.py",
"chars": 40662,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/auto3dseg/bundle_gen.py",
"chars": 28943,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/auto3dseg/data_analyzer.py",
"chars": 18628,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/auto3dseg/ensemble_builder.py",
"chars": 27298,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/auto3dseg/hpo_gen.py",
"chars": 16467,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/auto3dseg/transforms.py",
"chars": 3856,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/auto3dseg/utils.py",
"chars": 3138,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/datasets.py",
"chars": 35085,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/deepedit/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/deepedit/interaction.py",
"chars": 4498,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/deepedit/transforms.py",
"chars": 40357,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/deepgrow/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/deepgrow/dataset.py",
"chars": 9900,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/deepgrow/interaction.py",
"chars": 3745,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/deepgrow/transforms.py",
"chars": 43329,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/metrics/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/metrics/coco.py",
"chars": 26583,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/metrics/matching.py",
"chars": 17161,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/networks/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/networks/retinanet_detector.py",
"chars": 53665,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/networks/retinanet_network.py",
"chars": 19310,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/transforms/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/transforms/array.py",
"chars": 24546,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/transforms/box_ops.py",
"chars": 18032,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/transforms/dictionary.py",
"chars": 69513,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/utils/ATSS_matcher.py",
"chars": 13532,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/utils/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/utils/anchor_utils.py",
"chars": 18725,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/utils/box_coder.py",
"chars": 11239,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/utils/box_selector.py",
"chars": 9031,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/utils/detector_utils.py",
"chars": 10308,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/utils/hard_negative_sampler.py",
"chars": 13890,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/detection/utils/predict_utils.py",
"chars": 5818,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/generation/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/generation/maisi/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/generation/maisi/networks/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/generation/maisi/networks/autoencoderkl_maisi.py",
"chars": 36898,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/generation/maisi/networks/controlnet_maisi.py",
"chars": 7707,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/generation/maisi/networks/diffusion_model_unet_maisi.py",
"chars": 19088,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/mmars/__init__.py",
"chars": 726,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/mmars/mmars.py",
"chars": 13134,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/mmars/model_desc.py",
"chars": 9996,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/nnunet/__init__.py",
"chars": 963,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/nnunet/__main__.py",
"chars": 832,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/nnunet/nnunet_bundle.py",
"chars": 24947,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/nnunet/nnunetv2_runner.py",
"chars": 49791,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/nnunet/utils.py",
"chars": 6761,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/nuclick/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/nuclick/transforms.py",
"chars": 24937,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/__init__.py",
"chars": 1030,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/engines/__init__.py",
"chars": 650,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/engines/utils.py",
"chars": 2424,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/handlers/__init__.py",
"chars": 609,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/handlers/utils.py",
"chars": 2315,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/inferers/__init__.py",
"chars": 660,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/inferers/inferer.py",
"chars": 9194,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/losses/__init__.py",
"chars": 650,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/losses/hovernet_loss.py",
"chars": 7293,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/metrics/__init__.py",
"chars": 646,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/metrics/lesion_froc.py",
"chars": 7358,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/transforms/__init__.py",
"chars": 2243,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/transforms/post/__init__.py",
"chars": 1995,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/transforms/post/array.py",
"chars": 37444,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/transforms/post/dictionary.py",
"chars": 25928,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/transforms/stain/__init__.py",
"chars": 836,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/transforms/stain/array.py",
"chars": 8638,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/transforms/stain/dictionary.py",
"chars": 4761,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/pathology/utils.py",
"chars": 2838,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/complex_utils.py",
"chars": 8393,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/fastmri_reader.py",
"chars": 3644,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/mri_utils.py",
"chars": 2000,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/networks/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/networks/blocks/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/networks/blocks/varnetblock.py",
"chars": 4183,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/networks/nets/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/networks/nets/coil_sensitivity_model.py",
"chars": 6215,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/networks/nets/complex_unet.py",
"chars": 4775,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/networks/nets/utils.py",
"chars": 11377,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/networks/nets/varnet.py",
"chars": 3831,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/transforms/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/transforms/array.py",
"chars": 12240,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/reconstruction/transforms/dictionary.py",
"chars": 15829,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/tcia/__init__.py",
"chars": 824,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/tcia/label_desc.py",
"chars": 1582,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/tcia/utils.py",
"chars": 6312,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/utils.py",
"chars": 18299,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/vista3d/__init__.py",
"chars": 573,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/vista3d/inferer.py",
"chars": 8712,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/vista3d/sampler.py",
"chars": 8274,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/apps/vista3d/transforms.py",
"chars": 10650,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/auto3dseg/__init__.py",
"chars": 1164,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/auto3dseg/algo_gen.py",
"chars": 4117,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/auto3dseg/analyzer.py",
"chars": 42216,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
},
{
"path": "monai/auto3dseg/operations.py",
"chars": 5110,
"preview": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi"
}
]
// ... and 1261 more files (download for full content)
About this extraction
This page contains the full source code of the Project-MONAI/MONAI GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1461 files (10.7 MB), approximately 2.9M tokens, and a symbol index with 9683 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.