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

↓ 189 callersMethodto
(self, device: torch.device)
detectron2/detectron2/structures/boxes.py:168
↓ 152 callersMethodget
Access an attribute and return its value if exists. Otherwise return default.
detectron2/detectron2/data/catalog.py:170
↓ 118 callersMethodcat
Concatenates a list of Boxes into a single Boxes Arguments: boxes_list (list[Boxes]) Returns: Boxes
detectron2/detectron2/structures/boxes.py:279
↓ 77 callersMethodget
(self, rank: int, record_id: int)
detectron2/projects/DensePose/densepose/evaluation/tensor_storage.py:180
↓ 75 callersMethodhas
(self, name)
detectron2/detectron2/export/c10.py:73
↓ 67 callersMethodupdate
Args: predictions: D2 Instances for predictions of the current frame Return: D2 Instances for predictions of
detectron2/detectron2/tracking/base_tracker.py:32
↓ 62 callersMethodflatten
(cls, obj)
detectron2/detectron2/export/flatten.py:37
↓ 59 callersFunctionget_norm
Args: norm (str or callable): either one of BN, SyncBN, FrozenBN, GN; or a callable that takes a channel number and returns
detectron2/detectron2/layers/batch_norm.py:169
↓ 59 callersFunctioninstantiate
Recursively instantiate objects defined in dictionaries by "_target_" and arguments. Args: cfg: a dict-like object with "_target
detectron2/detectron2/config/instantiate.py:37
↓ 56 callersFunctioncat
Efficient version of torch.cat that avoids a copy if there is only a single element in a list
detectron2/detectron2/layers/wrappers.py:65
↓ 55 callersMethodclone
Clone the Boxes. Returns: Boxes
detectron2/detectron2/structures/boxes.py:159
↓ 52 callersMethodto
(self, device: torch.device)
detectron2/projects/DensePose/densepose/structures/mesh.py:81
↓ 48 callersMethoddevice
(self)
detectron2/detectron2/structures/boxes.py:299
↓ 45 callersFunctionget_cfg
Get a copy of the default config. Returns: a detectron2 CfgNode instance.
detectron2/detectron2/config/config.py:99
↓ 45 callersMethodwrite
(self)
detectron2/detectron2/utils/events.py:115
↓ 43 callersMethodget
(self)
detectron2/demo/predictor.py:191
↓ 42 callersMethodput_scalar
Add a scalar `value` to the `HistoryBuffer` associated with `name`. Args: smoothing_hint (bool): a 'hint' on whether thi
detectron2/detectron2/utils/events.py:356
↓ 40 callersMethodload
Load a config file. Args: filename: absolute path or relative path w.r.t. the current working directory keys
detectron2/detectron2/config/lazy.py:197
↓ 37 callersMethodnorm
(c)
detectron2/detectron2/modeling/meta_arch/retinanet.py:350
↓ 35 callersMethodsave
Save a config object to a yaml file. Note that when the config dictionary contains complex objects (e.g. lambda), it can't be
detectron2/detectron2/config/lazy.py:252
↓ 29 callersMethodset
Set multiple metadata with kwargs.
detectron2/detectron2/data/catalog.py:162
↓ 27 callersMethodclip
Clip (in place) the boxes by limiting x coordinates to the range [0, width] and y coordinates to the range [0, height]. Args
detectron2/detectron2/structures/boxes.py:183
↓ 27 callersMethodtrain
Args: start_iter, max_iter (int): See docs above
detectron2/detectron2/engine/train_loop.py:139
↓ 26 callersFunctionsetup_logger
Initialize the detectron2 logger and set its verbosity level to "DEBUG". Args: output (str): a file name or a directory to save log.
detectron2/detectron2/utils/logger.py:43
↓ 25 callersMethodstep
User should either: (1) Call this function to increment storage.iter when needed. Or (2) Set `storage.iter` to the correct iteration
detectron2/detectron2/utils/events.py:498
↓ 24 callersFunctionget_event_storage
Returns: The :class:`EventStorage` object that's currently being used. Throws an error if no :class:`EventStorage` is currently e
detectron2/detectron2/utils/events.py:28
↓ 22 callersMethodfreeze
Make this block not trainable. This method sets all parameters to `requires_grad=False`, and convert all BatchNorm layers to
detectron2/detectron2/layers/blocks.py:43
↓ 22 callersMethodresume_or_load
If `resume==True` and `cfg.OUTPUT_DIR` contains the last checkpoint (defined by a `last_checkpoint` file), resume from the file. Resu
detectron2/detectron2/engine/defaults.py:400
↓ 21 callersMethodconvert
Args: box: can be a k-tuple, k-list or an Nxk array/tensor, where k = 4 or 5 from_mode, to_mode (BoxMode) Re
detectron2/detectron2/structures/boxes.py:44
↓ 21 callersMethodconvert
Convert an instance to the destination type using some registered converter. Does recursive lookup for base classes, so there's no ne
detectron2/projects/DensePose/densepose/converters/base.py:66
↓ 21 callersMethodget_image
Returns: ndarray: the visualized image of shape (H, W, 3) (RGB) in uint8 type. The shape is scale
detectron2/detectron2/utils/visualizer.py:310
↓ 21 callersFunctionto_device
This function is a replacement of .to(another_device) such that it allows the casting to be traced properly by explicitly calling the underly
detectron2/detectron2/export/shared.py:24
↓ 20 callersMethodmerge_from_file
Load content from the given config file and merge it into self. Args: cfg_filename: config filename allow_un
detectron2/detectron2/config/config.py:37
↓ 19 callersMethodclose
(self)
detectron2/detectron2/utils/events.py:137
↓ 19 callersFunctionfunc
(device, n=3)
detectron2/tests/layers/test_mask_ops.py:181
↓ 18 callersMethod_initialize_extra_fields
If input instances don't have ID, ID_period, lost_frame_count fields, this method is used to initialize these fields. Args:
detectron2/detectron2/tracking/bbox_iou_tracker.py:151
↓ 18 callersMethodfrom_tensors
Args: tensors: a tuple or list of `torch.Tensor`, each of shape (Hi, Wi) or (C_1, ..., C_K, Hi, Wi) where K >= 1.
detectron2/detectron2/structures/image_list.py:59
↓ 17 callersFunctionget_activation
(name)
distillanydepth/midas/backbones/utils.py:56
↓ 17 callersMethodinference
Arguments: pred_logits, pred_deltas, pred_masks: Same as the output of: meth:`TensorMaskHead.forward`
detectron2/projects/TensorMask/tensormask/arch.py:633
↓ 17 callersMethodoutput_shape
(self)
detectron2/detectron2/modeling/backbone/fpn.py:169
↓ 16 callersFunctionbuild_model
Build the whole model architecture, defined by ``cfg.MODEL.META_ARCHITECTURE``. Note that it does not load any weights from ``cfg``.
detectron2/detectron2/modeling/meta_arch/build.py:16
↓ 16 callersFunctionmaybe_prepend_base_path
Prepends the provided path with a base path prefix if: 1) base path is not None; 2) path is a local path
detectron2/projects/DensePose/densepose/data/utils.py:16
↓ 16 callersFunctionpatch_instances
A contextmanager, under which the Instances class in detectron2 is replaced by a statically-typed scriptable class, defined by `fields`.
detectron2/detectron2/export/torchscript_patch.py:51
↓ 15 callersFunctionalias
(x, name, is_backward=False)
detectron2/detectron2/export/shared.py:598
↓ 15 callersMethodoverlay_instances
Args: boxes (Boxes, RotatedBoxes or ndarray): either a :class:`Boxes`, or an Nx4 numpy array of XYXY_ABS format f
detectron2/detectron2/utils/visualizer.py:621
↓ 15 callersFunctionpairwise_iou_rotated
Return intersection-over-union (Jaccard index) of boxes. Both sets of boxes are expected to be in (x_center, y_center, width, height, an
detectron2/detectron2/layers/rotated_boxes.py:6
↓ 15 callersFunctionrandom_boxes
Create a random Nx4 boxes tensor, with coordinates < max_coord.
detectron2/detectron2/utils/testing.py:42
↓ 15 callersMethodregister
Args: name (str): the name that identifies a dataset, e.g. "coco_2014_train". func (callable): a callable which takes
detectron2/detectron2/data/catalog.py:29
↓ 15 callersMethodregister_sampler
Register sampler for a field Args: prediction_attr (str): field to replace with a sampled value gt_attr (Optiona
detectron2/projects/DensePose/densepose/data/samplers/prediction_to_gt.py:69
↓ 14 callersMethod_init
(self, params=None)
detectron2/detectron2/data/transforms/augmentation.py:109
↓ 14 callersFunction_make_scratch
(in_shape, out_shape, groups=1, expand=False)
distillanydepth/midas/blocks.py:133
↓ 14 callersFunctiondefault_setup
Perform some basic common setups at the beginning of a job, including: 1. Set up the detectron2 logger 2. Log basic information about en
detectron2/detectron2/engine/defaults.py:174
↓ 14 callersMethoddump
Returns: str: a yaml string representation of the config
detectron2/detectron2/config/config.py:87
↓ 14 callersMethodset
Set the field named `name` to `value`. The length of `value` must be the number of instances, and must agree with other exist
detectron2/detectron2/structures/instances.py:69
↓ 13 callersMethodarea
Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box.
detectron2/detectron2/structures/boxes.py:172
↓ 13 callersMethodbackward
(ctx, grad_output)
detectron2/detectron2/layers/deform_conv.py:85
↓ 13 callersFunctioncheck_set_pb_arg
(pb, arg_name, arg_attr, arg_value, allow_override=False)
detectron2/detectron2/export/shared.py:209
↓ 13 callersFunctionconv2d
Helper for building a conv2d layer.
detectron2/detectron2/modeling/backbone/regnet.py:28
↓ 13 callersFunctiondefault_argument_parser
Create a parser with some common arguments used by detectron2 users. Args: epilog (str): epilog passed to ArgumentParser describing
detectron2/detectron2/engine/defaults.py:82
↓ 13 callersMethodload_state_dict
(self, state_dict)
detectron2/detectron2/engine/hooks.py:370
↓ 12 callersMethod__init__
Args: shape: (h, w) tuple or a int interp: PIL interpolation method
detectron2/detectron2/data/transforms/augmentation_impl.py:117
↓ 12 callersFunctionbuild_detection_test_loader
Similar to `build_detection_train_loader`, with default batch size = 1, and sampler = :class:`InferenceSampler`. This sampler coordinates all
detectron2/detectron2/data/build.py:621
↓ 12 callersMethoddevice
(self)
detectron2/projects/TensorMask/tensormask/arch.py:355
↓ 12 callersFunctionget_config
Returns a config object for a model in model zoo. Args: config_path (str): config file name relative to detectron2's "configs/"
detectron2/detectron2/model_zoo/model_zoo.py:147
↓ 12 callersFunctionlaunch
Launch multi-process or distributed training. This function must be called on all machines involved in the training. It will spawn child
detectron2/detectron2/engine/launch.py:27
↓ 12 callersMethodregister_hooks
Register hooks to the trainer. The hooks are executed in the order they are registered. Args: hooks (list[Option
detectron2/detectron2/engine/train_loop.py:121
↓ 12 callersMethodremove
Alias of ``pop``.
detectron2/detectron2/data/catalog.py:69
↓ 12 callersFunctionssf_ada
(x, scale, shift)
distillanydepth/modeling/backbones/vit/ViT_DINO_reg.py:38
↓ 11 callersMethod__init__
( self, in_features: int, hidden_features: Optional[int] = None, out_features:
distillanydepth/modeling/backbones/vit/ViT_DINO.py:166
↓ 11 callersMethodassertEqualsArrays
(self, a1, a2)
detectron2/tests/data/test_rotation_transform.py:9
↓ 11 callersFunctionbuild_backbone
Build a backbone from `cfg.MODEL.BACKBONE.NAME`. Returns: an instance of :class:`Backbone`
detectron2/detectron2/modeling/backbone/build.py:20
↓ 11 callersMethodinterp2d
Bilinear interpolation method to be used for upscaling Args: tensor_nchw (tensor): tensor of shape (N, C, H, W)
detectron2/projects/DensePose/densepose/modeling/predictors/chart.py:68
↓ 11 callersFunctionpoint_sample
A wrapper around :function:`torch.nn.functional.grid_sample` to support 3D point_coords tensors. Unlike :function:`torch.nn.functional.grid_s
detectron2/projects/PointRend/point_rend/point_features.py:19
↓ 10 callersMethod__init__
(self, w_in, w_se, activation_class)
detectron2/detectron2/modeling/backbone/regnet.py:94
↓ 10 callersMethod__init__
( self, in_features: int, hidden_features: Optional[int] = None, out_features:
distillanydepth/modeling/backbones/vit/ViT_DINO_reg.py:257
↓ 10 callersMethodbuild_model
Returns: torch.nn.Module: It now calls :func:`detectron2.modeling.build_model`. Overwrite it if you'd like a dif
detectron2/detectron2/engine/defaults.py:510
↓ 10 callersMethodextract_at_points
Extract ground truth values z_gt for valid point indices and estimated values z_est using bilinear interpolation over top-left (y_lo,
detectron2/projects/DensePose/densepose/modeling/losses/utils.py:160
↓ 10 callersFunctionget_pb_arg
(pb, arg_name)
detectron2/detectron2/export/shared.py:172
↓ 10 callersMethodhistory
Returns: HistoryBuffer: the scalar history for name
detectron2/detectron2/utils/events.py:427
↓ 10 callersFunctioninit_ssf_scale_shift
(dim)
distillanydepth/modeling/backbones/vit/ViT_DINO_reg.py:29
↓ 10 callersMethodload
Args: io: (str or binary file-like object): input file to load data from Returns: An instance of `DensePoseTr
detectron2/projects/DensePose/densepose/structures/transform_data.py:54
↓ 10 callersMethodload
Load model from file. Args: path (str): file path
distillanydepth/midas/base_model.py:6
↓ 9 callersMethod_data_loader
(self, device)
detectron2/tests/test_engine.py:40
↓ 9 callersMethodapply_deltas
Apply transformation `deltas` (dx, dy, dw, dh) to `boxes`. Args: deltas (Tensor): transformation deltas of shape (N, k*4
detectron2/detectron2/modeling/box_regression.py:78
↓ 9 callersFunctionbatched_nms
Same as torchvision.ops.boxes.batched_nms, but with float().
detectron2/detectron2/layers/nms.py:11
↓ 9 callersFunctiondetector_postprocess
Resize the output instances. The input images are often resized when entering an object detector. As a result, we often need the outputs
detectron2/detectron2/modeling/postprocessing.py:9
↓ 9 callersMethoddraw_dataset_dict
Draw annotations/segmentations in Detectron2 Dataset format. Args: dic (dict): annotation/segmentation data of one image
detectron2/detectron2/utils/visualizer.py:550
↓ 9 callersMethoddraw_instance_predictions
Draw instance-level prediction results on an image. Args: predictions (Instances): the output of an instance detection/s
detectron2/detectron2/utils/visualizer.py:387
↓ 9 callersMethodget_fields
like `get_fields` in the Instances object, but return each field in tensor representations
detectron2/detectron2/export/c10.py:59
↓ 9 callersFunctionget_world_size
()
detectron2/detectron2/utils/comm.py:21
↓ 9 callersFunctionmove_device_like
Tracing friendly way to cast tensor to another tensor's device. Device will be treated as constant during tracing, scripting the casting proc
detectron2/detectron2/layers/wrappers.py:172
↓ 9 callersFunctionpairwise_iou
Given two lists of boxes of size N and M, compute the IoU (intersection over union) between **all** N x M pairs of boxes. The box order m
detectron2/detectron2/structures/boxes.py:336
↓ 8 callersMethod__setattr__
(self, name, value)
distillanydepth/utils/mmcv_config.py:626
↓ 8 callersFunction_rename
(cfg: CN, old: str, new: str)
detectron2/detectron2/config/compat.py:116
↓ 8 callersMethodapply_image
(self, img)
detectron2/detectron2/data/transforms/transform.py:269
↓ 8 callersFunctionassert_instances_allclose
Args: input, other (Instances): size_as_tensor: compare image_size of the Instances as tensors (instead of tuples).
detectron2/detectron2/utils/testing.py:95
↓ 8 callersFunctionbuild_detection_train_loader
Build a dataloader for object detection with some default features. Args: dataset (list or torch.utils.data.Dataset): a list of data
detectron2/detectron2/data/build.py:521
↓ 8 callersFunctionget_fed_loss_cls_weights
Get frequency weight for each class sorted by class id. We now calcualte freqency weight using image_count to the power freq_weight_power.
detectron2/detectron2/data/detection_utils.py:549
↓ 8 callersMethodload
(self, path, *args, **kwargs)
detectron2/detectron2/checkpoint/detection_checkpoint.py:34
↓ 8 callersMethodnonempty
Find boxes that are non-empty. A box is considered empty, if either of its side is no larger than threshold. Returns:
detectron2/detectron2/structures/boxes.py:199
next →1–100 of 3,350, ranked by callers