MCPcopy Create free account

hub / github.com/Westlake-AGI-Lab/Distill-Any-Depth / functions

Functions3,350 in github.com/Westlake-AGI-Lab/Distill-Any-Depth

↓ 8 callersMethodtest
Args: cfg (CfgNode): model (nn.Module): evaluators (DatasetEvaluator, list[DatasetEvaluator] or None): if
detectron2/projects/DensePose/densepose/engine/trainer.py:88
↓ 8 callersMethodto
(self, *args: Any, **kwargs: Any)
detectron2/detectron2/structures/masks.py:111
↓ 7 callersMethod__init__
( self, channels: int, use_conv: bool = False, use_conv_transpose: bool = Fals
distillanydepth/modeling/archs/dinov2_dpt_elu.py:70
↓ 7 callersFunction_convert_target_to_string
Inverse of ``locate()``. Args: t: any object with ``__module__`` and ``__qualname__``
detectron2/detectron2/utils/registry.py:15
↓ 7 callersMethod_process_matched_idx
( self, instances: Instances, matched_idx: np.ndarray, matched_prev_idx: np.ndarray )
detectron2/detectron2/tracking/hungarian_tracker.py:97
↓ 7 callersMethod_random_data
(self)
detectron2/tests/test_visualizer.py:17
↓ 7 callersFunctionbuild_batch_data_loader
Build a batched dataloader. The main differences from `torch.utils.data.DataLoader` are: 1. support aspect ratio grouping options 2. use
detectron2/detectron2/data/build.py:294
↓ 7 callersFunctionflatten_to_tuple
Flatten an object so it can be used for PyTorch tracing. Also returns how to rebuild the original object from the flattened outputs. Ret
detectron2/detectron2/export/flatten.py:158
↓ 7 callersFunctionget_pb_arg_vali
(pb, arg_name, default_val)
detectron2/detectron2/export/shared.py:194
↓ 7 callersMethodmake_stage
Create a list of blocks of the same type that forms one ResNet stage. Args: block_class (type): a subclass of CNNBlockBa
detectron2/detectron2/modeling/backbone/resnet.py:493
↓ 7 callersFunctionpairwise_iou
Given two lists of rotated boxes of size N and M, compute the IoU (intersection over union) between **all** N x M pairs of boxes. The
detectron2/detectron2/structures/rotated_boxes.py:490
↓ 7 callersFunctionto_device_if_tensor
(var: Any)
detectron2/projects/DensePose/densepose/structures/cse_confidence.py:69
↓ 6 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0 )
detectron2/detectron2/modeling/backbone/swin.py:29
↓ 6 callersMethod_check_is_range
(self, data_loader, N)
detectron2/tests/data/test_dataset.py:148
↓ 6 callersFunction_get_base_config_dir
Return the base directory for configurations
detectron2/projects/DensePose/tests/common.py:20
↓ 6 callersMethod_simple_roialign
RoiAlign with scale 1.0.
detectron2/tests/layers/test_roi_align.py:79
↓ 6 callersMethod_test_model
(self, config_path, inference_func, batch=1)
detectron2/tests/test_export_torchscript.py:165
↓ 6 callersMethod_test_model_zoo_from_config_path
( self, config_path, inference_func, batch=1, opset_version=STABLE_ONN
detectron2/tests/test_export_onnx.py:206
↓ 6 callersMethodapply_augmentations
Equivalent of ``AugmentationList(augmentations)(self)``
detectron2/detectron2/data/transforms/augmentation.py:344
↓ 6 callersMethodapply_overrides
In-place override contents of cfg. Args: cfg: an omegaconf config object overrides: list of strings in the f
detectron2/detectron2/config/lazy.py:318
↓ 6 callersFunctionciou_loss
Complete Intersection over Union Loss (Zhaohui Zheng et. al) https://arxiv.org/abs/1911.08287 Args: boxes1, boxes2 (Tensor): box
detectron2/detectron2/layers/losses.py:66
↓ 6 callersMethodconstrain_to_multiple_of
(self, x, min_val=0, max_val=None)
distillanydepth/depth_anything_v2/util/transform.py:51
↓ 6 callersMethodconstrain_to_multiple_of
(self, x, min_val=0, max_val=None)
distillanydepth/midas/transforms.py:94
↓ 6 callersFunctioncreate_mesh
(mesh_name: str, device: Optional[torch.device] = None)
detectron2/projects/DensePose/densepose/structures/mesh.py:171
↓ 6 callersFunctiondiou_loss
Distance Intersection over Union Loss (Zhaohui Zheng et. al) https://arxiv.org/abs/1911.08287 Args: boxes1, boxes2 (Tensor): box
detectron2/detectron2/layers/losses.py:5
↓ 6 callersMethoddraw_binary_mask
Args: binary_mask (ndarray): numpy array of shape (H, W), where H is the image height and W is the image width. E
detectron2/detectron2/utils/visualizer.py:1049
↓ 6 callersMethodfake_value
Fake segmentation loss used when no suitable ground truth data was found in a batch. The loss has a value 0 and is primarily used to
detectron2/projects/DensePose/densepose/modeling/losses/mask.py:113
↓ 6 callersFunctionfixup_module_metadata
Fix the __qualname__ of module members to be their exported api name, so when they are referenced in docs, sphinx can find them. Reference:
detectron2/detectron2/utils/env.py:136
↓ 6 callersMethodget
(name)
detectron2/detectron2/checkpoint/catalog.py:58
↓ 6 callersFunctionget_pb_arg_vals
(pb, arg_name, default_val)
detectron2/detectron2/export/shared.py:199
↓ 6 callersFunctionget_rank
()
detectron2/detectron2/utils/comm.py:29
↓ 6 callersFunctionget_sample_coco_image
Args: tensor (bool): if True, returns 3xHxW tensor. else, returns a HxWx3 numpy array. Returns: an image, in BGR
detectron2/detectron2/utils/testing.py:56
↓ 6 callersFunctioninference_on_dataset
Run model on the data_loader and evaluate the metrics with evaluator. Also benchmark the inference speed of `model.__call__` accurately.
detectron2/detectron2/evaluation/evaluator.py:103
↓ 6 callersFunctionlocate
Locate and return an object ``x`` using an input string ``{x.__module__}.{x.__qualname__}``, such as "module.submodule.class_name". Rais
detectron2/detectron2/utils/registry.py:40
↓ 6 callersFunctionnonzero_tuple
A 'as_tuple=True' version of torch.nonzero to support torchscript. because of https://github.com/pytorch/pytorch/issues/38718
detectron2/detectron2/layers/wrappers.py:158
↓ 6 callersFunctionpatch_builtin_len
Patch the builtin len() function of a few detectron2 modules to use __len__ instead, because __len__ does not convert values to integers
detectron2/detectron2/export/torchscript_patch.py:316
↓ 6 callersFunctionprint_csv_format
Print main metrics in a format similar to Detectron, so that they are easy to copypaste into a spreadsheet. Args: results (Order
detectron2/detectron2/evaluation/testing.py:9
↓ 6 callersMethodrandomData
(self, h=5, w=5)
detectron2/tests/data/test_rotation_transform.py:12
↓ 6 callersFunctionread_image
Read an image into the given format. Will apply rotation and flipping if the image has such exif information. Args: file_name (s
detectron2/detectron2/data/detection_utils.py:166
↓ 6 callersMethodregister
Registers a converter for the specified type. Can be used as a decorator (if converter is None), or called as a method. Args
detectron2/projects/DensePose/densepose/converters/base.py:18
↓ 6 callersFunctionseed_all_rng
Set the random seed for the RNG in torch, numpy and python. Args: seed (int): if None, will use a strong random seed.
detectron2/detectron2/utils/env.py:27
↓ 6 callersFunctionslice_if_not_none
(data, item)
detectron2/projects/DensePose/densepose/structures/chart_confidence.py:55
↓ 6 callersFunctionsquared_euclidean_distance_matrix
Get squared Euclidean Distance Matrix Computes pairwise squared Euclidean distances between points Args: pts1: Tensor [M x D], M
detectron2/projects/DensePose/densepose/modeling/cse/utils.py:9
↓ 6 callersFunctionto_device_if_tensor
(var: Any)
detectron2/projects/DensePose/densepose/structures/chart_confidence.py:84
↓ 6 callersFunctionverify_results
Args: results (OrderedDict[dict]): task_name -> {metric -> score} Returns: bool: whether the verification succeeds or not
detectron2/detectron2/evaluation/testing.py:31
↓ 6 callersFunctionwindow_partition
Args: x: (B, H, W, C) window_size (int): window size Returns: windows: (num_windows*B, window_size, window_size, C)
detectron2/detectron2/modeling/backbone/swin.py:49
↓ 5 callersMethod__init__
(self, in_channels, atrous_rates, out_channels)
detectron2/projects/DensePose/densepose/modeling/roi_heads/deeplab.py:111
↓ 5 callersMethod__init__
(self, arg1, arg2, arg3=3)
detectron2/tests/config/test_yacs_config.py:68
↓ 5 callersMethod_benchmark
(self, iterator, num_iter, warmup, msg=None)
detectron2/detectron2/data/benchmark.py:100
↓ 5 callersFunction_broadcast_params
If one size (or aspect ratio) is specified and there are multiple feature maps, we "broadcast" anchors of that single size (or aspect ratio)
detectron2/detectron2/modeling/anchor_generator.py:58
↓ 5 callersMethod_change_color_brightness
Depending on the brightness_factor, gives a lighter or darker color i.e. a color with less or more saturation than the original color
detectron2/detectron2/utils/visualizer.py:1194
↓ 5 callersMethod_convert_xy_to_wh
(self, x)
detectron2/tests/structures/test_boxes.py:13
↓ 5 callersFunction_get_builtin_metadata
(dataset_name)
detectron2/detectron2/data/datasets/builtin_meta.py:283
↓ 5 callersFunction_longest_common_prefix_str
(names: List[str])
detectron2/detectron2/checkpoint/c2_model_loading.py:382
↓ 5 callersMethod_process_unmatched_idx
(self, instances: Instances, matched_idx: np.ndarray)
detectron2/detectron2/tracking/hungarian_tracker.py:109
↓ 5 callersFunction_test_func
(arg1, arg2=2, arg3=3, arg4=4)
detectron2/tests/config/test_yacs_config.py:147
↓ 5 callersMethod_test_obj
(self, obj)
detectron2/tests/test_registry.py:15
↓ 5 callersMethodadd_arguments
(cls: type, parser: argparse.ArgumentParser)
detectron2/projects/DensePose/apply_net.py:56
↓ 5 callersMethodadd_arguments
(cls: type, parser: argparse.ArgumentParser)
detectron2/projects/DensePose/query_db.py:41
↓ 5 callersMethodapply_coords
coords should be a N * 2 array-like, containing N couples of (x, y) points
detectron2/detectron2/data/transforms/transform.py:210
↓ 5 callersMethodapply_image
img should be a numpy array, formatted as Height * Width * Nchannels
detectron2/detectron2/data/transforms/transform.py:200
↓ 5 callersMethodarea
Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box.
detectron2/detectron2/structures/rotated_boxes.py:236
↓ 5 callersFunctionbuild_detection_train_loader
A data loader is created in a way similar to that of Detectron2. The main differences are: - it allows to combine datasets with differen
detectron2/projects/DensePose/densepose/data/build.py:428
↓ 5 callersFunctionbuild_proposal_generator
Build a proposal generator from `cfg.MODEL.PROPOSAL_GENERATOR.NAME`. The name can be "PrecomputedProposals" to use no proposal generator.
detectron2/detectron2/modeling/proposal_generator/build.py:15
↓ 5 callersMethodcount_samples
Return the number of samples logged in the past `window_size` iterations.
detectron2/detectron2/utils/events.py:477
↓ 5 callersFunctioncreate_small_table
Create a small table using the keys of small_dict as headers. This is only suitable for small dictionaries. Args: small_dict (di
detectron2/detectron2/utils/logger.py:233
↓ 5 callersMethodcrop_and_resize
Crop each bitmask by the given box, and resize results to (mask_size, mask_size). This can be used to prepare training targets for Ma
detectron2/detectron2/structures/masks.py:191
↓ 5 callersFunctiondefault_X_scheduler
Returns the config for a default multi-step LR scheduler such as "1x", "3x", commonly referred to in papers, where every 1x has the total len
detectron2/configs/common/coco_schedule.py:7
↓ 5 callersFunctiondump_torchscript_IR
Dump IR of a TracedModule/ScriptModule/Function in various format (code, graph, inlined graph). Useful for debugging. Args: mode
detectron2/detectron2/export/torchscript.py:63
↓ 5 callersFunctionextract_boxes_xywh_from_instances
(instances: Instances, select=None)
detectron2/projects/DensePose/densepose/vis/extractor.py:32
↓ 5 callersMethodget_bounding_boxes
Returns: Boxes: tight bounding boxes around bitmasks. If a mask is empty, it's bounding box will be all zero.
detectron2/detectron2/structures/masks.py:224
↓ 5 callersFunctionget_model_no_weights
Like model_zoo.get, but do not load any weights (even pretrained)
detectron2/detectron2/utils/testing.py:29
↓ 5 callersMethodhas
Returns: bool: whether the field called `name` exists.
detectron2/detectron2/structures/instances.py:83
↓ 5 callersFunctioninitialize_module_params
(module: nn.Module)
detectron2/projects/DensePose/densepose/modeling/utils.py:8
↓ 5 callersFunctionload_ckpt_dino
(checkpoint, model)
distillanydepth/modeling/backbones/vit/ViT_DINO_reg.py:1109
↓ 5 callersFunctionmake_int_box
(box: torch.Tensor)
detectron2/projects/DensePose/densepose/converters/base.py:92
↓ 5 callersFunctionmask_rcnn_inference
Convert pred_mask_logits to estimated foreground probability masks while also extracting only the masks for the predicted classes in pred_ins
detectron2/detectron2/modeling/roi_heads/mask_head.py:115
↓ 5 callersFunctionnms_rotated
Performs non-maximum suppression (NMS) on the rotated boxes according to their intersection-over-union (IoU). Rotated NMS iteratively re
detectron2/detectron2/layers/nms.py:28
↓ 5 callersFunctionnormalize_embeddings
Normalize N D-dimensional embedding vectors arranged in a tensor [N, D] Args: embeddings (tensor [N, D]): N D-dimensional embedding
detectron2/projects/DensePose/densepose/modeling/cse/utils.py:27
↓ 5 callersFunctionpaste_masks_in_image
Paste a set of masks that are of a fixed resolution (e.g., 28 x 28) into an image. The location, height, and width for pasting each mask is d
detectron2/detectron2/layers/mask_ops.py:74
↓ 5 callersFunctionpermute_to_N_HWA_K
Transpose/reshape a tensor from (N, (Ai x K), H, W) to (N, (HxWxAi), K)
detectron2/detectron2/modeling/meta_arch/dense_detector.py:15
↓ 5 callersFunctionpolygons_to_bitmask
Args: polygons (list[ndarray]): each array has shape (Nx2,) height, width (int) Returns: ndarray: a bool mask of sha
detectron2/detectron2/structures/masks.py:22
↓ 5 callersMethodpredict_boxes
Args: predictions: return values of :meth:`forward()`. proposals (list[Instances]): proposals that match the features
detectron2/detectron2/modeling/roi_heads/fast_rcnn.py:523
↓ 5 callersMethodput
(self, rank: int, data: Dict[str, torch.Tensor])
detectron2/projects/DensePose/densepose/evaluation/tensor_storage.py:184
↓ 5 callersMethodput_scalars
Put multiple scalars from keyword arguments. Examples: storage.put_scalars(loss=my_loss, accuracy=my_accuracy, smoothin
detectron2/detectron2/utils/events.py:386
↓ 5 callersFunctionrandom_color
Args: rgb (bool): whether to return RGB colors or BGR colors. maximum (int): either 255 or 1 Returns: ndarray: a vec
detectron2/detectron2/utils/colormap.py:112
↓ 5 callersMethodreset
Preparation for a new round of evaluation. Should be called before starting a round of evaluation.
detectron2/detectron2/evaluation/evaluator.py:26
↓ 5 callersMethodreset_image
Args: img: same as in __init__
detectron2/detectron2/utils/visualizer.py:294
↓ 5 callersFunctionretry_if_cuda_oom
Makes a function retry itself after encountering pytorch's CUDA OOM error. It will first retry after calling `torch.cuda.empty_cache()`.
detectron2/detectron2/utils/memory.py:26
↓ 5 callersFunctionsem_seg_postprocess
Return semantic segmentation predictions in the original resolution. The input images are often resized when entering semantic segmentor. Mo
detectron2/detectron2/modeling/postprocessing.py:77
↓ 5 callersMethodstate_dict
Hooks are stateless by default, but can be made checkpointable by implementing `state_dict` and `load_state_dict`.
detectron2/detectron2/engine/train_loop.py:86
↓ 5 callersMethodsummarize
Compute and display summary metrics for evaluation results given a custom value for max_dets_per_image
detectron2/detectron2/evaluation/coco_evaluation.py:640
↓ 4 callersMethod__init__
Args: img_size (int): Input image size. patch_size (int): Patch size. in_chans (int): Number of input ima
detectron2/detectron2/modeling/backbone/vit.py:239
↓ 4 callersMethod__init__
Args: stem (nn.Module): a stem module stages (list[list[CNNBlockBase]]): several (typically 4) stages,
detectron2/detectron2/modeling/backbone/resnet.py:367
↓ 4 callersMethod__init__
Args: op (Callable): operation to be applied to the image, which takes in an ndarray and returns an ndarray.
detectron2/detectron2/data/transforms/transform.py:258
↓ 4 callersMethod__init__
(self, rank_to_storage: Dict[int, SingleProcessTensorStorage])
detectron2/projects/DensePose/densepose/evaluation/tensor_storage.py:177
↓ 4 callersMethod__init__
Init. Args: scale_factor (float): scaling mode (str): interpolation mode
distillanydepth/midas/blocks.py:212
↓ 4 callersMethod_batch_inference
Execute inference on a list of inputs, using batch size = self.batch_size, instead of the length of the list. Inputs & outpu
detectron2/detectron2/modeling/test_time_augmentation.py:162
↓ 4 callersFunction_cast_to_config
(obj)
detectron2/detectron2/config/lazy.py:84
↓ 4 callersFunction_collect_config_files
Collect all configuration files (i.e. densepose_*.yaml) directly in the specified directory
detectron2/projects/DensePose/tests/common.py:48
← previousnext →101–200 of 3,350, ranked by callers