MCPcopy Index your code

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

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

↓ 5 callersFunctiondownload
download bundle from the specified source or url. The bundle should be a zip file and it will be extracted after downloading. This functi
monai/bundle/scripts.py:446
↓ 5 callersFunctiondownload_mmar
Download and extract Medical Model Archive (MMAR) from Nvidia Clara Train. See Also: - https://docs.nvidia.com/clara/ - Nvid
monai/apps/mmars/mmars.py:106
↓ 5 callersFunctiondtype_numpy_to_torch
Convert a numpy dtype to its torch equivalent.
monai/utils/type_conversion.py:62
↓ 5 callersMethodfeatures
(self, x: torch.Tensor)
monai/networks/nets/senet.py:263
↓ 5 callersFunctionflip_boxes
Flip boxes when the corresponding image is flipped Args: boxes: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is
monai/apps/detection/transforms/box_ops.py:161
↓ 5 callersFunctionfloor_ceil
Returns floor and ceil of the input Args: n: input number Returns: A tuple containing: (1) floor(n)
monai/apps/reconstruction/networks/nets/utils.py:256
↓ 5 callersMethodforward
(self, images)
tests/apps/detection/networks/test_retinanet_detector.py:105
↓ 5 callersMethodforward
(self, x: list[torch.Tensor], y: torch.Tensor, z: torch.Tensor, bs: float = 0.1)
tests/handlers/test_trt_compile.py:42
↓ 5 callersFunctionget_config_values
Read the package versions into a dictionary.
monai/config/deviceconfig.py:54
↓ 5 callersFunctionget_conv_block
( spatial_dims: int, in_channels: int, out_channels: int, kernel_size: Sequence[int] | int = 3
monai/networks/blocks/regunet_block.py:24
↓ 5 callersMethodget_data
(im_shape, im_type)
tests/transforms/test_rand_k_space_spike_noise.py:40
↓ 5 callersMethodget_default_meta
Get the default meta. Returns: default metadata.
monai/data/meta_obj.py:141
↓ 5 callersFunctionget_down_block
( spatial_dims: int, in_channels: int, out_channels: int, temb_channels: int, num_res_bloc
monai/networks/nets/diffusion_model_unet.py:1315
↓ 5 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:645
↓ 5 callersMethodget_ensemble
Get the ensemble
monai/apps/auto3dseg/ensemble_builder.py:391
↓ 5 callersMethodget_history
Get the history of the bundleAlgo object with their names/identifiers
monai/apps/auto3dseg/bundle_gen.py:619
↓ 5 callersMethodget_index_of_first
get_index_of_first takes a ``predicate`` and returns the index of the first transform that satisfies the predicate (ie. makes the pre
monai/transforms/compose.py:307
↓ 5 callersMethodget_score
Returns validation scores of the model trained by the current Algo.
monai/apps/auto3dseg/bundle_gen.py:302
↓ 5 callersMethodinitialize
Initialize the bundle workflow before running.
monai/bundle/workflows.py:466
↓ 5 callersFunctionitk_image_to_metatensor
Converts an ITK image to a MetaTensor object. Args: image: The ITK image to be converted. channel_dim: the channel dimension
monai/data/itk_torch_bridge.py:43
↓ 5 callersFunctionitk_to_monai_affine
Converts an ITK affine matrix (2x2 for 2D or 3x3 for 3D matrix and translation vector) to a MONAI affine matrix. Args: image: The IT
monai/data/itk_torch_bridge.py:105
↓ 5 callersMethodload_config_files
Load multiple config files into a single config dict. The latter config file in the list will override or add the former config file.
monai/bundle/config_parser.py:614
↓ 5 callersMethodload_old_state_dict
Load a state dict from a ViT model trained with an older version of MONAI where ``CrossAttentionBlock`` was unconditionally instantia
monai/networks/nets/vit.py:135
↓ 5 callersMethodnifti_rw
(self, test_data, reader, writer, dtype, resample=True)
tests/data/test_image_rw.py:42
↓ 5 callersMethodnormalize
Normalize an array to [0, 1]
monai/data/ultrasound_confidence_map.py:171
↓ 5 callersFunctionprint_color
(t, color)
monai/transforms/utils.py:2022
↓ 5 callersMethodrandomize
(self, data: Any | None = None)
monai/transforms/smooth_field/dictionary.py:269
↓ 5 callersMethodread
Read data from specified h5 file. Note that the returned object is a dictionary. Args: data: file name to read.
monai/apps/reconstruction/fastmri_reader.py:56
↓ 5 callersMethodread
Read image data from specified file or files. Note that it returns a data object or a sequence of data objects. Args:
monai/data/image_reader.py:1503
↓ 5 callersFunctionresample
Resample `data` using the affine transformation defined by ``matrix``. Args: data: input data to be resampled. matrix: affin
monai/transforms/lazy/utils.py:158
↓ 5 callersFunctionresolve_writer
Resolves to a tuple of available ``ImageWriter`` in ``SUPPORTED_WRITERS`` according to the filename extension key ``ext_name``. Args:
monai/data/image_writer.py:92
↓ 5 callersFunctionsave_as_tif
(filename, array)
tests/apps/pathology/test_lesion_froc.py:31
↓ 5 callersFunctionselect_cross_validation_folds
Select cross validation data based on data partitions and specified fold index. if a list of fold indices is provided, concatenate the partit
monai/data/utils.py:1335
↓ 5 callersMethodset_ensemble_method
Set the ensemble method. Args: ensemble: the AlgoEnsemble to build.
monai/apps/auto3dseg/ensemble_builder.py:377
↓ 5 callersMethodset_mode
(self, mode: str)
monai/transforms/smooth_field/array.py:116
↓ 5 callersMethodset_num_fold
Set the number of cross validation folds for all algos. Args: num_fold: a positive integer to define the number of folds
monai/apps/auto3dseg/auto_runner.py:501
↓ 5 callersMethodset_random_state
(self, seed: int | None = None, state: np.random.RandomState | None = None)
monai/transforms/regularization/dictionary.py:44
↓ 5 callersMethodsub2ind
Converts row and column subscripts into linear indices, basically the copy of the MATLAB function of the same name. https://www.mathwo
monai/data/ultrasound_confidence_map.py:79
↓ 5 callersFunctiontest_pretrained_networks
(network, input_param, device)
tests/test_utils.py:218
↓ 5 callersFunctionto_norm_affine
Given ``affine`` defined for coordinates in the pixel space, compute the corresponding affine for the normalized coordinates. Args:
monai/networks/utils.py:289
↓ 5 callersFunctionunravel_index
`np.unravel_index` with equivalent implementation for torch. Args: idx: index to unravel. shape: shape of array/tensor. Retu
monai/transforms/utils_pytorch_numpy_unification.py:222
↓ 5 callersMethodupdate_ops_nested_label
Update operations for nested label format. Operation value in report_format will be resolved to a dict with only keys. Args:
monai/auto3dseg/analyzer.py:94
↓ 5 callersFunctionwrite_to_version_file
Write the given version number to the given _version.py file.
versioneer.py:1418
↓ 5 callersFunctionzero_module
(module)
monai/networks/nets/controlnet.py:117
↓ 4 callersMethod__init__
Args: spatial_dims: number of spatial dims in_channels: number of input channels num_channel_initial: num
monai/networks/nets/regunet.py:44
↓ 4 callersMethod__init__
(self, spatial_dims: int, in_channels: int, out_channels: int, kernel_size=3, strides=2, dropout=0.0)
monai/networks/nets/attentionunet.py:72
↓ 4 callersMethod__init__
( self, spatial_dims: int, in_channels: int, prev_output_channel: int,
monai/networks/nets/spade_diffusion_model_unet.py:214
↓ 4 callersMethod__init__
Args: spatial_dims: number of spatial dimensions. in_channels: number of input channels. Must equal ``out_channels``.
monai/networks/blocks/localnet_block.py:79
↓ 4 callersMethod__init__
( self, keys: KeysCollection, center_fractions: Sequence[float], accelerations
monai/apps/reconstruction/transforms/dictionary.py:131
↓ 4 callersMethod__init__
( self, channel_dim: str | int | None = None, series_name: str = "", reverse_i
monai/data/image_reader.py:200
↓ 4 callersMethod__init__
( self, backend="cucim", level: int | None = None, mpp: float | tuple[float, f
monai/data/wsi_reader.py:542
↓ 4 callersMethod__init__
Args: transform: the previously applied transform. nearest_interp: whether to use `nearest` interpolation mode when i
monai/transforms/post/array.py:996
↓ 4 callersMethod__init__
( self, keys: KeysCollection, spatial_size: Sequence[int], rand_size: Sequence
monai/transforms/smooth_field/dictionary.py:225
↓ 4 callersMethod__init__
Args: project_name: ClearML project name, default to 'MONAI'. task_name: ClearML task name, default to 'monai_experim
monai/handlers/clearml_handlers.py:33
↓ 4 callersMethod_approx_standard_normal_cdf
A fast approximation of the cumulative distribution function of the standard normal. Code adapted from https://github.com/openai/impr
monai/inferers/inferer.py:1128
↓ 4 callersMethod_class_mean
Compute the class-conditional mean of a masked tensor. This computes the mean over only the masked (non-zero) elements, i.e.,
monai/losses/aucm_loss.py:186
↓ 4 callersFunction_compute
(data: np.ndarray)
monai/visualize/class_activation_maps.py:40
↓ 4 callersFunction_compute_direction_matrix
(image)
monai/data/itk_torch_bridge.py:267
↓ 4 callersFunction_compute_spacing_matrix
(image)
monai/data/itk_torch_bridge.py:255
↓ 4 callersMethod_create_embedding_module
(self, input_dim, embed_dim)
monai/apps/generation/maisi/networks/diffusion_model_unet_maisi.py:306
↓ 4 callersFunction_create_itk_obj
(array, affine)
tests/integration/test_meta_affine.py:108
↓ 4 callersMethod_fill_cache_start_reader
Check the LMDB cache and write the cache if needed. py-lmdb doesn't have a good support for concurrent write. This method can be used
monai/data/dataset.py:634
↓ 4 callersMethod_get_array_data
Get the array data of the image. If `RescaleSlope` and `RescaleIntercept` are available, the raw array data will be rescaled. The out
monai/data/image_reader.py:961
↓ 4 callersMethod_get_cap
Return the cap. If multiprocessing, create a new one. Else return the one from construction time.
monai/data/video_dataset.py:132
↓ 4 callersFunction_get_max_cc
Return the max compute capability (major*100+minor) the _C extension was compiled for, or 0 if the extension is not available (no build info).
tests/transforms/test_spatial_gpu_support.py:24
↓ 4 callersMethod_get_meta_dict
Get all the metadata of the image and convert to dict type. Args: img: a Pydicom dataset object.
monai/data/image_reader.py:703
↓ 4 callersMethod_get_rand_param
(self, param_range, add_scalar: float = 0.0)
monai/transforms/spatial/array.py:1902
↓ 4 callersMethod_get_variance
(self, timestep: int, prev_timestep: int)
monai/networks/schedulers/ddim.py:130
↓ 4 callersMethod_is_parent
Return True if this is the parent process.
monai/utils/profiling.py:211
↓ 4 callersFunction_list_latest_versions
Extract the latest versions from the data dictionary. Args: data: the data dictionary. max_versions: the maximum number of v
monai/bundle/scripts.py:343
↓ 4 callersMethod_log_metrics
(self, metrics: dict[str, Any], step: int | None = None)
monai/handlers/mlflow_handler.py:300
↓ 4 callersMethod_make_layer
(self, block: type[Bottleneck3x3x1], planes: int, blocks: int, stride: int = 1)
monai/networks/nets/ahnet.py:444
↓ 4 callersMethod_make_layer
( self, block: type[ResNetBlock | ResNetBottleneck], planes: int, blocks: int,
monai/networks/nets/resnet.py:296
↓ 4 callersFunction_make_model_pair
Create a reference and test model pair with identical initial weights.
tests/engines/test_gradient_accumulation.py:28
↓ 4 callersFunction_per_class_rank
Effective rank score computed separately per class. Detects asymmetric collapse: one class may use 400 dimensions while another collapses to
monai/metrics/embedding_collapse.py:302
↓ 4 callersMethod_resolve_roi_param
Resolve an ROI parameter from the data dictionary if it is a string key. Args: val: the ROI parameter value. If a string, it is u
monai/transforms/croppad/dictionary.py:505
↓ 4 callersFunction_round_filters
Calculate and round number of filters based on width coefficient multiplier and depth divisor. Args: filters: number of input filter
monai/networks/nets/efficientnet.py:874
↓ 4 callersMethod_select_ap
Compute average precision Args: dataset_statistics (dict): computed statistics over dataset - `counts`:
monai/apps/detection/metrics/coco.py:329
↓ 4 callersMethod_select_ar
Compute average recall Args: dataset_statistics (dict): computed statistics over dataset - `counts`: Nu
monai/apps/detection/metrics/coco.py:364
↓ 4 callersMethod_set_cuda_device
(self)
monai/fl/client/monai_algo.py:716
↓ 4 callersMethod_write_scalar
Write scale value into TensorBoard. Default to call `SummaryWriter.add_scalar()`. Args: _engine: Ignite Engine,
monai/handlers/tensorboard_handlers.py:198
↓ 4 callersMethodaggregate
Execute reduction for the confusion matrix values. Args: compute_sample: when reducing, if ``True``, each sample's metri
monai/metrics/confusion_matrix.py:101
↓ 4 callersMethodaggregate
( self, compute_sample: bool = False, reduction: MetricReduction | str | None = None )
monai/metrics/f_beta_score.py:45
↓ 4 callersFunctionalgo_from_json
Import the Algo object from a JSON file (pickle-free serialization). Args: filename: the name of the saved file (algo_object.json or
monai/auto3dseg/utils.py:423
↓ 4 callersFunctionascontiguousarray
`np.ascontiguousarray` with equivalent implementation for torch (`contiguous`). Args: x: array/tensor. kwargs: if `x` is PyTorch
monai/transforms/utils_pytorch_numpy_unification.py:396
↓ 4 callersMethodattach
(self, engine)
monai/utils/profiling.py:421
↓ 4 callersMethodattach
Register a set of Ignite Event-Handlers to a specified Ignite engine. Args: engine: Ignite Engine, it can be a trainer,
monai/handlers/tensorboard_handlers.py:147
↓ 4 callersMethodattach
Attaches current metric to provided engine. On the end of engine's run, `engine.state.metrics` dictionary will contain computed metri
monai/handlers/ignite_metric.py:139
↓ 4 callersFunctionboxes_center_distance
Distance of center points between two sets of boxes Args: boxes1: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode i
monai/data/box_utils.py:680
↓ 4 callersFunctionbuild_test_cases
(data)
tests/optimizers/test_optim_novograd.py:23
↓ 4 callersFunctioncheck_kwargs_exist_in_class_init
Check if the all keys in kwargs exist in the __init__ method of the class. Args: cls: the class to check. kwargs: kwargs to
monai/utils/misc.py:857
↓ 4 callersFunctioncheck_parent_dir
Utility to check whether the parent directory of the `path` exists. Args: path: input path to check the parent directory. cr
monai/utils/misc.py:629
↓ 4 callersFunctionclip_boxes_to_image
This function clips the ``boxes`` to makes sure the bounding boxes are within the image. Args: boxes: bounding boxes, Nx4 or Nx6 tor
monai/data/box_utils.py:1068
↓ 4 callersFunctioncompute_divisible_spatial_size
Compute the target spatial size which should be divisible by `k`. Args: spatial_shape: original spatial shape. k: the target
monai/transforms/utils.py:1820
↓ 4 callersFunctioncompute_mean_error_metrics
(y_pred: torch.Tensor, y: torch.Tensor, func: Callable)
monai/metrics/regression.py:249
↓ 4 callersFunctioncompute_variance
Args: y_pred: [N, C, H, W, D] or [N, C, H, W] or [N, C, H] where N is repeats, C is channels and H, W, D stand for Height, Wi
monai/metrics/active_learning_metrics.py:108
↓ 4 callersMethodcompute_w_affine
(cls, spatial_rank, mat, img_size, sp_size, align_corners: bool = False)
monai/transforms/spatial/array.py:2342
↓ 4 callersFunctionconcat_multikeys_to_dict
Get the nested value in a list of dictionary that shares the same structure iteratively on all keys. It returns a dictionary with keys with t
monai/auto3dseg/utils.py:205
↓ 4 callersFunctionconvert_box_to_standard_mode
Convert given boxes to standard mode. Standard mode is "xyxy" or "xyzxyz", representing box format of [xmin, ymin, xmax, ymax] or [xmin,
monai/data/box_utils.py:606
↓ 4 callersMethodconvert_data_type
(im_type, d, keys=("img", "image", "label"))
tests/transforms/test_rand_crop_by_pos_neg_label.py:100
← previousnext →401–500 of 7,906, ranked by callers