MCPcopy Index your code

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

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

↓ 7 callersFunctionlook_up_named_module
get the named module in `mod` by the attribute name, for example ``look_up_named_module(net, "features.3.1.attn")`` Args: name:
monai/networks/utils.py:116
↓ 7 callersFunctionmeshgrid_ij
(*tensors)
monai/networks/utils.py:1079
↓ 7 callersMethodpeek_pending_rank
(self)
monai/data/meta_tensor.py:505
↓ 7 callersMethodrandomize
(self, data: Any | None = None)
monai/transforms/smooth_field/array.py:98
↓ 7 callersMethodread
Read image data from specified file or files, it can read a list of images and stack them together as multi-channel data in `get_data
monai/data/image_reader.py:228
↓ 7 callersFunctionregister_writer
Register ``ImageWriter``, so that writing a file with filename extension ``ext_name`` could be resolved to a tuple of potentially appropriate
monai/data/image_writer.py:67
↓ 7 callersFunctionrun_cmd
Run a command by using ``subprocess.run`` with capture_output=True and stderr=subprocess.STDOUT so that the raise exception will have that in
monai/utils/misc.py:877
↓ 7 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/autoencoderkl.py:613
↓ 7 callersFunctionsave_state
Save the state dict of input source data with PyTorch `save`. It can save `nn.Module`, `state_dict`, a dictionary of `nn.Module` or `state_di
monai/networks/utils.py:627
↓ 7 callersMethodset_random_state
(self, seed: int | None = None, state: np.random.RandomState | None = None)
monai/transforms/croppad/dictionary.py:391
↓ 7 callersMethodset_random_state
( self, seed: int | None = None, state: np.random.RandomState | None = None )
monai/transforms/smooth_field/dictionary.py:262
↓ 7 callersFunctionstr2bool
Convert a string to a boolean. Case insensitive. True: yes, true, t, y, 1. False: no, false, f, n, 0. Args: value: string to be
monai/utils/misc.py:459
↓ 7 callersFunctionswitch_endianness
Convert the input `data` endianness to `new`. Args: data: input to be converted. new: the target endianness, currently suppo
monai/transforms/io/array.py:74
↓ 7 callersFunctionto_onehot
(x)
tests/transforms/test_keep_largest_connected_component.py:27
↓ 7 callersFunctionunsqueeze_right
Append 1-sized dimensions to `arr` to create a result with `ndim` dimensions.
monai/utils/misc.py:920
↓ 6 callersMethod__call__
Run inference on `inputs` with the `network` model. Args: inputs: input of the model inference. network: mod
monai/inferers/inferer.py:83
↓ 6 callersMethod__init__
( self, spatial_dims: int, in_channels: int, block: type[SEBottleneck | SEResN
monai/networks/nets/senet.py:96
↓ 6 callersMethod__init__
(self, in_channels: int, max_pool, se_layer, dropout, kernel_size, num_filters)
monai/networks/nets/quicknat.py:214
↓ 6 callersMethod__init__
(self, hidden_size)
monai/networks/nets/transchex.py:194
↓ 6 callersMethod__init__
( self, mode: HoVerNetMode | str = HoVerNetMode.FAST, in_channels: int = 3, np
monai/networks/nets/hovernet.py:459
↓ 6 callersMethod__init__
Args: include_background: if False, channel index 0 (background category) is excluded from the calculation. if th
monai/losses/dice.py:55
↓ 6 callersFunction_apply
(x, fn)
tests/transforms/test_compose_get_number_conversions.py:32
↓ 6 callersFunction_centroid_similarity
Cosine similarity between L2-normalised class centroids. Args: emb: ``[N, D]`` float tensor. labels: ``[N]`` integer class labels
monai/metrics/embedding_collapse.py:236
↓ 6 callersFunction_copy_compatible_dict
(from_dict: dict, to_dict: dict)
monai/data/image_reader.py:130
↓ 6 callersFunction_domain_shift
Linear CKA between source and target embedding matrices. Reference: Kornblith et al. (2019). Args: source: ``[N, D]`` float tensor.
monai/metrics/embedding_collapse.py:326
↓ 6 callersFunction_load_state_dict
This function is used to load pretrained models.
monai/networks/nets/senet.py:285
↓ 6 callersMethodadd_analyzer
Add new analyzers to the engine so that the callable and summarize functions will utilize the new analyzers for stats computations.
monai/auto3dseg/seg_summarizer.py:123
↓ 6 callersMethodaggregate
Execute reduction and aggregation logic for the output of `compute_dice`. Args: reduction: defines mode of reduction as
monai/metrics/meandice.py:167
↓ 6 callersMethodaggregate
Execute reduction logic for the output of `compute_panoptic_quality`. Args: reduction: define mode of reduction to the m
monai/metrics/panoptic_quality.py:132
↓ 6 callersFunctionallclose
`np.allclose` with equivalent implementation for torch.
monai/transforms/utils_pytorch_numpy_unification.py:72
↓ 6 callersFunctionallow_missing_keys_mode
Temporarily set all MapTransforms to not throw an error if keys are missing. After, revert to original states. Args: transform: either Ma
monai/transforms/utils.py:1720
↓ 6 callersMethodattach
Register a set of Ignite Event-Handlers to a specified Ignite engine. Args: engine: Ignite Engine, it can be a trainer,
monai/handlers/mlflow_handler.py:184
↓ 6 callersMethodclose
Stop current running logger of MLFlow.
monai/handlers/mlflow_handler.py:339
↓ 6 callersFunctioncreate_scale
create a scaling matrix Args: spatial_dims: spatial rank scaling_factor: scaling factors for every spatial dim, defaults to
monai/transforms/utils.py:1015
↓ 6 callersFunctioncreate_shear
create a shearing matrix Args: spatial_dims: spatial rank coefs: shearing factors, a tuple of 2 floats for 2D, a tuple of 6
monai/transforms/utils.py:947
↓ 6 callersFunctioncuassert
Error reporting method for CUDA calls. Args: cuda_ret: Tuple returned by CUDA runtime calls, where the first element is a
monai/networks/trt_compiler.py:84
↓ 6 callersMethodexport_to_disk
Fill the configuration templates, write the bundle (configs + scripts) to folder `output_path/algo_name`. Args: output_p
monai/apps/auto3dseg/bundle_gen.py:172
↓ 6 callersMethodgenerate
Generate the bundle scripts/configs for each bundleAlgo Args: output_folder: the output folder to save each algorithm.
monai/apps/auto3dseg/bundle_gen.py:623
↓ 6 callersMethodget_attribute_from_network
(self, attr_name, default_value=None)
monai/apps/detection/networks/retinanet_detector.py:258
↓ 6 callersMethodget_data
Extract data array and metadata from loaded image and return them. This function returns two objects, first is numpy array of image d
monai/data/image_reader.py:279
↓ 6 callersMethodget_data
(num_examples, input_size, data_type=np.asarray, include_label=True)
tests/integration/test_testtimeaugmentation.py:56
↓ 6 callersMethodget_data
(im_shape, input_type)
tests/transforms/test_rand_gibbs_noise.py:43
↓ 6 callersMethodget_device
(self)
tests/nonconfig_workflow.py:234
↓ 6 callersMethodget_ds
(self, *args, **kwargs)
tests/data/test_video_datasets.py:42
↓ 6 callersMethodget_output_path
Returns the algo output paths for scripts location
monai/auto3dseg/algo_gen.py:44
↓ 6 callersFunctionget_timestep_embedding
Create sinusoidal timestep embeddings following the implementation in Ho et al. "Denoising Diffusion Probabilistic Models" https://arxiv.org/
monai/networks/nets/diffusion_model_unet.py:245
↓ 6 callersMethodinterp
(self, x: NdarrayOrTensor, xp: NdarrayOrTensor, fp: NdarrayOrTensor)
monai/transforms/intensity/array.py:1871
↓ 6 callersMethodinverse
(self, data)
monai/transforms/compose.py:543
↓ 6 callersMethodinverse
(self, data: MetaTensor)
monai/transforms/croppad/array.py:168
↓ 6 callersMethodinverse_transform
(self, data: torch.Tensor, transform)
monai/transforms/spatial/array.py:1159
↓ 6 callersFunctionlinalg_inv
`torch.linalg.inv` with equivalent implementation for numpy. Args: x: array/tensor.
monai/transforms/utils_pytorch_numpy_unification.py:450
↓ 6 callersMethodload_image
(filename)
tests/transforms/test_load_spacing_orientation.py:35
↓ 6 callersFunctionnormalize_tensor
(x: torch.Tensor, eps: float = 1e-10)
monai/losses/perceptual.py:313
↓ 6 callersMethodpad_test
(self, input_param, input_shape, expected_shape, modes=None)
tests/padders.py:58
↓ 6 callersMethodpad_test_pending_ops
(self, input_param, input_shape)
tests/padders.py:117
↓ 6 callersFunctionpixelunshuffle
Apply pixel unshuffle to the tensor `x` with spatial dimensions `spatial_dims` and scaling factor `scale_factor`. Inverse operation of pixels
monai/networks/utils.py:415
↓ 6 callersFunctionpolyval
Evaluates the polynomial defined by `coef` at `x`. For a 1D sequence of coef (length n), evaluate:: y = coef[n-1] + x * (coef[n-2]
monai/networks/layers/convutils.py:130
↓ 6 callersFunctionpprint_edges
Pretty print the head and tail ``n_lines`` of ``val``, and omit the middle part if the part has more than 3 lines. Returns: the formatted st
monai/utils/misc.py:730
↓ 6 callersMethodproj_out
(self, x, normalize=False)
monai/networks/nets/swin_unetr.py:1058
↓ 6 callersMethodrandomize
Sometimes you need may to apply the same transform to different tensors. The idea is to get a sample and then apply it with apply() a
monai/transforms/regularization/array.py:50
↓ 6 callersFunctionravel
`np.ravel` with equivalent implementation for torch. Args: x: array/tensor to ravel. Returns: Return a contiguous flattened
monai/transforms/utils_pytorch_numpy_unification.py:255
↓ 6 callersMethodremove_border
MONAI seems to have different behavior in the borders of the image than ITK. This helper function sets the border of the ITK image as
tests/data/test_itk_torch_bridge.py:162
↓ 6 callersMethodreset
Clear all the added `ConfigItem` and all the resolved content.
monai/bundle/reference_resolver.py:65
↓ 6 callersFunctionresolves_modes
Automatically adjust the resampling interpolation mode and padding mode, so that they are compatible with the corresponding API of the `backe
monai/transforms/utils.py:2320
↓ 6 callersMethodrun
Execute training based on Ignite Engine. If call this function multiple times, it will continuously run from the previous state.
monai/engines/trainer.py:48
↓ 6 callersFunctionsafe_dtype_range
Utility to safely convert the input data to target dtype. Args: data: input data can be PyTorch Tensor, numpy array, list, dictionar
monai/utils/type_conversion.py:439
↓ 6 callersFunctionsave_net_with_metadata
Save the JIT object (script or trace produced object) `jit_obj` to the given file or stream with metadata included as a JSON file. The Torchs
monai/data/torchscript_utils.py:28
↓ 6 callersMethodset_data_array
Convert ``data_array`` into 'channel-last' numpy ndarray. Args: data_array: input data array with the channel dimension
monai/data/image_writer.py:396
↓ 6 callersMethodset_data_array
Convert ``data_array`` into 'channel-last' numpy ndarray. Args: data_array: input data array with the channel dimension
monai/data/image_writer.py:711
↓ 6 callersMethodset_random_state
(self, seed: int | None = None, state: np.random.RandomState | None = None)
monai/transforms/spatial/array.py:2541
↓ 6 callersMethodshutdown
Shut down the background thread for replacement.
monai/data/dataset.py:1205
↓ 6 callersFunctionspatial_gradient
Calculate gradients on single dimension of a tensor using central finite difference. It moves the tensor along the dimension to calculate the
monai/losses/deform.py:20
↓ 6 callersFunctiontest_is_quick
()
tests/test_utils.py:223
↓ 6 callersFunctiontest_shape_generator
(num_classes=1, num_objects=3, batch_size=1, height=5, width=5, rotation=0.0, smoothing=False)
tests/utils/enums/test_hovernet_loss.py:48
↓ 6 callersFunctionunsqueeze_left
Prepend 1-sized dimensions to `arr` to create a result with `ndim` dimensions.
monai/utils/misc.py:925
↓ 6 callersMethodupdate_cache
Update cache items for current epoch, need to call this function before every epoch. If the cache has been shutdown before, need to r
monai/data/dataset.py:1179
↓ 6 callersFunctionwhere
Note that `torch.where` may convert y.dtype to x.dtype.
monai/transforms/utils_pytorch_numpy_unification.py:139
↓ 6 callersFunctionwrap_module
Generic function generator to replace base_t module with dest_t wrapper. Args: base_t : module type to replace dest_t : desti
monai/networks/utils.py:1314
↓ 6 callersMethodwrite
Create a PIL image object from ``self.create_backend_obj(self.obj, ...)`` and call ``save``. Args: filename: filename or
monai/data/image_writer.py:759
↓ 6 callersFunctionzero_module
Zero out the parameters of a module and return it.
monai/networks/nets/diffusion_model_unet.py:51
↓ 5 callersMethod__init__
Args: in_channels: dimension of input channels. out_channels: dimension of output channels. patch_size: s
monai/networks/nets/swin_unetr.py:65
↓ 5 callersMethod__init__
( self, spatial_dims: int = 3, in_channels: int = 1, out_channels: int = 1,
monai/networks/nets/vnet.py:240
↓ 5 callersMethod__init__
( self, spatial_dims: int, in_channels: int, channels: Sequence[int],
monai/networks/nets/autoencoderkl.py:165
↓ 5 callersMethod__init__
Args: spatial_dims: number of spatial dimensions, could be 1, 2, or 3. in_channels: number of input channels.
monai/networks/blocks/squeeze_and_excitation.py:142
↓ 5 callersMethod_add_config_files
(self, config_files)
monai/fl/client/monai_algo.py:292
↓ 5 callersFunction_add_ngc_prefix
(name: str, prefix: str = "monai_")
monai/bundle/scripts.py:217
↓ 5 callersFunction_convert_tensor
(tensor: Any, **kwargs: Any)
monai/utils/type_conversion.py:144
↓ 5 callersFunction_filter
()
monai/optimizers/utils.py:81
↓ 5 callersMethod_find_closest_level
Find the level corresponding to the value of the quantity in the list of values at each level. Args: name: the name of the request
monai/data/wsi_reader.py:147
↓ 5 callersFunction_get_data
(obj, key)
monai/transforms/utils.py:1938
↓ 5 callersMethod_get_size
(self, sample: dict)
monai/data/wsi_datasets.py:135
↓ 5 callersFunctionbox_area
This function computes the area (2D) or volume (3D) of each box. Half precision is not recommended for this function as it may cause overflow
monai/data/box_utils.py:740
↓ 5 callersFunctioncalibration_binning
Compute calibration bins for predicted probabilities and ground truth labels. This function implements hard binning for calibration analysis
monai/metrics/calibration.py:26
↓ 5 callersFunctioncompute_generalized_dice
Computes the Generalized Dice Score and returns a tensor with its per image values. Args: y_pred (torch.Tensor): Binarized segmentat
monai/metrics/generalized_dice.py:115
↓ 5 callersFunctioncompute_surface_dice
r""" This function computes the (Normalized) Surface Dice (NSD) between the two tensors `y_pred` (referred to as :math:`\hat{Y}`) and `y` (ref
monai/metrics/surface_dice.py:137
↓ 5 callersMethodconcat
(value)
tests/transforms/compose/test_compose.py:722
↓ 5 callersFunctionconvert_to_onnx
Utility to convert a model into ONNX model and optionally verify with ONNX or onnxruntime. See also: https://pytorch.org/docs/stable/onnx.htm
monai/networks/utils.py:661
↓ 5 callersMethodcreate_backend_obj
Create an ITK object from ``data_array``. This method assumes a 'channel-last' ``data_array``. Args: data_array: input d
monai/data/image_writer.py:479
↓ 5 callersFunctioncreate_expected_numpy_output
(input_datum, **kwargs)
tests/networks/layers/test_hilbert_transform.py:23
↓ 5 callersFunctioncreate_workflow
Specify `bundle workflow` to create monai bundle workflows. The workflow should be subclass of `BundleWorkflow` and be available to import.
monai/bundle/scripts.py:1921
← previousnext →301–400 of 7,906, ranked by callers