MCPcopy Create free account

hub / github.com/Project-MONAI/MONAI / functions

Functions7,906 in github.com/Project-MONAI/MONAI

↓ 2 callersFunctionreshape_complex_to_channel_dim
Swaps the complex dimension with the channel dimension so that the network treats real/imaginary parts as two separate channels. Args:
monai/apps/reconstruction/networks/nets/utils.py:26
↓ 2 callersFunctionresnet18
ResNet-18 with optional pretrained support when `spatial_dims` is 3. Pretraining from `Med3D: Transfer Learning for 3D Medical Image Analysis <ht
monai/networks/nets/resnet.py:548
↓ 2 callersFunctionresnet50
ResNet-50 with optional pretrained support when `spatial_dims` is 3. Pretraining from `Med3D: Transfer Learning for 3D Medical Image Analysis <ht
monai/networks/nets/resnet.py:572
↓ 2 callersMethodresolve_macro_and_relative_ids
Recursively resolve `self.config` to replace the relative ids with absolute ids, for example, `@##A` means `A` in the upper level. an
monai/bundle/config_parser.py:558
↓ 2 callersFunctionretinanet_resnet50_fpn_detector
Returns a RetinaNet detector using a ResNet-50 as backbone, which can be pretrained from `Med3D: Transfer Learning for 3D Medical Image Analy
monai/apps/detection/networks/retinanet_detector.py:1014
↓ 2 callersFunctionrmsemetric_np
(y_pred, y)
tests/handlers/test_handler_regression_metrics_dist.py:40
↓ 2 callersFunctionroll
Similar to np.roll but applies to PyTorch Tensors Args: x: input data (k-space or image) that can be 1) real-valued: the
monai/networks/blocks/fft_utils_t.py:42
↓ 2 callersMethodrun
(self)
tests/nonconfig_workflow.py:220
↓ 2 callersMethodrun_algo
Launch the Algos. This is useful for light-weight Algos where there's no need to distribute the training jobs. If the generated Algo
monai/auto3dseg/algo_gen.py:117
↓ 2 callersMethodrun_interaction
(self, train)
tests/integration/test_deepedit_interaction.py:44
↓ 2 callersMethodrun_interaction
(self, train, compose)
tests/apps/deepgrow/transforms/test_deepgrow_interaction.py:42
↓ 2 callersMethodrun_test
(self, save_keys, write_keys)
tests/integration/test_mapping_filed.py:60
↓ 2 callersFunctionrun_training_test
(root_dir, device="cuda:0", cachedataset=0, readers=(None, None), num_workers=4, lazy=True)
tests/integration/test_integration_lazy_samples.py:36
↓ 2 callersMethodrun_transform
(self, img, xform_cls, args_dict)
tests/integration/test_meta_affine.py:135
↓ 2 callersFunctionsafe_extract_member
Securely verify compressed package member paths to prevent path traversal attacks
monai/apps/utils.py:125
↓ 2 callersMethodsample
Sampling function for the VQVAE + Transformer model. Args: latent_spatial_dim: shape of the sampled image. s
monai/inferers/inferer.py:2064
↓ 2 callersFunctionsample_points_from_label
Sample points from labels. Args: labels: [1, 1, H, W, D] label_set: local index, must match values in labels. max_ppoint:
monai/transforms/utils.py:1351
↓ 2 callersMethodsampling
From the mean and sigma representations resulting of encoding an image through the latent space, obtains a noise sample resulting fro
monai/networks/nets/spade_autoencoderkl.py:444
↓ 2 callersMethodsave_batch
Save a batch of data into the cache dictionary. Args: batch_data: target batch data content that save into cache. met
monai/data/csv_saver.py:101
↓ 2 callersMethodselect_boxes_per_image
Postprocessing to generate detection result from classification logits and boxes. The box selection is performed with the following
monai/apps/detection/utils/box_selector.py:148
↓ 2 callersFunctionselect_labels
For element in labels, select indices keep from it. Args: labels: Sequence of array. Each element represents classification labels o
monai/apps/detection/transforms/box_ops.py:328
↓ 2 callersFunctionsensitivity_map_expand
Expands an image to its corresponding coil images based on the given sens_maps. Let's say there are C coils. This function multiples image im
monai/apps/reconstruction/networks/nets/utils.py:291
↓ 2 callersFunctionsensitivity_map_reduce
Reduces coil measurements to a corresponding image based on the given sens_maps. Let's say there are C coil measurements inside kspace, then
monai/apps/reconstruction/networks/nets/utils.py:271
↓ 2 callersMethodsetUp
(self)
tests/test_utils.py:737
↓ 2 callersMethodsetUp
(self)
tests/transforms/compose/test_some_of.py:79
↓ 2 callersMethodset_atss_matcher
Using for training. Set ATSS matcher that matches anchors with ground truth boxes Args: num_candidates: number of positi
monai/apps/detection/networks/retinanet_detector.py:351
↓ 2 callersMethodset_data
Set the input data and run deterministic transforms to generate cache content. Note: should call this func after an entire epoch and
monai/data/grid_dataset.py:265
↓ 2 callersMethodset_device
(self, device)
monai/transforms/spatial/array.py:2753
↓ 2 callersMethodset_ensemble_method
Set the bundle ensemble method name and parameters for save image transform parameters. Args: ensemble_method_name: the
monai/apps/auto3dseg/auto_runner.py:601
↓ 2 callersMethodset_hard_negative_sampler
Using for training. Set hard negative sampler that samples part of the anchors for training. HardNegativeSampler is used to suppress
monai/apps/detection/networks/retinanet_detector.py:364
↓ 2 callersMethodset_hpo_params
Set parameters for the HPO module and the algos before the training. It will attempt to (1) override bundle templates with the key-va
monai/apps/auto3dseg/auto_runner.py:673
↓ 2 callersFunctionset_named_module
look up `name` in `mod` and replace the layer with `new_layer`, return the updated `mod`. Args: mod: a pytorch module to be updated.
monai/networks/utils.py:147
↓ 2 callersMethodset_num_fold
Set the number of cross validation folds for all algos. Args: num_fold: a positive integer to define the number of folds
monai/apps/auto3dseg/ensemble_builder.py:540
↓ 2 callersMethodset_random_state
( self, seed: int | None = None, state: np.random.RandomState | None = None )
monai/apps/reconstruction/transforms/dictionary.py:148
↓ 2 callersMethodset_random_state
( self, seed: int | None = None, state: np.random.RandomState | None = None )
monai/transforms/intensity/dictionary.py:627
↓ 2 callersMethodset_random_state
( self, seed: int | None = None, state: np.random.RandomState | None = None )
monai/transforms/intensity/dictionary.py:705
↓ 2 callersMethodset_random_state
(self, seed: int | None = None, state: np.random.RandomState | None = None)
monai/transforms/intensity/dictionary.py:1494
↓ 2 callersMethodset_random_state
( self, seed: int | None = None, state: np.random.RandomState | None = None )
monai/transforms/intensity/dictionary.py:1662
↓ 2 callersMethodset_random_state
(self, seed: int | None = None, state: np.random.RandomState | None = None)
monai/transforms/spatial/dictionary.py:1888
↓ 2 callersMethodset_random_state
(self, seed: int | None = None, state: np.random.RandomState | None = None)
monai/transforms/spatial/dictionary.py:2116
↓ 2 callersMethodset_random_state
(self, seed: int | None = None, state: np.random.RandomState | None = None)
monai/transforms/spatial/array.py:2921
↓ 2 callersMethodset_random_state
( self, seed: int | None = None, state: np.random.RandomState | None = None )
monai/transforms/croppad/dictionary.py:1258
↓ 2 callersMethodset_random_state
( self, seed: int | None = None, state: np.random.RandomState | None = None )
monai/transforms/smooth_field/dictionary.py:94
↓ 2 callersMethodset_random_state
( self, seed: int | None = None, state: np.random.RandomState | None = None )
monai/transforms/smooth_field/dictionary.py:172
↓ 2 callersFunctionset_rnd
Set seed or random state for all randomizable properties of obj. Args: obj: object to set seed or random state for. seed: se
monai/data/utils.py:687
↓ 2 callersMethodset_swish
Sets swish function as memory efficient (for training) or standard (for export). Args: memory_efficient (bool): Whether to use me
monai/networks/nets/efficientnet.py:221
↓ 2 callersMethodset_trainer
Set trainer to execute early stop if not setting properly in `__init__()`.
monai/handlers/earlystop_handler.py:108
↓ 2 callersMethodshortcut
(self, x, seg)
monai/networks/nets/spade_network.py:119
↓ 2 callersFunctionsoft_erode
Perform soft erosion on the input image Args: img: the shape should be BCH(WD) Adapted from: https://github.com/jocpae/
monai/losses/cldice.py:27
↓ 2 callersFunctionsoft_open
Wrapper function to perform soft opening on the input image Args: img: the shape should be BCH(WD) Adapted from: https:
monai/losses/cldice.py:64
↓ 2 callersFunctionsoft_skel
Perform soft skeletonization on the input image Adapted from: https://github.com/jocpae/clDice/blob/master/cldice_loss/pytorch/soft_s
monai/losses/cldice.py:79
↓ 2 callersFunctionsoftplus
stable softplus through `np.logaddexp` with equivalent implementation for torch. Args: x: array/tensor. Returns: Softplus of
monai/transforms/utils_pytorch_numpy_unification.py:58
↓ 2 callersFunctionsorted_dict
Return a new sorted dictionary from the `item`.
monai/data/utils.py:1401
↓ 2 callersFunctionspatial_average
(x: torch.Tensor, keepdim: bool = True)
monai/losses/perceptual.py:463
↓ 2 callersFunctionspatial_crop_boxes
This function generate the new boxes when the corresponding image is cropped to the given ROI. When ``remove_empty=True``, it makes sure the
monai/data/box_utils.py:1011
↓ 2 callersFunctionsquarepulse
compute squarepulse using pytorch equivalent to numpy implementation from https://docs.scipy.org/doc/scipy/reference/generated/scipy.sign
monai/transforms/utils.py:2229
↓ 2 callersFunctionstandardize_empty_box
When boxes are empty, this function standardize it to shape of (0,4) or (0,6). Args: boxes: bounding boxes, Nx4 or Nx6 or empty torc
monai/data/box_utils.py:519
↓ 2 callersMethodstatus
Returns a status string for the current state of the engine.
monai/utils/jupyter_utils.py:346
↓ 2 callersMethodstep
Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion process from the learned m
monai/networks/schedulers/ddim.py:140
↓ 2 callersMethodstep
Predicts the next sample in the diffusion process. Args: model_output (torch.Tensor): Output from the trained diffusion
monai/networks/schedulers/rectified_flow.py:283
↓ 2 callersFunctionstring_list_all_gather
Utility function for distributed data parallel to all gather a list of strings. Refer to the idea of ignite `all_gather(string)`: https:/
monai/utils/dist.py:143
↓ 2 callersFunctionsubfiles
( folder: str | Path, prefix: str | None = None, suffix: str | None = None, sort: bool = True )
monai/apps/nnunet/nnunet_bundle.py:520
↓ 2 callersFunctionsubtract_mean
(x: torch.Tensor)
monai/losses/perceptual.py:476
↓ 2 callersFunctionswapaxes_boxes
Interchange two axes of boxes. Args: boxes: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``Stan
monai/apps/detection/transforms/box_ops.py:357
↓ 2 callersFunctiontimestep_transform
Applies a transformation to the timestep based on image resolution scaling. Args: t (torch.Tensor): The original timestep(s).
monai/networks/schedulers/rectified_flow.py:51
↓ 2 callersMethodto_string
Return a block string notation for current BlockArgs object Returns: A string notation of BlockArgs object arguments.
monai/networks/nets/efficientnet.py:999
↓ 2 callersFunctionto_tuple_of_dictionaries
Given a dictionary whose values contain scalars or tuples (with the same length as ``keys``), Create a dictionary for each key containing the
monai/utils/misc.py:229
↓ 2 callersFunctiontorchvision_zscore_norm
(x: torch.Tensor)
monai/losses/perceptual.py:467
↓ 2 callersMethodtrace_transform
()
monai/utils/misc.py:549
↓ 2 callersMethodtrain
Train on client's local data. Args: data: `ExchangeObject` containing the current global model weights. extr
monai/fl/client/monai_algo.py:507
↓ 2 callersMethodtrain_and_infer
(self, idx=0)
tests/integration/test_integration_classification_2d.py:240
↓ 2 callersMethodtrain_and_infer
(self, idx=0)
tests/integration/test_integration_workflows.py:305
↓ 2 callersMethodtrain_and_infer
(self, idx=0)
tests/integration/test_integration_segmentation_3d.py:255
↓ 2 callersMethodtrain_single_model_command
Build the shell command string for training a single nnU-Net model. Args: config: Configuration name (e.g., "3d_fullres"
monai/apps/nnunet/nnunetv2_runner.py:542
↓ 2 callersMethodtransform_info_keys
The keys to store necessary info of an applied transform.
monai/transforms/inverse.py:114
↓ 2 callersFunctionunroll_input
(input_names, input_example)
monai/networks/trt_compiler.py:241
↓ 2 callersMethodupdate_meta
Update the metadata from the output of `MetaTensor.__torch_function__`. The output of `torch.Tensor.__torch_function__` could be a s
monai/data/meta_tensor.py:175
↓ 2 callersMethodupdate_transform_count
(self, counts, output)
tests/transforms/compose/test_some_of.py:85
↓ 2 callersFunctionvista3d132
Exact VISTA3D network configuration used in https://arxiv.org/abs/2406.05285>`_. The model treats class index larger than 132 as zero-shot.
monai/networks/nets/vista3d.py:36
↓ 2 callersFunctionwindow_partition
window partition operation based on: "Liu et al., Swin Transformer: Hierarchical Vision Transformer using Shifted Windows <https://arxiv.org/a
monai/networks/nets/swin_unetr.py:351
↓ 2 callersFunctionwrap
(model, path)
monai/networks/trt_compiler.py:657
↓ 2 callersFunctionwrite_metrics_reports
Utility function to write the metrics into files, contains 3 parts: 1. if `metrics` dict is not None, write overall metrics into file, every
monai/handlers/utils.py:56
↓ 1 callersMethod__call__
This method should take raw model outputs as inputs, and return values that measure the models' quality.
monai/metrics/metric.py:34
↓ 1 callersMethod__call__
Apply the transform to `img`.
monai/transforms/utility/array.py:560
↓ 1 callersMethod__call__
(self, data: Mapping[Hashable, torch.Tensor], lazy: bool | None = None)
monai/transforms/croppad/dictionary.py:159
↓ 1 callersMethod__enter__
(self)
monai/utils/profiling.py:132
↓ 1 callersMethod__exit__
(self, exc_type, exc_value, exc_traceback)
monai/utils/profiling.py:136
↓ 1 callersMethod__init__
(self, *_args, **kwargs)
monai/utils/module.py:446
↓ 1 callersMethod__init__
( self, backbone: VoxelMorphUNet | nn.Module | None = None, integration_steps: int = 7
monai/networks/nets/voxelmorph.py:410
↓ 1 callersMethod__init__
( self, spatial_dims: int, in_channels: int, num_res_blocks: Sequence[int] | i
monai/networks/nets/controlnet.py:152
↓ 1 callersMethod__init__
( self, spatial_dims: int = 3, init_filters: int = 8, in_channels: int = 1,
monai/networks/nets/segresnet.py:59
↓ 1 callersMethod__init__
( self, spatial_dims: int, channels: int, in_channels: int, out_channe
monai/networks/nets/patchgan_discriminator.py:137
↓ 1 callersMethod__init__
( self, num_tokens: int, max_seq_len: int, attn_layers_dim: int, attn_
monai/networks/nets/transformer.py:60
↓ 1 callersMethod__init__
( self, spatial_dims: int, in_channels: int, out_channels: int, kernel
monai/networks/nets/dynunet.py:130
↓ 1 callersMethod__init__
( self, spatial_dims: int = 3, in_channels: int = 1, out_channels: int = 1,
monai/networks/nets/highresnet.py:139
↓ 1 callersMethod__init__
Defines a network accept input with `in_channels` channels, output of `out_channels` channels, and hidden layers with channels given
monai/networks/nets/fullyconnectednet.py:53
↓ 1 callersMethod__init__
(self, spatial_dims, dim: int, num_heads: int, bias: bool, flash_attention: bool = False)
monai/networks/blocks/cablock.py:96
↓ 1 callersMethod__init__
Args: spatial_dims: number of spatial dimensions of the input image. in_channels: number of channels of the input ima
monai/networks/blocks/upsample.py:43
↓ 1 callersMethod__init__
Args: patch_size: dimension of patch size. in_chans: dimension of input channels. embed_dim: number of li
monai/networks/blocks/patchembedding.py:178
↓ 1 callersMethod__init__
For pytorch native APIs, the possible values are: - mode: ``"nearest"``, ``"bilinear"``, ``"bicubic"``. - padding_mo
monai/networks/blocks/warp.py:36
← previousnext →1,201–1,300 of 7,906, ranked by callers