MCPcopy Create free account

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

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

↓ 1 callersFunctioncomplex_conj
Compute complex conjugate of an/a array/tensor. Supports Ndim inputs with last dim equal to 2 (real/imaginary channels) Args: x: Inp
monai/apps/reconstruction/complex_utils.py:208
↓ 1 callersFunctioncomplex_diff_abs_loss
First compute the difference in the complex domain, then get the absolute value and take the mse Args: x, y - B, 2, H, W real va
monai/losses/sure_loss.py:21
↓ 1 callersFunctioncomplex_mul
Compute complex-valued multiplication. Supports Ndim inputs with last dim equal to 2 (real/imaginary channels) Args: x: Input array/
monai/apps/reconstruction/complex_utils.py:158
↓ 1 callersMethodcompute
Compute COCO metrics Args: results_list (list[dict[int, dict[str, np.ndarray]]]): list with results per image (in list)
monai/apps/detection/metrics/coco.py:199
↓ 1 callersMethodcompute_anchor_matched_idxs
Compute the matched indices between anchors and ground truth (gt) boxes in targets. output[k][i] represents the matched gt index for
monai/apps/detection/networks/retinanet_detector.py:729
↓ 1 callersFunctioncompute_average_surface_distance
This function is used to compute the Average Surface Distance from `y_pred` to `y` under the default setting. In addition, if sets ``symm
monai/metrics/surface_distance.py:123
↓ 1 callersMethodcompute_box_loss
Compute box regression losses. Args: box_regression: box regression results, sized (B, sum(HWA), 2*self.spatial_dims)
monai/apps/detection/networks/retinanet_detector.py:831
↓ 1 callersMethodcompute_cc_dice
Compute per-component Dice for a single batch item. Args: y_pred (torch.Tensor): Predictions with shape (1, 2, D, H, W)
monai/metrics/meandice.py:315
↓ 1 callersMethodcompute_channel
Compute the dice metric for binary inputs which have only spatial dimensions. This method is called separately for each batch item an
monai/metrics/meandice.py:358
↓ 1 callersMethodcompute_cls_loss
Compute classification losses. Args: cls_logits: classification logits, sized (B, sum(HW(D)A), self.num_classes)
monai/apps/detection/networks/retinanet_detector.py:801
↓ 1 callersFunctioncompute_f_beta_score
(confusion_matrix: torch.Tensor, beta: float)
monai/metrics/f_beta_score.py:90
↓ 1 callersMethodcompute_fp_tp
Compute false positive and true positive probabilities for tumor detection, by comparing the model outputs with the prepared ground t
monai/apps/pathology/metrics/lesion_froc.py:130
↓ 1 callersFunctioncompute_frechet_distance
The Frechet distance between multivariate normal distributions.
monai/metrics/fid.py:89
↓ 1 callersFunctioncompute_hausdorff_distance
Compute the Hausdorff distance. Args: y_pred: input data to compute, typical segmentation model output. It must be one-h
monai/metrics/hausdorff_distance.py:132
↓ 1 callersFunctioncompute_isolated_tumor_cells
This method computes identifies Isolated Tumor Cells (ITC) and return their labels. Args: tumor_mask: the tumor mask. thresh
monai/apps/pathology/utils.py:45
↓ 1 callersMethodcompute_loss
Compute losses. Args: head_outputs_reshape: reshaped head_outputs. ``head_output_reshape[self.cls_key]`` is a Tensor
monai/apps/detection/networks/retinanet_detector.py:699
↓ 1 callersMethodcompute_map
Compute the actual feature map with input tensor `x`. Args: x: input to `nn_module`. class_idx: index of the
monai/visualize/class_activation_maps.py:194
↓ 1 callersMethodcompute_map
(self, x, class_idx=None, layer_idx=-1, **kwargs)
monai/visualize/class_activation_maps.py:290
↓ 1 callersMethodcompute_map
(self, x, class_idx=None, retain_graph=False, layer_idx=-1, **kwargs)
monai/visualize/class_activation_maps.py:361
↓ 1 callersFunctioncompute_mape_metric
Compute Mean Absolute Percentage Error. Args: y_pred: predicted values y: ground truth values epsilon: small value t
monai/metrics/regression.py:256
↓ 1 callersMethodcompute_matches
Compute matches Args: boxes: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``Standar
monai/apps/detection/utils/ATSS_matcher.py:145
↓ 1 callersMethodcompute_matches
Compute matches according to ATTS for a single image Adapted from (https://github.com/sfzhang15/ATSS/blob/79dfb28bd1/atss_cor
monai/apps/detection/utils/ATSS_matcher.py:199
↓ 1 callersFunctioncompute_mmd
Args: y: first sample (e.g., the reference image). Its shape is (B,C,W,H) for 2D data and (B,C,W,H,D) for 3D. y_pred: second samp
monai/metrics/mmd.py:43
↓ 1 callersFunctioncompute_ms_ssim
Args: y_pred: Predicted image. It must be a 2D or 3D batch-first tensor [B,C,H,W] or [B,C,H,W,D]. y: Reference image.
monai/metrics/regression.py:554
↓ 1 callersFunctioncompute_multi_instance_mask
This method computes the segmentation mask according to the binary tumor mask. Args: mask: the binary mask array threshold:
monai/apps/pathology/utils.py:26
↓ 1 callersMethodcompute_pad_width
dynamically compute the pad width according to the spatial shape. Args: spatial_shape: spatial shape of the original ima
monai/transforms/croppad/array.py:221
↓ 1 callersFunctioncompute_voronoi_regions_fast
Voronoi assignment to connected components (CPU, single EDT) without cc3d. Returns the ID of the nearest component for each voxel. Args:
monai/metrics/utils.py:480
↓ 1 callersFunctioncompute_weight_diff
(global_weights, local_var_dict)
monai/fl/client/monai_algo.py:56
↓ 1 callersMethodconfidence_estimation
Compute confidence map Args: img (NDArray): Processed image. seeds (NDArray): Seeds for the random walks framework. T
monai/data/ultrasound_confidence_map.py:294
↓ 1 callersMethodconfidence_laplacian
Compute 6-Connected Laplacian for confidence estimation problem Args: padded_index (NDArray): The index matrix of the image with
monai/data/ultrasound_confidence_map.py:195
↓ 1 callersFunctionconvert_box_to_points
Converts an axis-aligned bounding box to points. Args: mode: The mode specifying how to interpret the bounding box. bbox: Bo
monai/transforms/spatial/functional.py:658
↓ 1 callersMethodconvert_dataset
Convert and make a copy the dataset to meet the requirements of nnU-Net workflow.
monai/apps/nnunet/nnunetv2_runner.py:227
↓ 1 callersFunctionconvert_nnunet_to_monai_bundle
Convert nnUNet model checkpoints and configuration to MONAI bundle format. Parameters ---------- nnunet_config : dict Config
monai/apps/nnunet/nnunet_bundle.py:351
↓ 1 callersMethodconvert_point_label
Convert point label based on its class prompt. For special classes defined in special index, the positive/negative point label will b
monai/networks/nets/vista3d.py:120
↓ 1 callersFunctionconvert_points_to_box
Converts points to an axis-aligned bounding box. Args: points: Points representing the corners of the bounding box. Shape (N, 8, 3)
monai/transforms/spatial/functional.py:708
↓ 1 callersFunctionconvert_to_trt
Utility to export a model into a TensorRT engine-based TorchScript model with optional input / output data verification. There are two ways
monai/networks/utils.py:940
↓ 1 callersFunctioncopy_conv_param
(module2d, module3d)
monai/networks/nets/ahnet.py:536
↓ 1 callersFunctioncopypaste_arrays
Calculate the slices to copy a sliced area of array in `src_shape` into array in `dest_shape`. The area has dimensions `dims` (use 0 or None
monai/transforms/utils.py:284
↓ 1 callersMethodcorners_to_boxes
Convert the given box corners to the bounding boxes of the current mode. Args: corners: corners of boxes, 4-element or 6
monai/data/box_utils.py:119
↓ 1 callersMethodcreate_backend_obj
Create an Nifti1Image object from ``data_array``. This method assumes a 'channel-last' ``data_array``. Args: data_array:
monai/data/image_writer.py:641
↓ 1 callersMethodcreate_backend_obj
Create a PIL object from ``data_array``. Args: data_array: input data array. dtype: output data type.
monai/data/image_writer.py:822
↓ 1 callersFunctioncreate_cross_validation_datalist
Utility to create new Decathlon style datalist based on cross validation partition. Args: datalist: loaded list of dictionaries for
monai/data/decathlon_datalist.py:234
↓ 1 callersFunctioncreate_input_file
(temp_dir, name)
tests/integration/test_mapping_filed.py:33
↓ 1 callersMethodcreate_itk_affine_from_parameters
Creates an affine transformation for an ITK image based on the provided parameters. Args: image: The ITK image.
tests/data/test_itk_torch_bridge.py:76
↓ 1 callersFunctioncreate_new_data_copy
Create and organize a new copy of data to meet the requirements of nnU-Net V2 Args: test_key: key for test data in the data list .js
monai/apps/nnunet/utils.py:63
↓ 1 callersFunctioncreate_new_dataset_json
Create a new copy of dataset .json to meet the requirements of nnU-Net V2 Args: modality: image modality, could a string or a list o
monai/apps/nnunet/utils.py:137
↓ 1 callersMethodcreate_paired_events
Create pair of Ignite events from a event prefix name
monai/handlers/nvtx_handlers.py:79
↓ 1 callersFunctioncreate_sim_data
Create simulated data using create_test_image_3d. Args: dataroot: data directory path that hosts the "nii.gz" image files. s
tests/integration/test_auto3dseg_ensemble.py:77
↓ 1 callersFunctioncreate_sim_data
Create simulated data using create_test_image_3d. Args: dataroot: data directory path that hosts the "nii.gz" image files. s
tests/apps/test_auto3dseg_bundlegen.py:48
↓ 1 callersFunctioncreate_table_neighbour_code_to_contour_length
Returns an array mapping neighbourhood code to the contour length. Adapted from https://github.com/deepmind/surface-distance In 2D, each
monai/metrics/utils.py:839
↓ 1 callersFunctioncreate_table_neighbour_code_to_surface_area
Returns an array mapping neighbourhood code to the surface elements area. Adapted from https://github.com/deepmind/surface-distance Note
monai/metrics/utils.py:810
↓ 1 callersFunctioncrop_func
Functional implementation of cropping a MetaTensor. This function operates eagerly or lazily according to ``lazy`` (default ``False``).
monai/transforms/croppad/functional.py:217
↓ 1 callersMethodcrop_meshgrid
Crop the meshgrid so we only perform occlusion sensitivity on a subsection of the image.
monai/visualize/occlusion_sensitivity.py:228
↓ 1 callersFunctioncumsum
`np.cumsum` with equivalent implementation for torch. Args: a: input data to compute cumsum. axis: expected axis to compute
monai/transforms/utils_pytorch_numpy_unification.py:319
↓ 1 callersFunctiondamerau_levenshtein_distance
Calculates the Damerau–Levenshtein distance between two strings for spelling correction. https://en.wikipedia.org/wiki/Damerau–Levenshtein_di
monai/utils/module.py:145
↓ 1 callersMethoddata_from_keys
(keys)
tests/integration/test_one_of.py:256
↓ 1 callersMethoddata_from_keys
(keys)
tests/transforms/test_random_order.py:117
↓ 1 callersMethoddata_from_keys
(keys)
tests/transforms/compose/test_some_of.py:231
↓ 1 callersMethoddecode
Decode network log_alpha_a/log_alpha_c using dijkstra shortest path algorithm. `[node_a, arch_code_a, arch_code_c, arch_code_a_max]`
monai/networks/nets/dints.py:944
↓ 1 callersMethoddecode
(self, seg: torch.Tensor, z: torch.Tensor | None = None)
monai/networks/nets/spade_network.py:434
↓ 1 callersMethoddecode
From a set of original reference_boxes and encoded relative box offsets, Args: rel_codes: encoded boxes, Nx4 or Nx6 torc
monai/apps/detection/utils/box_coder.py:171
↓ 1 callersMethoddecode_forward
(self, z: torch.Tensor, use_sigmoid: bool = True)
monai/networks/nets/varautoencoder.py:136
↓ 1 callersMethoddecode_forward
(self, z: torch.Tensor, use_sigmoid: bool = True)
monai/networks/nets/fullyconnectednet.py:164
↓ 1 callersFunctiondense_patch_slices
Enumerate all slices defining ND patches of size `patch_size` from an `image_size` input image. Args: image_size: dimensions of imag
monai/data/utils.py:164
↓ 1 callersFunctiondilate
Dilate 2D/3D binary mask. Args: mask: input 2D/3D binary mask, [N,C,M,N] or [N,C,M,N,P] torch tensor or ndarray. filter_size
monai/transforms/utils_morphological_ops.py:58
↓ 1 callersFunctiondilate_t
Dilate 2D/3D binary mask with data type as torch tensor. Args: mask_t: input 2D/3D binary mask, [N,C,M,N] or [N,C,M,N,P] torch tenso
monai/transforms/utils_morphological_ops.py:153
↓ 1 callersMethoddisparity
(label, pred)
monai/apps/deepgrow/transforms.py:248
↓ 1 callersMethoddisparity
(label, pred)
monai/apps/deepedit/transforms.py:486
↓ 1 callersMethoddistributed_synchronization
TorchScript does not support torch.distributed.all_reduce. This function is a bypassing trick based on the example: https://pytorch.o
monai/networks/layers/vector_quantizer.py:147
↓ 1 callersFunctiondo_setup
Do main VCS-independent setup function for installing Versioneer.
versioneer.py:2076
↓ 1 callersFunctiondo_vcs_install
Git-specific installation logic for Versioneer. For Git, this means creating/changing .gitattributes to mark _version.py for export-subst key
versioneer.py:1321
↓ 1 callersMethoddoc_images
()
monai/utils/misc.py:541
↓ 1 callersMethoddump_csv
Save all results to a csv file.
monai/utils/profiling.py:390
↓ 1 callersMethodencode
(self, x: torch.Tensor)
monai/networks/nets/spade_network.py:428
↓ 1 callersFunctionencode_boxes
Encode a set of proposals with respect to some reference ground truth (gt) boxes. Args: gt_boxes: gt boxes, Nx4 or Nx6 torch tensor.
monai/apps/detection/utils/box_coder.py:64
↓ 1 callersMethodencode_forward
(self, x: torch.Tensor)
monai/networks/nets/varautoencoder.py:128
↓ 1 callersMethodencode_forward
(self, x: torch.Tensor)
monai/networks/nets/fullyconnectednet.py:157
↓ 1 callersFunctionequalize_hist
Utility to equalize input image based on the histogram. If `skimage` installed, will leverage `skimage.exposure.histogram`, otherwise, use
monai/transforms/utils.py:1840
↓ 1 callersFunctionerode_t
Erode 2D/3D binary mask with data type as torch tensor. Args: mask_t: input 2D/3D binary mask, [N,C,M,N] or [N,C,M,N,P] torch tensor
monai/transforms/utils_morphological_ops.py:130
↓ 1 callersMethodevaluate
Evaluate the detection performance of a model based on the model probability map output, the ground truth tumor mask, and their assoc
monai/apps/pathology/metrics/lesion_froc.py:159
↓ 1 callersMethodexclusion_map
(self, others, dtype, jitter_range, drop_rate)
monai/apps/nuclick/transforms.py:368
↓ 1 callersMethodextra_test_data
()
monai/utils/misc.py:561
↓ 1 callersMethodextract_fingerprints
Extracts the dataset fingerprint used for experiment planning. Args: fpe: [OPTIONAL] Name of the Dataset Fingerprint Ext
monai/apps/nnunet/nnunetv2_runner.py:311
↓ 1 callersFunctionfill_holes
Fill the holes in the provided image. The label 0 will be treated as background and the enclosed holes will be set to the neighboring class
monai/transforms/utils.py:1521
↓ 1 callersMethodfill_template_config
The configuration files defined when constructing this Algo instance might not have a complete training and validation pipelines. Som
monai/apps/auto3dseg/bundle_gen.py:155
↓ 1 callersMethodfilter
(self, rgb)
monai/apps/nuclick/transforms.py:221
↓ 1 callersMethodfilter_grays
(self, rgb, tolerance=15)
monai/apps/nuclick/transforms.py:246
↓ 1 callersMethodfilter_green_channel
( self, img_np, green_thresh=200, avoid_overmask=True, overmask_thresh=90, output_type="bool" )
monai/apps/nuclick/transforms.py:233
↓ 1 callersMethodfilter_remove_small_objects
(self, img_np, min_size=3000, avoid_overmask=True, overmask_thresh=95)
monai/apps/nuclick/transforms.py:260
↓ 1 callersMethodfilter_threshold
Filter the patches and their locations according to a threshold. Args: image_np: a numpy.ndarray or torch.Tensor represe
monai/transforms/spatial/array.py:3324
↓ 1 callersMethodfinalize
Finalize the training or evaluation. Args: extra: Dict with additional information that can be provided by the FL system.
monai/fl/client/monai_algo.py:688
↓ 1 callersMethodfinalize
(self, engine: Engine)
monai/handlers/probability_maps.py:133
↓ 1 callersMethodfinalize
(self)
tests/nonconfig_workflow.py:228
↓ 1 callersMethodfind_refs_in_config
Recursively search all the content of input config item to get the ids of references. References mean: the IDs of other config items
monai/bundle/reference_resolver.py:320
↓ 1 callersFunctionfind_sub
(parent, submodule)
monai/networks/trt_compiler.py:664
↓ 1 callersMethodfn
()
tests/optimizers/test_optim_novograd.py:71
↓ 1 callersMethodforward
Main forward method: Builds TRT engine if not available yet. Tries to run TRT engine If exception thrown and self.
monai/networks/trt_compiler.py:428
↓ 1 callersMethodforward
(self, x)
monai/networks/utils.py:1290
↓ 1 callersMethodforward
( self, hidden_states: torch.Tensor, res_hidden_states_list: list[torch.Tensor],
monai/networks/nets/diffusion_model_unet.py:1013
↓ 1 callersMethodforward
(self, x: torch.Tensor)
monai/networks/nets/unet.py:297
← previousnext →1,701–1,800 of 7,906, ranked by callers