MCPcopy Create free account

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

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

↓ 2 callersFunctioncomplex_abs_t
Compute the absolute value of a complex tensor. Args: x: Input tensor with 2 channels in the last dimension representing real and im
monai/apps/reconstruction/complex_utils.py:102
↓ 2 callersFunctioncomplex_conj_t
Compute complex conjugate of a tensor. Supports Ndim inputs with last dim equal to 2 (real/imaginary channels) Args: x: Input tensor
monai/apps/reconstruction/complex_utils.py:192
↓ 2 callersFunctioncomplex_normalize
Performs layer mean-std normalization for complex data. Normalization is done for each batch member along each part (part refers to real and
monai/apps/reconstruction/networks/nets/utils.py:129
↓ 2 callersFunctioncompute_average_precision
Computes Average Precision (AP). AP is a useful metric to evaluate a classifier when the classes are imbalanced. It summarizes a Precision-Recall
monai/metrics/average_precision.py:116
↓ 2 callersMethodcompute_bounding_box
Compute the start points and end points of bounding box to crop. And adjust bounding box coords to be divisible by `k`.
monai/transforms/croppad/array.py:865
↓ 2 callersFunctioncompute_capabilities_after
Compute whether the current system GPU CUDA compute capability is after or equal to the specified version. The current system GPU CUDA comput
monai/utils/module.py:646
↓ 2 callersFunctioncompute_dice
Computes Dice score metric for a batch of predictions. This performs the same computation as :py:class:`monai.metrics.DiceMetric`, which is p
monai/metrics/meandice.py:196
↓ 2 callersFunctioncompute_fp_tp_probs
This function is modified from the official evaluation code of `CAMELYON 16 Challenge <https://camelyon16.grand-challenge.org/>`_, and used t
monai/metrics/froc.py:78
↓ 2 callersFunctioncompute_fp_tp_probs_nd
This function is modified from the official evaluation code of `CAMELYON 16 Challenge <https://camelyon16.grand-challenge.org/>`_, and used t
monai/metrics/froc.py:22
↓ 2 callersFunctioncompute_froc_curve_data
This function is modified from the official evaluation code of `CAMELYON 16 Challenge <https://camelyon16.grand-challenge.org/>`_, and used t
monai/metrics/froc.py:122
↓ 2 callersFunctioncompute_froc_score
This function is modified from the official evaluation code of `CAMELYON 16 Challenge <https://camelyon16.grand-challenge.org/>`_, and used t
monai/metrics/froc.py:158
↓ 2 callersFunctioncompute_importance_map
Get importance map for different weight modes. Args: patch_size: Size of the required importance map. This should be either H, W [,D].
monai/data/utils.py:1059
↓ 2 callersFunctioncompute_mask
Computing region masks based on: "Liu et al., Swin Transformer: Hierarchical Vision Transformer using Shifted Windows <https://arxiv.org/abs/2
monai/networks/nets/swin_unetr.py:797
↓ 2 callersMethodcompute_pad_width
dynamically compute the pad width according to the spatial shape. the output is the amount of padding for all dimensions including th
monai/transforms/croppad/array.py:121
↓ 2 callersFunctioncompute_panoptic_quality
Computes Panoptic Quality (PQ). If specifying `metric_name` to "SQ" or "RQ", Segmentation Quality (SQ) or Recognition Quality (RQ) will be returne
monai/metrics/panoptic_quality.py:171
↓ 2 callersFunctioncompute_roc_auc
Computes Area Under the Receiver Operating Characteristic Curve (ROC AUC). Referring to: `sklearn.metrics.roc_auc_score <https://scikit-learn.org/
monai/metrics/rocauc.py:112
↓ 2 callersMethodconcata
(value)
tests/transforms/compose/test_compose.py:738
↓ 2 callersMethodconcatd
(value)
tests/transforms/compose/test_compose.py:730
↓ 2 callersMethodconnected_components_combine
Combine auto results with point click response. The auto results have shape [B, 1, H, W, D] which means B foreground masks from a sin
monai/networks/nets/vista3d.py:217
↓ 2 callersFunctionconvert_box_to_mask
Convert box to int16 mask image, which has the same size with the input image. Args: boxes: bounding boxes, Nx4 or Nx6 torch tensor
monai/apps/detection/transforms/box_ops.py:195
↓ 2 callersFunctionconvert_global_weights
Helper function to convert global weights to local weights format
monai/fl/client/monai_algo.py:37
↓ 2 callersFunctionconvert_mask_to_box
Convert int16 mask image to box, which has the same size with the input image Args: boxes_mask: int16 array, sized (num_box, H, W).
monai/apps/detection/transforms/box_ops.py:275
↓ 2 callersFunctionconvert_tables_to_dicts
Utility to join pandas tables, select rows, columns and generate groups. Will return a list of dictionaries, every dictionary maps to a row o
monai/data/utils.py:1408
↓ 2 callersFunctioncopy_bn_param
(module2d, module3d)
monai/networks/nets/ahnet.py:541
↓ 2 callersMethodcopy_from
(self, net)
monai/networks/nets/ahnet.py:505
↓ 2 callersMethodcopy_items
returns a copy of the data. list and dict are shallow copied for efficiency purposes.
monai/data/meta_obj.py:108
↓ 2 callersFunctioncopy_to_device
Copy object or tuple/list/dictionary of objects to ``device``. Args: obj: object or tuple/list/dictionary of objects to move to ``de
monai/utils/misc.py:425
↓ 2 callersFunctioncreate_input_file
(temp_dir, name)
tests/data/test_mapping_file.py:30
↓ 2 callersFunctioncreate_spherical_seg_3d
Return a 3D image with a sphere inside. Voxel values will be 1 inside the sphere, and 0 elsewhere. Args: radius: radius of spher
tests/handlers/test_handler_hausdorff_distance.py:24
↓ 2 callersFunctioncreate_spherical_seg_3d
Return a 3D image with a sphere inside. Voxel values will be 1 inside the sphere, and 0 elsewhere. Args: radius: radius of spher
tests/handlers/test_handler_surface_distance.py:24
↓ 2 callersMethodcrop_pad
Crop and pad based on the bounding box.
monai/transforms/croppad/array.py:884
↓ 2 callersMethoddata_dir
()
monai/utils/misc.py:532
↓ 2 callersMethoddecode
(self, x: torch.Tensor, down_x: list[torch.Tensor])
monai/networks/nets/segresnet.py:169
↓ 2 callersMethoddecode_samples
(self, embedding_indices: torch.Tensor)
monai/networks/nets/vqvae.py:454
↓ 2 callersFunctiondetect_default_tf32
Detect if there is anything that may enable TF32 mode by default. If any, show a warning message.
monai/utils/tf32.py:53
↓ 2 callersFunctiondisable_ckpt_loaders
(parser: ConfigParser)
monai/fl/client/monai_algo.py:77
↓ 2 callersMethoddistance_field
Generate distance transform. Args: img (np.ndarray): input mask as NCHWD or NCHW. Returns: np.ndarray: Dista
monai/losses/hausdorff_loss.py:98
↓ 2 callersFunctiondivisible_pad_t
Pad input to feed into the network (torch script compatible) Args: x: input of shape (B,C,H,W) for 2D data or (B,C,H,W,D) for 3D dat
monai/apps/reconstruction/networks/nets/utils.py:169
↓ 2 callersFunctiondownload_tcia_series_instance
Download a dicom series from a public The Cancer Imaging Archive (TCIA) dataset. The downloaded compressed file will be stored in `download_d
monai/apps/tcia/utils.py:76
↓ 2 callersFunctiondtype_torch_to_numpy
Convert a torch dtype to its numpy equivalent.
monai/utils/type_conversion.py:57
↓ 2 callersMethodencode
(self, x: torch.Tensor)
monai/networks/nets/segresnet.py:156
↓ 2 callersMethodensemble
(self)
monai/apps/auto3dseg/ensemble_builder.py:552
↓ 2 callersFunctionequal_state_dict
assert equal state_dict (for the shared keys between st_1 and st_2).
tests/test_utils.py:886
↓ 2 callersMethodevaluate
Applies the callables to the data, and convert the numerics to list or Python numeric types (int/float). Args: d
monai/auto3dseg/operations.py:144
↓ 2 callersFunctionexport_bundle_algo_history
Save all the BundleAlgo in the history to algo_object.json in each individual folder. Args: history: a List of Bundle. Typically, th
monai/apps/auto3dseg/utils.py:75
↓ 2 callersMethodextract_affine
(self, data: Mapping[Hashable, torch.Tensor])
monai/apps/detection/transforms/dictionary.py:299
↓ 2 callersFunctionextreme_points_to_image
Please refer to :py:class:`monai.transforms.AddExtremePointsChannel` for the usage. Applies a gaussian filter to the extreme points image. T
monai/transforms/utils.py:1638
↓ 2 callersMethodfeature_map_size
Computes the actual feature map size given `nn_module` and the target_layer name. Args: input_size: shape of the input te
monai/visualize/class_activation_maps.py:181
↓ 2 callersFunctionfftn_centered_t
Pytorch-based fft 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:145
↓ 2 callersMethodfilename
Create a filename based on the input ``subject`` and ``idx``. The output filename is formed as: ``output_dir/[subject/]
monai/data/folder_layout.py:137
↓ 2 callersMethodfilename
(self, **kwargs)
tests/transforms/test_save_imaged.py:85
↓ 2 callersMethodfilter_count
Sort the patches based on the sum of their intensity, and just keep `self.num_patches` of them. Args: image_np: a numpy.
monai/transforms/spatial/array.py:3340
↓ 2 callersMethodfinalize
Finalize step after the running of bundle workflow.
monai/bundle/workflows.py:156
↓ 2 callersMethodfinalize
Perform final operations for merging patches and return the final merged output. Returns: The results of merged patches,
monai/inferers/merger.py:88
↓ 2 callersMethodfinalize
(self)
tests/nonconfig_workflow.py:114
↓ 2 callersMethodfind_best_configuration
Find the best model configurations. Args: plans: list of plan identifiers. Default: nnUNetPlans. configs: li
monai/apps/nnunet/nnunetv2_runner.py:779
↓ 2 callersMethodfind_guidance
(self, discrepancy)
monai/apps/deepgrow/transforms.py:294
↓ 2 callersFunctionflatten_dict
Flatten the nested dictionary to a flat dictionary.
monai/utils/misc.py:930
↓ 2 callersMethodflatten_meta_objs
Recursively flatten input and yield all instances of `MetaObj`. This means that for both `torch.add(a, b)`, `torch.stack([a, b])` (an
monai/data/meta_obj.py:89
↓ 2 callersFunctionfloor_divide
`np.floor_divide` with equivalent implementation for torch. As of pt1.8, use `torch.div(..., rounding_mode="floor")`, and before that, use `t
monai/transforms/utils_pytorch_numpy_unification.py:203
↓ 2 callersMethodforward
Args: x: input tensor (N, C, H, W, [D]). timesteps: timestep tensor (N,). controlnet_cond: controlnet con
monai/networks/nets/controlnet.py:354
↓ 2 callersMethodforward
(self, x: torch.Tensor, context: torch.Tensor | None = None)
monai/networks/nets/transformer.py:106
↓ 2 callersMethodforward
(self, x: torch.Tensor)
monai/networks/nets/hovernet.py:582
↓ 2 callersMethodforward
Forward pass of the MedNeXtBlock. Args: x (torch.Tensor): Input tensor. Returns: torch.Tensor: Outp
monai/networks/blocks/mednext_block.py:101
↓ 2 callersMethodforward
( self, x: torch.Tensor, timesteps: torch.Tensor, controlnet_cond: torch.Tenso
monai/apps/generation/maisi/networks/controlnet_maisi.py:97
↓ 2 callersMethodforward
Args: input: the shape should be BNH[WD]. target: the shape should be BNH[WD]. Raises: ValueErro
monai/losses/tversky.py:105
↓ 2 callersMethodforward
Args: pred: the shape should be BNH[WD]. target: the shape should be BNH[WD]. Raises: ValueError:
monai/losses/image_dissimilarity.py:129
↓ 2 callersMethodforward
Compute the logarithm of the Hausdorff Distance Transform Loss. Args: input (torch.Tensor): The shape should be BNHW[D],
monai/losses/hausdorff_loss.py:228
↓ 2 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/mcc_loss.py:110
↓ 2 callersMethodforward
(self, x: torch.Tensor)
tests/apps/pathology/test_prepare_batch_hovernet.py:33
↓ 2 callersFunctionfreeze_layers
A utility function to help freeze specific layers. Args: model: a source PyTorch model to freeze layer. freeze_vars: a regul
monai/networks/utils.py:1192
↓ 2 callersMethodfrom_string
Get a BlockArgs object from a string notation of arguments. Args: block_string (str): A string notation of arguments.
monai/networks/nets/efficientnet.py:960
↓ 2 callersMethodgen_mtx
Generate elements needed in decoding and topology. - `transfer_mtx`: feasible path activation matrix (denoted as T) given a node
monai/networks/nets/dints.py:799
↓ 2 callersFunctiongenerate_param_groups
Utility function to generate parameter groups with different LR values for optimizer. The output parameter groups have the same order as `lay
monai/optimizers/utils.py:23
↓ 2 callersFunctionget_2d_slice
If image is 3d, get the central slice. If is already 2d, return as-is. If image is label, set 0 to np.nan.
monai/transforms/utils_create_transform_ims.py:280
↓ 2 callersFunctionget_alpha
(img)
tests/visualize/utils/test_blend_images.py:30
↓ 2 callersFunctionget_apply_param
(init_param=None, call_param=None, params=apply_transforms_kwargs)
tests/lazy_transforms_utils.py:24
↓ 2 callersMethodget_available_codecs
Try different codecs, see which are available. Returns a dictionary with of available codecs with codecs as keys and file extensions as values
monai/data/video_dataset.py:168
↓ 2 callersFunctionget_binary_kernel
Create a binary kernel to extract the patches. The window size HxWxD will create a (H*W*D)xHxWxD kernel.
monai/networks/layers/simplelayers.py:430
↓ 2 callersMethodget_component_module_name
Get the full module name of the class or function with specified ``name``. If target component name exists in multiple packages or mo
monai/bundle/config_item.py:96
↓ 2 callersFunctionget_conv_layer
( spatial_dims: int, in_channels: int, out_channels: int, kernel_size: Sequence[int] | int = 3 )
monai/networks/blocks/localnet_block.py:48
↓ 2 callersFunctionget_data
(ndim)
tests/transforms/croppad/test_rand_weighted_crop.py:26
↓ 2 callersFunctionget_data
(ndim)
tests/transforms/croppad/test_rand_weighted_cropd.py:25
↓ 2 callersMethodget_data
Extract data array and metadata from the loaded data and return them. This function returns two objects, first is numpy array of imag
monai/apps/reconstruction/fastmri_reader.py:78
↓ 2 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:1401
↓ 2 callersMethodget_data
Extract data array and metadata from loaded image and return them. This function must return two objects, the first is a numpy array
monai/data/image_reader.py:1522
↓ 2 callersMethodget_data
(im_shape, im_type)
tests/transforms/test_rand_k_space_spike_noised.py:41
↓ 2 callersMethodget_data
(im_shape, im_type)
tests/transforms/test_k_space_spike_noise.py:43
↓ 2 callersMethodget_downsample_ratio
Returns the down-sampling ratio of the whole slide image at a given level. Args: wsi: a whole slide image object loaded
monai/data/wsi_reader.py:798
↓ 2 callersMethodget_downsample_ratio
Returns the down-sampling ratio of the whole slide image at a given level. Args: wsi: a whole slide image object loaded
monai/data/wsi_reader.py:1078
↓ 2 callersFunctionget_dtype_bound_value
Get dtype bound value Args: dtype: dtype to get bound value Returns: (bound_min_value, bound_max_value)
monai/utils/type_conversion.py:420
↓ 2 callersFunctionget_efficientnet_image_size
Get the input image size for a given efficientnet model. Args: model_name: name of model to initialize, can be from [efficientnet-b0
monai/networks/nets/efficientnet.py:719
↓ 2 callersFunctionget_expected_model_shape
(model_name)
tests/networks/nets/test_efficientnet.py:55
↓ 2 callersFunctionget_filename_from_url
Get the filename from the URL link.
monai/apps/utils.py:358
↓ 2 callersFunctionget_foreground_label
Get foreground image pixel values and mask out the non-labeled area. Args image: ndarray image to segment. label: ndarray th
monai/auto3dseg/utils.py:89
↓ 2 callersMethodget_grad
( self, x: torch.Tensor, index: torch.Tensor | int | None, retain_graph: bool = True, **kwargs: Any
monai/visualize/gradient_based.py:89
↓ 2 callersMethodget_id
Get the ID name of current config item, useful to identify config items during parsing.
monai/bundle/config_item.py:135
↓ 2 callersMethodget_identity_grid
Return a cached or new identity grid depends on the availability. Args: spatial_size: non-dynamic spatial size
monai/transforms/spatial/array.py:2521
↓ 2 callersMethodget_iou_thresholds
Return IoU thresholds needed for this metric in an numpy array Returns: Sequence[float]: IoU thresholds [M], M is the nu
monai/apps/detection/metrics/coco.py:190
↓ 2 callersMethodget_item
Get the ``ConfigItem`` by id. If ``resolve=True``, the returned item will be resolved, that is, all the reference strings ar
monai/bundle/reference_resolver.py:89
← previousnext →1,001–1,100 of 7,906, ranked by callers