MCPcopy Index your code

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

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

↓ 4 callersMethodconvert_data_type
(im_type, d, keys=("img", "image", "label"))
tests/transforms/test_rand_crop_by_pos_neg_labeld.py:111
↓ 4 callersFunctionconvert_to_contiguous
Check and ensure the numpy array or PyTorch Tensor in data to be contiguous in memory. Args: data: input data to convert, will recur
monai/transforms/utils.py:2078
↓ 4 callersFunctioncorrect_crop_centers
Utility to correct the crop center if the crop size and centers are not compatible with the image size. Args: centers: pre-computed
monai/transforms/utils.py:596
↓ 4 callersFunctioncreate_mednext
Factory method to create MedNeXt variants. Args: variant (str): The MedNeXt variant to create ('S', 'B', 'M', or 'L'). spati
monai/networks/nets/mednext.py:269
↓ 4 callersMethodcrop_test_value
(self, input_param, input_arr, expected_array)
tests/croppers.py:69
↓ 4 callersMethoddecode
Based on a latent space sample, forwards it through the Decoder. Args: z: Bx[Z_CHANNELS]x[LATENT SPACE SHAPE]
monai/networks/nets/spade_autoencoderkl.py:475
↓ 4 callersMethoddecode_single
From a set of original boxes and encoded relative box offsets, Args: rel_codes: encoded boxes, Nx(4*num_box_reg) or Nx(6
monai/apps/detection/utils/box_coder.py:198
↓ 4 callersMethoddouble
(x)
tests/transforms/compose/test_compose.py:807
↓ 4 callersMethodencode_stage_2_inputs
(self, x: torch.Tensor)
monai/networks/nets/vqvae.py:463
↓ 4 callersFunctionengine_apply_transform
Apply transform on `batch` and `output`. If `batch` and `output` are dictionaries, temporarily combine them for the transform, otherwise,
monai/engines/utils.py:325
↓ 4 callersFunctionensure_dict_value_to_list_
An in-place function. We expect ``head_outputs`` to be Dict[str, List[Tensor]]. Yet if it is Dict[str, Tensor], this func converts it to Dict
monai/apps/detection/utils/predict_utils.py:20
↓ 4 callersMethodevaluate
Execute the current config content and return the result if it is expression, based on Python `eval()`. For more details: https://doc
monai/bundle/config_item.py:348
↓ 4 callersMethodexport_cache
Save the cache state as ``cache.yaml`` in the working directory
monai/apps/auto3dseg/auto_runner.py:385
↓ 4 callersFunctionfftshift
Similar to np.fft.fftshift but applies to PyTorch Tensors Args: x: input data (k-space or image) that can be 1) real-val
monai/networks/blocks/fft_utils_t.py:63
↓ 4 callersMethodfinalize
Finalize merging by dividing values by counts and return the merged tensor. Notes: To avoid creating a new tensor for th
monai/inferers/merger.py:151
↓ 4 callersMethodforward
Args: x: input tensor weight: weights for different operations.
monai/networks/nets/dints.py:305
↓ 4 callersMethodforward
(self, input, indices=None)
monai/networks/nets/quicknat.py:218
↓ 4 callersMethodforward
Returns a dict of losses during training, or a list predicted dict of boxes and labels during inference. Args: input_ima
monai/apps/detection/networks/retinanet_detector.py:466
↓ 4 callersMethodforward
Args: input: the shape should be BNH[WD], where N is the number of classes. target: the shape should be BNH[WD] or B1
monai/losses/dice.py:130
↓ 4 callersMethodforward
Args: input: the shape should be BNH[WD]. target: the shape should be BNH[WD]. mask: the shape should B1H
monai/losses/dice.py:288
↓ 4 callersMethodforward
Args: input: the shape should be BNH[WD]. target: the shape should be BNH[WD]. Raises: ValueErro
monai/losses/dice.py:393
↓ 4 callersFunctiongenerate_spatial_bounding_box
Generate the spatial bounding box of foreground in the image with start-end positions (inclusive). Users can define arbitrary function to sel
monai/transforms/utils.py:1086
↓ 4 callersFunctionget_bundle_info
Get all information (include "name" and "browser_download_url") of a bundle with the specified bundle name and version which is stored in the
monai/bundle/scripts.py:883
↓ 4 callersFunctionget_confusion_matrix
Compute confusion matrix. A tensor with the shape [BC4] will be returned. Where, the third dimension represents the number of true positive,
monai/metrics/confusion_matrix.py:134
↓ 4 callersFunctionget_conv_block
( spatial_dims: int, in_channels: int, out_channels: int, kernel_size: Sequence[int] | int = 3
monai/networks/blocks/localnet_block.py:25
↓ 4 callersFunctionget_conv_layer
(spatial_dim: int = 3, transpose: bool = False)
monai/networks/blocks/mednext_block.py:24
↓ 4 callersMethodget_data
(im_shape, input_type)
tests/transforms/test_gibbs_noised.py:44
↓ 4 callersMethodget_dataset
Generate dataset based on the specified fold indices in the cross validation group. Args: folds: index of folds for trai
monai/apps/datasets.py:724
↓ 4 callersMethodget_default_affine
(dtype=torch.float64)
monai/data/meta_tensor.py:346
↓ 4 callersMethodget_event
(self, event: str | Events)
monai/handlers/nvtx_handlers.py:87
↓ 4 callersMethodget_frame
Get next frame. For a file, this will be the next frame, whereas for a camera source, it will be the next available frame.
monai/data/video_dataset.py:140
↓ 4 callersFunctionget_images
Get image. If is dictionary, extract key. If is list, stack. If both dictionary and list, do both. Also return the image size as string to be used
monai/transforms/utils_create_transform_ims.py:370
↓ 4 callersFunctionget_largest_connected_component_mask
Gets the largest connected component mask of an image. Args: img: Image to get largest connected component from. Shape is (spatial_d
monai/transforms/utils.py:1151
↓ 4 callersMethodget_likelihood
Computes the log-likelihoods of the latent representations of the input. Args: inputs: input images, NxCxHxW[xD]
monai/inferers/inferer.py:1340
↓ 4 callersMethodget_likelihood
Computes the log-likelihoods of the latent representations of the input. Args: inputs: input images, NxCxHxW[xD]
monai/inferers/inferer.py:1931
↓ 4 callersFunctionget_mid_block
( spatial_dims: int, in_channels: int, temb_channels: int, norm_num_groups: int, norm_eps:
monai/networks/nets/diffusion_model_unet.py:1386
↓ 4 callersMethodget_obj_filename
Return the filename of the dumped algo object.
monai/apps/auto3dseg/hpo_gen.py:134
↓ 4 callersMethodget_prob_a
Get final path and child model probabilities from architecture weights `log_alpha_a`. This is used in forward pass, getting training
monai/networks/nets/dints.py:841
↓ 4 callersMethodget_result_from_inner_blocks
This is equivalent to self.inner_blocks[idx](x), but torchscript doesn't support this yet
monai/networks/blocks/feature_pyramid_network.py:206
↓ 4 callersMethodget_sequence_ordering
(self)
monai/utils/ordering.py:94
↓ 4 callersMethodget_size
Returns the size (height, width) of the whole slide image at a given level. Args: wsi: a whole slide image object loaded
monai/data/wsi_reader.py:634
↓ 4 callersMethodget_transformation_matrix
Get the most recently applied transformation matrix
monai/transforms/spatial/array.py:1957
↓ 4 callersFunctionget_window_size
Computing window size based on: "Liu et al., Swin Transformer: Hierarchical Vision Transformer using Shifted Windows <https://arxiv.org/abs/21
monai/networks/nets/swin_unetr.py:417
↓ 4 callersFunctionifftn_centered
Pytorch-based ifft for spatial_dims-dim signals. "centered" means this function automatically takes care of the required ifft and fft shifts.
monai/data/fft_utils.py:21
↓ 4 callersFunctionifftn_centered_t
Pytorch-based ifft for spatial_dims-dim signals. "centered" means this function automatically takes care of the required ifft and fft shifts.
monai/networks/blocks/fft_utils_t.py:101
↓ 4 callersFunctionifftshift
Similar to np.fft.ifftshift but applies to PyTorch Tensors Args: x: input data (k-space or image) that can be 1) real-va
monai/networks/blocks/fft_utils_t.py:82
↓ 4 callersMethodinverse
(self, data: Mapping[Hashable, torch.Tensor])
monai/apps/detection/transforms/dictionary.py:473
↓ 4 callersMethodis_affine_shaped
Check if the data is an affine matrix.
monai/transforms/lazy/utils.py:37
↓ 4 callersFunctionis_no_channel
Returns whether `val` indicates "no_channel", for MetaKeys.ORIGINAL_CHANNEL_DIM.
monai/data/utils.py:1564
↓ 4 callersFunctioniter_patch_position
Yield successive tuples of upper left corner of patches of size `patch_size` from an array of dimensions `image_size`. The iteration starts f
monai/data/utils.py:207
↓ 4 callersMethoditer_subconfigs
Iterate over the sub-configs of the input config, the output `sub_id` uses `cls.sep` to denote substructure. Args: id: i
monai/bundle/reference_resolver.py:247
↓ 4 callersMethoditk_affine_resample
(self, image, matrix, translation, center_of_rotation=None, reference_image=None)
tests/data/test_itk_torch_bridge.py:126
↓ 4 callersFunctionmap_binary_to_indices
Compute the foreground and background of input label data, return the indices after fattening. For example: ``label = np.array([[[0, 1, 1
monai/transforms/utils.py:446
↓ 4 callersFunctionmap_classes_to_indices
Filter out indices of every class of the input label data, return the indices after fattening. It can handle both One-Hot format label and Ar
monai/transforms/utils.py:482
↓ 4 callersFunctionmatshow3d
Create a 3D volume figure as a grid of images. Args: volume: 3D volume to display. data shape can be `BCHWD`, `CHWD` or `HWD`.
monai/visualize/utils.py:34
↓ 4 callersMethodmonai_affine_resample
(self, metatensor, affine_matrix)
tests/data/test_itk_torch_bridge.py:154
↓ 4 callersFunctionnonzero
`np.nonzero` with equivalent implementation for torch. Args: x: array/tensor. Returns: Index unravelled for given shape
monai/transforms/utils_pytorch_numpy_unification.py:189
↓ 4 callersFunctionnormalize_transform
Compute an affine matrix according to the input shape. The transform normalizes the homogeneous image coordinates to the range of `[-1, 1
monai/networks/utils.py:243
↓ 4 callersMethodnum_anchors_per_location
Return number of anchor shapes for each feature map.
monai/apps/detection/utils/anchor_utils.py:211
↓ 4 callersFunctionpickle_hashing
Args: item: data item to be hashed protocol: protocol version used for pickling, defaults to `pickle.HIGHEST_PROTOCO
monai/data/utils.py:1380
↓ 4 callersFunctionplus_or_dot
Return a + if we don't already have one, else return a .
versioneer.py:1428
↓ 4 callersFunctionplus_or_dot
Return a + if we don't already have one, else return a .
monai/_version.py:364
↓ 4 callersMethodpreprocess
Apply a set of preprocessing operations to the input data before the training. Args: overwrite_plans_name: [OPTIONAL] Yo
monai/apps/nnunet/nnunetv2_runner.py:385
↓ 4 callersMethodprofile_ctx
Creates a context to profile, placing a timing result onto the queue when it exits.
monai/utils/profiling.py:311
↓ 4 callersMethodproj_feat
(self, x)
monai/networks/nets/unetr.py:193
↓ 4 callersMethodpush_pending_operation
(self, t: Any)
monai/data/meta_obj.py:227
↓ 4 callersMethodquantize
(self, encodings: torch.Tensor)
monai/networks/nets/vqvae.py:438
↓ 4 callersFunctionquery_memory
Find best n idle devices and return a string of device ids using the `nvidia-smi` command.
tests/test_utils.py:839
↓ 4 callersMethodrandomize
(self, data: Any | None = None)
monai/apps/detection/transforms/dictionary.py:1366
↓ 4 callersMethodrandomize
(self, img_size: Sequence[int])
monai/transforms/croppad/dictionary.py:397
↓ 4 callersMethodreconstruct
Encodes and decodes an input image. Args: x: BxCx[SPATIAL DIMENSIONS] tensor. Returns: reconstructe
monai/networks/nets/autoencoderkl.py:630
↓ 4 callersMethodregister_class
Register a given class to the encoder dict. Please notice that input class must be a subclass of BaseEncoder.
monai/networks/nets/flexible_unet.py:45
↓ 4 callersFunctionreplace_modules_temp
Temporarily replace sub-module(s) in a parent module (context manager). See :py:class:`monai.networks.utils.replace_modules`.
monai/networks/utils.py:1169
↓ 4 callersFunctionreset_ops_id
find MetaTensors in list or dict `data` and (in-place) set ``TraceKeys.ID`` to ``Tracekeys.NONE``.
monai/transforms/utils.py:1805
↓ 4 callersFunctionresnet_fpn_feature_extractor
Constructs a feature extractor network with a ResNet-FPN backbone, used as feature_extractor in RetinaNet. Reference: `"Focal Loss for Dense
monai/apps/detection/networks/retinanet_network.py:357
↓ 4 callersMethodrun
(self)
versioneer.py:2003
↓ 4 callersMethodrun
Run the AutoRunner pipeline
monai/apps/auto3dseg/auto_runner.py:812
↓ 4 callersMethodrun
Run the bundle workflow, it can be a training, evaluation or inference. Before run, we add bundle root directory to Python search dir
monai/bundle/workflows.py:476
↓ 4 callersMethodrun_test
(self, data)
tests/metrics/test_cumulative_average.py:55
↓ 4 callersMethodset_data
Set the input data and delete all the out-dated cache content.
monai/data/dataset.py:615
↓ 4 callersMethodset_random_state
(self, seed: int | None = None, state: np.random.RandomState | None = None)
monai/apps/detection/transforms/dictionary.py:564
↓ 4 callersMethodset_random_state
( self, seed: int | None = None, state: np.random.RandomState | None = None )
monai/transforms/croppad/dictionary.py:1096
↓ 4 callersMethodset_random_state
(self, seed: int | None = None, state: np.random.RandomState | None = None)
monai/transforms/smooth_field/array.py:418
↓ 4 callersMethodset_training_params
Set the training params for all algos. Args: params: a dict that defines the overriding key-value pairs during training.
monai/apps/auto3dseg/auto_runner.py:520
↓ 4 callersMethodshift_fourier
Applies fourier transform and shifts the zero-frequency component to the center of the spectrum. Only the spatial dimensions get tran
monai/transforms/utils.py:1882
↓ 4 callersFunctionstack
`np.stack` with equivalent implementation for torch. Args: x: array/tensor. dim: dimension along which to perform the stack (refe
monai/transforms/utils_pytorch_numpy_unification.py:414
↓ 4 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/pndm.py:165
↓ 4 callersMethodstore
Store a given object with the given key name. Args: key: key of the data object to store. data_obj: data obj
monai/utils/state_cacher.py:82
↓ 4 callersFunctionstr2list
Convert a string to a list. Useful with argparse commandline arguments: parser.add_argument("--blocks", default=[1,2,3], type=str2list)
monai/utils/misc.py:494
↓ 4 callersMethodsummary
(self)
monai/fl/utils/exchange_object.py:94
↓ 4 callersMethodtest_init
(self, spatial_dims, size, expected)
tests/networks/layers/test_preset_filters.py:67
↓ 4 callersMethodtrain
Load the run function in the training script of each model. Training parameter is predefined by the algo_config.yaml file, which is p
monai/apps/auto3dseg/bundle_gen.py:279
↓ 4 callersFunctiontrain_mode
Set network(s) to train mode and then return to original state at the end. Args: nets: Input network(s) Examples .. code-b
monai/networks/utils.py:493
↓ 4 callersFunctiontrt_compile
Instruments model or submodule(s) with TrtCompiler and replaces its forward() with TRT hook. Note: TRT 10.3 is recommended for best performan
monai/networks/trt_compiler.py:612
↓ 4 callersFunctionunique
`torch.unique` with equivalent implementation for numpy. Args: x: array/tensor.
monai/transforms/utils_pytorch_numpy_unification.py:441
↓ 4 callersFunctionup
(x)
monai/visualize/visualizer.py:31
↓ 4 callersMethodupdate_config
Replace the content of `self.config` with new `config`. A typical usage is to modify the initial config content at runtime.
monai/bundle/config_item.py:142
↓ 3 callersMethod__call__
Args: img: channel first array, must have shape: (num_channels, H[, W, ..., ]) lazy: a flag to indicate whether this
monai/transforms/spatial/array.py:732
↓ 3 callersMethod__init__
Args: spatial_dims: number of spatial dimensions. in_chns: number of input channels. out_chns: number of
monai/networks/nets/basic_unet.py:63
↓ 3 callersMethod__init__
( self, spatial_dims: int, in_channels: int, out_channels: int, label_
monai/networks/nets/spade_network.py:360
← previousnext →501–600 of 7,906, ranked by callers