MCPcopy Index your code

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

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

↓ 3 callersMethod__init__
Args: spatial_dims: number of spatial dimensions, could be 1, 2 or 3. in_channels: number of input channels.
monai/networks/nets/segresnet_ds.py:75
↓ 3 callersMethod__init__
Mobile Inverted Residual Bottleneck Block. Args: spatial_dims: number of spatial dimensions. in_channels: nu
monai/networks/nets/efficientnet.py:77
↓ 3 callersMethod__init__
( self, spatial_dims: int, in_channels: int, out_channels: int, channe
monai/networks/nets/vqvae.py:306
↓ 3 callersMethod__init__
( self, block: type[ResNetBlock | ResNetBottleneck] | str, layers: list[int],
monai/networks/nets/resnet.py:217
↓ 3 callersMethod__init__
( self, in_channels: int, out_channels: int, expansion_ratio: int = 4,
monai/networks/blocks/mednext_block.py:46
↓ 3 callersMethod__init__
Args: inplanes: number of input channels. planes: number of output channels. ks: kernel size for one dime
monai/networks/blocks/fcn.py:32
↓ 3 callersMethod__init__
( self, spatial_dims: int, in_channels: int, out_channels: int, kernel
monai/networks/blocks/dynunet_block.py:200
↓ 3 callersMethod__init__
Args: in_channel: number of input channels. out_channel: number of output channels. kernel_size: kernel s
monai/networks/blocks/dints_block.py:229
↓ 3 callersMethod__init__
( self, keys: KeysCollection, ref_image: str, slice_only: bool = False,
monai/apps/deepgrow/transforms.py:816
↓ 3 callersMethod__init__
( self, transforms: Sequence[Callable] | Callable | None = None, weights: Sequence[flo
monai/transforms/compose.py:458
↓ 3 callersMethod__init__
( self, rand_size: Sequence[int], pad: int = 0, pad_val: float = 0, lo
monai/transforms/smooth_field/array.py:59
↓ 3 callersMethod__init__
Args: reduction: define the mode to reduce metrics, will only execute reduction on `not-nan` values, available r
monai/handlers/regression_metrics.py:26
↓ 3 callersMethod__init__
( self, spatial_dims: int, network_type: str = PerceptualNetworkType.alex, is_
monai/losses/perceptual.py:88
↓ 3 callersMethod__init__
(self, keys)
tests/integration/test_one_of.py:110
↓ 3 callersMethod_batch_sampler
Generate batch of patches and locations Args: patches: a tensor or list of tensors Yields: A batch of patche
monai/inferers/inferer.py:193
↓ 3 callersFunction_calculate
(y_pred: torch.Tensor, y: torch.Tensor)
monai/metrics/average_precision.py:86
↓ 3 callersFunction_calculate
(y_pred: torch.Tensor, y: torch.Tensor)
monai/metrics/rocauc.py:75
↓ 3 callersMethod_calculate_axis_loss
Calculate perceptual loss in one of the axis used in the 2.5D approach. After the slices of one spatial axis is transformed into diff
monai/losses/perceptual.py:160
↓ 3 callersFunction_calculate_output_image_size
Calculates the output image size when using _make_same_padder with a stride. Required for static padding. Args: input_image_size
monai/networks/nets/efficientnet.py:919
↓ 3 callersMethod_calculate_pad_size
(self, spatial_shape, spatial_ndim, patch_size, offset, overlap)
monai/inferers/splitter.py:172
↓ 3 callersMethod_compute_data_idx
Update the replacement data position in the total data.
monai/data/dataset.py:1121
↓ 3 callersMethod_compute_mpp_target_res
Computes the target dimensions for resizing a whole slide image to match a user-specified resolution in microns per pixel (MPP).
monai/data/wsi_reader.py:435
↓ 3 callersMethod_compute_mpp_tolerances
Determines if user-provided MPP values are within a specified tolerance of the closest level's MPP and checks if the closest level ha
monai/data/wsi_reader.py:461
↓ 3 callersMethod_compute_tensor
Computation logic for `y_pred` and `y` of an iteration, the data should be "batch-first" Tensors. A subclass should implement its own
monai/metrics/metric.py:116
↓ 3 callersMethod_create_new_cache
(self, data, data_hashfile, meta_hash_file_name)
monai/data/dataset.py:1686
↓ 3 callersFunction_export
Export a model defined in the parser to a new one specified by the converter. Args: converter: a callable object that takes a torch.
monai/bundle/scripts.py:1259
↓ 3 callersMethod_generate_patches
yield patches optionally post-processed by transform. Args: src: a iterable of image patches. apply_args: ot
monai/data/grid_dataset.py:321
↓ 3 callersMethod_get_affine
Get the affine matrix of the image, it can be used to correct spacing, orientation or execute spatial transforms. Args:
monai/data/image_reader.py:1158
↓ 3 callersFunction_get_all_bundles_info
( repo: str = "Project-MONAI/model-zoo", tag: str = "dev", auth_token: str | None = None )
monai/bundle/scripts.py:771
↓ 3 callersFunction_get_fake_input_shape
Get a fake input shape e.g. [N, C, H, W] or [N, C, H, W, D], whose batch size is 1, from the given parser. Args: parser: a ConfigPar
monai/bundle/scripts.py:1145
↓ 3 callersMethod_get_level
(self, sample: dict)
monai/data/wsi_datasets.py:130
↓ 3 callersMethod_get_str
(prefix: str | None, suffix: str)
monai/utils/enums.py:380
↓ 3 callersMethod_get_valid_shape_parameters
( self, spatial_shape: Sequence[int] )
monai/inferers/splitter.py:194
↓ 3 callersFunction_get_window_idx
Get the window index.
monai/apps/vista3d/inferer.py:158
↓ 3 callersMethod_get_wsi_object
(self, sample: dict)
monai/data/wsi_datasets.py:114
↓ 3 callersMethod_global_mean
Compute the global mean of a masked tensor. This computes the mean over all elements, where values outside the mask are zero
monai/losses/aucm_loss.py:163
↓ 3 callersFunction_hsic
Unbiased linear HSIC estimator.
monai/metrics/embedding_collapse.py:395
↓ 3 callersMethod_init_trace_threadlocal
Create a `_tracing` instance member to store the thread-local tracing state value.
monai/transforms/inverse.py:74
↓ 3 callersFunction_inverse_one
Invert a single transform, delegating directly to nested ``Compose`` objects. When ``t`` is a ``Compose`` instance its own ``inverse()`` is calle
monai/transforms/compose.py:40
↓ 3 callersMethod_load_meta_cache
(self, meta_hash_file_name)
monai/data/dataset.py:1718
↓ 3 callersFunction_load_state_dict
This function is used to load pretrained models. Adapted from PyTorch Hub 2D version: https://pytorch.org/vision/stable/models.html#id16.
monai/networks/nets/densenet.py:259
↓ 3 callersMethod_log_params
(self, params: dict[str, Any])
monai/handlers/mlflow_handler.py:294
↓ 3 callersMethod_new_to_old_sd
Convert new-style state dict keys to legacy naming conventions. Args: new_sd: State dict with current key naming. inc
tests/networks/nets/test_autoencoderkl.py:342
↓ 3 callersFunction_np_pad
(img: NdarrayTensor, pad_width: list[tuple[int, int]], mode: str, **kwargs)
monai/transforms/croppad/functional.py:45
↓ 3 callersFunction_ntuple
(n)
monai/networks/blocks/pos_embed_utils.py:24
↓ 3 callersMethod_pre_transform
Process the data from original state up to the first random element. Args: item_transformed: The data to be transformed
monai/data/dataset.py:333
↓ 3 callersMethod_put_result
Add a ProfileResult object to the queue.
monai/utils/profiling.py:235
↓ 3 callersFunction_remove_ngc_prefix
(name: str, prefix: str = "monai_")
monai/bundle/scripts.py:223
↓ 3 callersFunction_replace_modules
Helper function for :py:class:`monai.networks.utils.replace_modules`.
monai/networks/utils.py:1093
↓ 3 callersMethod_resize_to_mpp_res
Resizes the whole slide image to the specified resolution in microns per pixel (mpp). Args: wsi: whole slide image objec
monai/data/wsi_reader.py:992
↓ 3 callersMethod_resize_to_mpp_res
Resizes the whole slide image to the specified resolution in microns per pixel (mpp). Args: wsi: whole slide image objec
monai/data/wsi_reader.py:1264
↓ 3 callersMethod_resize_to_mpp_res
Resizes the whole slide image to the specified resolution in microns per pixel (mpp). Args: wsi: whole slide image objec
monai/data/wsi_reader.py:1542
↓ 3 callersFunction_resnet_fpn_extractor
Same code as https://github.com/pytorch/vision/blob/release/0.12/torchvision/models/detection/backbone_utils.py Except that ``in_channels_sta
monai/networks/blocks/backbone_fpn_utils.py:138
↓ 3 callersMethod_run_expr
Evaluate the expression or expression list given by `id`. The resolved values from the evaluations are not stored, allowing this to b
monai/bundle/workflows.py:521
↓ 3 callersFunction_safe_dtype_range
(data, dtype)
monai/utils/type_conversion.py:450
↓ 3 callersMethod_separate_heads
(self, x: torch.Tensor, num_heads: int)
monai/networks/nets/vista3d.py:825
↓ 3 callersMethod_test_inferer
(self, inferer)
tests/bundle/test_bundle_workflow.py:60
↓ 3 callersMethodaggregate
Execute reduction logic for the output of `compute_generalized_dice`. Returns: torch.Tensor: Aggregated metric value.
monai/metrics/generalized_dice.py:95
↓ 3 callersMethodaggregate
Typically `y_pred` and `y` are stored in the cumulative buffers at each iteration, This function reads the buffers and computes the a
monai/metrics/rocauc.py:57
↓ 3 callersFunctionaniso_kernel
A helper function to compute kernel_size, padding and stride for the given scale Args: scale: scale from a current scale level
monai/networks/nets/segresnet_ds.py:57
↓ 3 callersFunctionany_np_pt
`np.any` with equivalent implementation for torch. For pytorch, convert to boolean for compatibility with older versions. Args: x: i
monai/transforms/utils_pytorch_numpy_unification.py:271
↓ 3 callersMethodappend
Append with a new value, and an optional count. Any data type is supported that is convertable with torch.as_tensor() e.g. number
monai/metrics/cumulative_average.py:107
↓ 3 callersMethodapply
(self, data: torch.Tensor)
monai/transforms/regularization/array.py:74
↓ 3 callersMethodas_dict
Get the object as a dictionary for backwards compatibility. This method does not make a deep copy of the objects. Args:
monai/data/meta_tensor.py:411
↓ 3 callersMethodattach
(self, engine: Engine)
monai/handlers/logfile_handler.py:65
↓ 3 callersFunctionbox_centers
Compute center points of boxes Args: boxes: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``Stan
monai/data/box_utils.py:634
↓ 3 callersFunctionbox_pair_giou
Compute the generalized intersection over union (GIoU) of a pair of boxes. The two inputs should have the same shape and the func return an (
monai/data/box_utils.py:927
↓ 3 callersMethodce
Compute CrossEntropy loss for the input logits and target. Will remove the channel dim according to PyTorch CrossEntropyLoss:
monai/losses/dice.py:802
↓ 3 callersMethodcheck
(self, tr: RandLambdad, input: dict, out: dict, expected: dict)
tests/transforms/utility/test_rand_lambdad.py:40
↓ 3 callersMethodcheck
(self, tr: RandLambda, img, img_orig_type, out, expected=None)
tests/transforms/utility/test_rand_lambda.py:40
↓ 3 callersFunctioncheck_branch
(branch, mode)
tests/networks/nets/test_hovernet.py:61
↓ 3 callersMethodcheck_decollate
(self, dataset)
tests/data/utils/test_decollate.py:116
↓ 3 callersMethodcheck_ids
(self, a, b, should_match)
tests/data/meta_tensor/test_to_from_meta_tensord.py:59
↓ 3 callersFunctioncheck_missing_files
Checks whether some files in the Decathlon datalist are missing. It would be helpful to check missing files before a heavy training run. Args
monai/data/decathlon_datalist.py:196
↓ 3 callersFunctioncheck_output
(out_block, mode)
tests/networks/nets/test_hovernet.py:89
↓ 3 callersFunctioncompare_2d
(is_ref=True, device=None, reverse_indexing=False)
tests/integration/test_integration_stn.py:77
↓ 3 callersFunctioncomplex_abs
Compute the absolute value of a complex array. Args: x: Input array/tensor with 2 channels in the last dimension representing real a
monai/apps/reconstruction/complex_utils.py:117
↓ 3 callersFunctioncomplex_mul_t
Compute complex-valued multiplication. Supports Ndim inputs with last dim equal to 2 (real/imaginary channels) Args: x: Input tensor
monai/apps/reconstruction/complex_utils.py:138
↓ 3 callersFunctioncompute_confusion_matrix_metric
This function is used to compute confusion matrix related metric. Args: metric_name: [``"sensitivity"``, ``"specificity"``, ``"preci
monai/metrics/confusion_matrix.py:179
↓ 3 callersFunctioncompute_iou
Computes Intersection over Union (IoU) score metric from a batch of predictions. Args: y_pred: input data to compute, typical segmentatio
monai/metrics/meaniou.py:105
↓ 3 callersFunctioncompute_mean_iou
Compute mean IoU from confusion matrix values. Args: confusion_matrix: tensor with shape (..., 4) where the last dimension contains
monai/metrics/panoptic_quality.py:315
↓ 3 callersMethodcompute_slices
Compute the crop slices based on specified `center & size` or `start & end` or `slices`. Args: roi_center: voxel coordin
monai/transforms/croppad/array.py:362
↓ 3 callersMethodcompute_slices
(self, spatial_size: Sequence[int])
monai/transforms/croppad/array.py:513
↓ 3 callersFunctioncompute_ssim_and_cs
Function to compute the Structural Similarity Index Measure (SSIM) and Contrast Sensitivity (CS) for a batch of images. Args: y_
monai/metrics/regression.py:419
↓ 3 callersFunctioncompute_tp_fp_fn
Args: input: the shape should be BNH[WD], where N is the number of classes. target: the shape should be BNH[WD] or B1H[WD], where
monai/losses/utils.py:18
↓ 3 callersMethodconstant_occlusion
Occlude with a constant occlusion. Multiplicative is zero, additive is constant value.
monai/visualize/occlusion_sensitivity.py:123
↓ 3 callersFunctionconvert_applied_interp_mode
Recursively change the interpolation mode in the applied operation stacks, default to "nearest". See also: :py:class:`monai.transform.invers
monai/transforms/utils.py:1769
↓ 3 callersFunctionconvert_pad_mode
Utility to convert padding mode between numpy array and PyTorch Tensor. Args: dst: target data to convert padding mode for, should b
monai/transforms/utils.py:2054
↓ 3 callersFunctionconvert_points_to_disc
Convert a 3D point coordinates into image mask. The returned mask has the same spatial size as `image_size` while the batch dimension is the
monai/transforms/utils.py:1315
↓ 3 callersMethodconvert_to_channel_last
Rearrange the data array axes to make the `channel_dim`-th dim the last dimension and ensure there are ``spatial_ndim`` number of spa
monai/data/image_writer.py:284
↓ 3 callersFunctionconvert_to_tensor_complex
Convert complex-valued data to a 2-channel PyTorch tensor. The real and imaginary parts are stacked along the last dimension. This functi
monai/apps/reconstruction/complex_utils.py:27
↓ 3 callersFunctionconvert_to_torchscript
Utility to convert a model into TorchScript model and save to file, with optional input / output data verification. Args: model:
monai/networks/utils.py:796
↓ 3 callersFunctioncorrect_nifti_header_if_necessary
Check nifti object header's format, update the header if needed. In the updated image pixdim matches the affine. Args: img_nii:
monai/data/utils.py:738
↓ 3 callersFunctioncreate_control_grid
control grid with two additional point in each direction
monai/transforms/utils.py:837
↓ 3 callersFunctioncreate_dataset
Utility to pre-process and create dataset list for Deepgrow training over on existing one. The input data list is normally a list of images a
monai/apps/deepgrow/dataset.py:25
↓ 3 callersFunctioncreate_semantic_data
To create semantic and image mock inputs for the network. Args: shape: input shape semantic_regions: number of semantic regio
tests/networks/nets/test_spade_vaegan.py:33
↓ 3 callersFunctioncreate_transform
(temp_dir, mapping_file_path, savepath_in_metadict=True)
tests/data/test_mapping_file.py:38
↓ 3 callersMethodcrop_test_combine_ops
(self, funcs, input_shape)
tests/croppers.py:137
↓ 3 callersMethoddecode
Based on a latent space sample, forwards it through the Decoder. Args: z: Bx[Z_CHANNELS]x[LATENT SPACE SHAPE] R
monai/networks/nets/autoencoderkl.py:644
↓ 3 callersFunctiondefault_prepare_batch
Default function to prepare the data for current iteration. The input `batchdata` is either a single tensor, a pair of tensors, or a diction
monai/engines/utils.py:100
← previousnext →601–700 of 7,906, ranked by callers