MCPcopy Create free account

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

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

↓ 3 callersFunctiondev_collate
Recursively run collate logic and provide detailed loggings for debugging purposes. It reports results at the 'critical' level, is therefore
monai/data/utils.py:355
↓ 3 callersFunctiondistance_transform_edt
Euclidean distance transform, either GPU based with CuPy / cuCIM or CPU based with scipy. To use the GPU implementation, make sure cuCIM is a
monai/transforms/utils.py:2445
↓ 3 callersFunctiondrop_connect
Drop connect layer that drops individual connections. Differs from dropout as dropconnect drops connections instead of whole neurons as in dr
monai/networks/nets/efficientnet.py:740
↓ 3 callersMethoddrop_path
(self, x, drop_prob: float = 0.0, training: bool = False, scale_by_keep: bool = True)
monai/networks/layers/drop_path.py:36
↓ 3 callersMethodembed
Given encoding indices of shape [B,D,H,W,1] embeds them in the quantized space [B, D, H, W, self.embedding_dim] and reshapes them to
monai/networks/layers/vector_quantizer.py:128
↓ 3 callersMethodencode
Forwards an image through the spatial encoder, obtaining the latent mean and sigma representations. Args: x: BxCx[SPATIA
monai/networks/nets/autoencoderkl.py:593
↓ 3 callersMethodencode
Forwards an image through the spatial encoder, obtaining the latent mean and sigma representations. Args: x: BxCx[SPATIA
monai/networks/nets/spade_autoencoderkl.py:428
↓ 3 callersMethodencode_single
Encode proposals with respect to ground truth (gt) boxes. Args: gt_boxes: gt boxes, Nx4 or Nx6 torch tensor. The box mod
monai/apps/detection/utils/box_coder.py:154
↓ 3 callersMethodensemble_pred
ensemble the results using either "mean" or "vote" method Args: preds: a list of probability prediction in Tensor-Like f
monai/apps/auto3dseg/ensemble_builder.py:109
↓ 3 callersMethodensure_torch_and_prune_meta
Convert the image to MetaTensor (when meta is not None). If `affine` is in the `meta` dictionary, convert that to `torch.Tensor`, too
monai/data/meta_tensor.py:534
↓ 3 callersFunctionerode
Erode 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:26
↓ 3 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:86
↓ 3 callersFunctionfftn_centered
Pytorch-based fft for spatial_dims-dim signals. "centered" means this function automatically takes care of the required ifft and fft shifts.
monai/data/fft_utils.py:60
↓ 3 callersMethodfinalize
Writes the cached dict to a csv
monai/data/csv_saver.py:69
↓ 3 callersMethodfinalize
Finalize step after the running of bundle workflow.
monai/bundle/workflows.py:490
↓ 3 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:447
↓ 3 callersMethodfind_guidance
(self, discrepancy)
monai/apps/deepedit/transforms.py:567
↓ 3 callersMethodforward
Args: input: the shape should be BNH[WD]. target: the shape should be BNH[WD] or B1H[WD]. Raises:
monai/losses/dice.py:828
↓ 3 callersMethodforward
Args: input: the shape should be BNH[WD]. The input should be the original logits due to the restriction of ``mon
monai/losses/dice.py:960
↓ 3 callersMethodforward
Args: input (torch.Tensor): the shape should be BNH[WD]. The input should be the original logits due to the restr
monai/losses/dice.py:1082
↓ 3 callersMethodforward
Args: input: the shape should be BNHW[D], where N is the number of classes. target: the shape should be BNHW[D] or B1
monai/losses/hausdorff_loss.py:124
↓ 3 callersFunctiongaussian_1d
Computes 1D gaussian kernel. Args: kernel_size: size of the gaussian kernel sigma: Standard deviation of the gaussian
monai/metrics/regression.py:391
↓ 3 callersFunctiongen_filter
"Generate patch filtering function for testing
tests/inferers/test_sliding_window_splitter.py:154
↓ 3 callersFunctiongenerate_label_classes_crop_centers
Generate valid sample locations based on the specified ratios of label classes. Valid: samples sitting entirely within image, expected input
monai/transforms/utils.py:698
↓ 3 callersFunctiongenerate_pos_neg_label_crop_centers
Generate valid sample locations based on the label with option for specifying foreground ratio Valid: samples sitting entirely within image,
monai/transforms/utils.py:640
↓ 3 callersMethodget_algo_ensemble
Get the algo ensemble after ranking or a empty list if ranking was not started. Returns: A list of Algo
monai/apps/auto3dseg/ensemble_builder.py:77
↓ 3 callersMethodget_arr
(shape)
tests/padders.py:55
↓ 3 callersMethodget_arr
(shape)
tests/croppers.py:28
↓ 3 callersMethodget_array
Returns a new array in `output_type`, the array shares the same underlying storage when the output is a numpy array. Changes to self
monai/data/meta_tensor.py:356
↓ 3 callersFunctionget_boxmode
This function that return a :class:`~monai.data.box_utils.BoxMode` object giving a representation of box mode Args: mode: a represen
monai/data/box_utils.py:457
↓ 3 callersFunctionget_bundle_versions
Get the latest version, as well as all existing versions of a bundle that is stored in the release of specified repository with the provided
monai/bundle/scripts.py:849
↓ 3 callersMethodget_data
(im_shape, im_type)
tests/transforms/test_k_space_spike_noised.py:44
↓ 3 callersMethodget_data
(im_shape, input_type)
tests/transforms/test_gibbs_noise.py:42
↓ 3 callersFunctionget_deconv_block
(spatial_dims: int, in_channels: int, out_channels: int)
monai/networks/blocks/regunet_block.py:175
↓ 3 callersFunctionget_dropout_layer
Create a dropout layer instance. For example, to create dropout layers: .. code-block:: python from monai.networks.layers impo
monai/networks/layers/utils.py:76
↓ 3 callersFunctionget_edge_surface_distance
This function is used to compute the surface distance from `y_pred` to `y` using the edges of the masks. Args: y_pred: the predicted
monai/metrics/utils.py:303
↓ 3 callersMethodget_encoder_names
(cls)
tests/networks/nets/test_flexible_unet.py:56
↓ 3 callersFunctionget_extreme_points
Generate extreme points from an image. These are used to generate initial segmentation for annotation models. An optional perturbation can be
monai/transforms/utils.py:1580
↓ 3 callersMethodget_im
(shape=None, dtype=None, device=None)
tests/data/meta_tensor/test_to_from_meta_tensord.py:46
↓ 3 callersMethodget_input
Get tensor for the tests. The tensor is around (-1) or (+1), depending on is_positive.
tests/losses/test_adversarial_loss.py:43
↓ 3 callersFunctionget_itk_image_center
Calculates the center of the ITK image based on its origin, size, and spacing. This center is equivalent to the implicit image center that MO
monai/data/itk_torch_bridge.py:194
↓ 3 callersMethodget_likelihood
Computes the log-likelihoods for an input. Args: inputs: input images, NxCxHxW[xD] diffusion_model: model to
monai/inferers/inferer.py:1000
↓ 3 callersMethodget_likelihood
Computes the log-likelihoods of the latent representations of the input. Args: inputs: input images, NxCxHxW[xD]
monai/inferers/inferer.py:2128
↓ 3 callersMethodget_meta_info
(cls, metadata: Mapping | None = None)
monai/data/image_writer.py:785
↓ 3 callersFunctionget_model_names
()
tests/networks/nets/test_efficientnet.py:51
↓ 3 callersFunctionget_model_spec
get model specification by `idx`. `idx` could be index of the constant tuple of dict or the actual model ID.
monai/apps/mmars/mmars.py:41
↓ 3 callersFunctionget_morphological_filter_result_t
Apply a morphological filter to a 2D/3D binary mask tensor. Args: mask_t: input 2D/3D binary mask, [N,C,M,N] or [N,C,M,N,P] torch te
monai/transforms/utils_morphological_ops.py:90
↓ 3 callersFunctionget_padding
(kernel_size: Sequence[int] | int, stride: Sequence[int] | int)
monai/networks/blocks/dynunet_block.py:304
↓ 3 callersFunctionget_pool_layer
Create a pooling layer instance. For example, to create adaptiveavg layer: .. code-block:: python from monai.networks.layers i
monai/networks/layers/utils.py:105
↓ 3 callersFunctionget_pretrained_resnet_medicalnet
Download resnet pretrained weights from https://huggingface.co/TencentMedicalNet Args: resnet_depth: depth of the pretrained model.
monai/networks/nets/resnet.py:620
↓ 3 callersFunctionget_rel_pos
Get relative positional embeddings according to the relative positions of query and key sizes. Args: q_size (int): size of query
monai/networks/blocks/attention_utils.py:17
↓ 3 callersMethodget_resolved_content
Get the resolved ``ConfigItem`` by id. Args: id: id name of the expected item. kwargs: keyword arguments to
monai/bundle/reference_resolver.py:181
↓ 3 callersMethodget_revert_sequence_ordering
(self)
monai/utils/ordering.py:97
↓ 3 callersMethodget_stats
Get the statistics information of the training process. Default to return the `rank`, `current_epoch`, `current_iteration`, `total_ep
monai/engines/trainer.py:57
↓ 3 callersFunctionget_surface_distance
This function is used to compute the surface distances from `seg_pred` to `seg_gt`. Args: seg_pred: the edge of the predictions.
monai/metrics/utils.py:257
↓ 3 callersFunctionget_tcia_metadata
Achieve metadata of a public The Cancer Imaging Archive (TCIA) dataset. This function makes use of The National Biomedical Imaging Archive (
monai/apps/tcia/utils.py:37
↓ 3 callersFunctionget_unique_labels
Get list of non-background labels in an image. Args: img: Image to be processed. Shape should be [C, W, H, [D]] with C=1 if not onehot el
monai/transforms/utils.py:1495
↓ 3 callersMethodget_weights
Returns the current weights of the model. Args: extra: Dict with additional information that can be provided by the FL s
monai/fl/client/monai_algo.py:547
↓ 3 callersMethodget_workflow_type
Get the workflow type, it can be `None`, "train", or "infer".
monai/bundle/workflows.py:200
↓ 3 callersMethodgrid_anchors
Every combination of (a, (g, s), i) in (self.cell_anchors, zip(grid_sizes, strides), 0:spatial_dims) corresponds to a feature map.
monai/apps/detection/utils/anchor_utils.py:217
↓ 3 callersFunctiongrid_pull
Sample an image with respect to a deformation field. `interpolation` can be an int, a string or an InterpolationType. Possible values ar
monai/networks/layers/spatial_transforms.py:60
↓ 3 callersFunctionidentity
(x)
tests/data/test_patch_dataset.py:24
↓ 3 callersMethodindex_quantize
(self, images: torch.Tensor)
monai/networks/nets/vqvae.py:451
↓ 3 callersMethodinitialize
(self)
tests/nonconfig_workflow.py:59
↓ 3 callersMethodinputs_labels_from_batch
(self, batch_data)
monai/optimizers/lr_finder.py:62
↓ 3 callersMethodinv_shift_fourier
Applies inverse shift and fourier transform. Only the spatial dimensions are transformed. Args: k: K-space data.
monai/transforms/utils.py:1904
↓ 3 callersMethodinverse
(self, data)
monai/transforms/utility/dictionary.py:1085
↓ 3 callersMethodinverse
(self, data: torch.Tensor)
monai/transforms/spatial/array.py:744
↓ 3 callersMethodis_import_statement
Check whether the config is an import statement (a special case of expression). Args: config: input config content to ch
monai/bundle/config_item.py:399
↓ 3 callersMethodis_started
Check whether the replacement thread is already started.
monai/data/dataset.py:1132
↓ 3 callersFunctionis_valid_box_values
This function checks whether the box size is non-negative. Args: boxes: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box
monai/data/box_utils.py:723
↓ 3 callersFunctioniter_patch
Yield successive patches from `arr` of size `patch_size`. The iteration can start from position `start_pos` in `arr` but drawing from a padde
monai/data/utils.py:255
↓ 3 callersFunctionjson_hashing
Args: item: data item to be hashed Returns: the corresponding hash key
monai/data/utils.py:1360
↓ 3 callersFunctionlabel_quality_score
The assumption is that the DL model makes better predictions than the provided label quality, hence the difference can be treated as a label
monai/metrics/active_learning_metrics.py:163
↓ 3 callersFunctionlinear_probe_accuracy
Fit a linear classifier on embeddings and return test accuracy. Used to validate that collapse scores predict downstream task performance. R
monai/metrics/embedding_collapse.py:416
↓ 3 callersFunctionload_bundle_config
Load the metadata and nominated configuration files from a MONAI bundle without loading the network itself. This function will load the info
monai/bundle/utils.py:171
↓ 3 callersFunctionload_module
Handles the loading of c++ extension modules. Args: module_name: Name of the module to load. Must match the name of the
monai/_extensions/loader.py:49
↓ 3 callersFunctionload_submodules
Traverse the source of the module structure starting with module `basemod`, loading all packages plus all files if `load_all` is True, exclud
monai/utils/module.py:174
↓ 3 callersFunctionmake_animated_gif_summary
Creates an animated gif out of an image tensor in 'CHWD' format and returns Summary. Args: tag: Data identifier image: The image,
monai/visualize/img2tensorboard.py:80
↓ 3 callersFunctionmake_tensor
(d)
monai/networks/trt_compiler.py:237
↓ 3 callersMethodmeta
Get the meta. Defaults to ``{}``.
monai/data/meta_obj.py:177
↓ 3 callersFunctionmode
`torch.mode` with equivalent implementation for numpy. Args: x: array/tensor. dim: dimension along which to perform `mode` (refer
monai/transforms/utils_pytorch_numpy_unification.py:426
↓ 3 callersFunctionmust_be_types
(variable_name, variable, types)
monai/transforms/adaptors.py:138
↓ 3 callersFunctionmust_be_types_or_none
(variable_name, variable, types)
monai/transforms/adaptors.py:133
↓ 3 callersFunctionnon_max_suppression
Non-maximum suppression (NMS). Args: boxes: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``Stan
monai/data/box_utils.py:1087
↓ 3 callersFunctionomp_flags
()
setup.py:74
↓ 3 callersMethodpad_test_kwargs
(self, unchanged_slices, **input_param)
tests/padders.py:94
↓ 3 callersFunctionpaste
given a location (loc) and an original array (orig), paste a block array into it
monai/transforms/utils.py:2215
↓ 3 callersMethodplot
Plots the learning rate range test. Args: skip_start: number of batches to trim from the start. skip_end: number of b
monai/optimizers/lr_finder.py:487
↓ 3 callersFunctionpredict_with_inferer
Predict network dict output with an inferer. Compared with directly output network(images), it enables a sliding window inferer that can be u
monai/apps/detection/utils/predict_utils.py:92
↓ 3 callersFunctionprepare_spacing
This function is used to prepare the `spacing` parameter to include batch dimension for the computation of surface distance, hausdorff distan
monai/metrics/utils.py:415
↓ 3 callersFunctionpreprocess_images
Preprocess the input images, including - validate of the inputs - pad the inputs so that the output spatial sizes are divisible by `size
monai/apps/detection/utils/detector_utils.py:179
↓ 3 callersFunctionprint_results
(results, discovery_time, thresh, status)
tests/runner.py:72
↓ 3 callersFunctionpytorch_after
Compute whether the current pytorch version is after or equal to the specified version. The current system pytorch version is determined by `
monai/utils/module.py:595
↓ 3 callersMethodrandomize
(self, label: NdarrayOrTensor)
monai/transforms/utility/dictionary.py:1376
↓ 3 callersMethodrandomize
(self, label: NdarrayOrTensor)
monai/transforms/utility/array.py:1110
↓ 3 callersFunctionrectify_header_sform_qform
Look at the sform and qform of the nifti object and correct it if any incompatibilities with pixel dimensions Adapted from https://githu
monai/data/utils.py:761
↓ 3 callersMethodreset
Reset the buffers for cumulative tensors and the synced results.
monai/metrics/metric.py:194
↓ 3 callersMethodretrieve
Retrieve the object stored under a given key name.
monai/utils/state_cacher.py:116
↓ 3 callersFunctionroot_sum_of_squares
Compute the root sum of squares (rss) of the data (typically done for multi-coil MRI samples) Args: x: Input array/tensor sp
monai/apps/reconstruction/mri_utils.py:42
← previousnext →701–800 of 7,906, ranked by callers