MCPcopy Create free account

hub / github.com/KyanChen/RSPrompter / functions

Functions6,823 in github.com/KyanChen/RSPrompter

↓ 15 callersMethodevaluate
Evaluate the model performance of the whole dataset after processing all batches. Args: size (int): Length of the entire
mmdet/evaluation/metrics/coco_video_metric.py:46
↓ 15 callersMethodfc
Full connected layer.
mmpretrain/models/heads/stacked_head.py:126
↓ 15 callersMethodforward_plugin
(self, x, plugin_names)
mmdet/models/backbones/resnet.py:242
↓ 15 callersFunctionlevels_to_images
Concat multi-level feature maps by image. [feature_level0, feature_level1...] -> [feature_image0, feature_image1...] Convert the shape of eac
mmdet/models/utils/misc.py:400
↓ 15 callersMethodrandom_disable
Randomly disable the transform.
mmpretrain/datasets/transforms/auto_augment.py:334
↓ 14 callersMethodaccumulate
Accumulate per image evaluation results and store the result in self.eval. :param p: input params for evaluation :return: Non
mmdet/evaluation/functional/ytviseval.py:372
↓ 14 callersFunctionbbox_overlaps
Calculate the ious between each bbox of bboxes1 and bboxes2. Args: bboxes1 (ndarray): Shape (n, 4) bboxes2 (ndarray): Shape (k, 4
mmdet/evaluation/functional/bbox_overlaps.py:5
↓ 14 callersFunctioncast_tensor_type
Recursively convert Tensor in inputs from ``src_type`` to ``dst_type``. Args: inputs: Inputs that to be casted. src_type (torch.d
mmdet/utils/memory.py:11
↓ 14 callersMethodgrid_anchors
Generate grid anchors in multiple feature levels. Args: featmap_sizes (list[tuple]): List of feature map sizes in
mmdet/models/task_modules/prior_generators/anchor_generator.py:338
↓ 14 callersMethodnorm1
nn.Module: the normalization layer named "norm1"
mmdet/models/backbones/hrnet.py:403
↓ 14 callersMethodrandom_negative
Randomly negative the value.
mmpretrain/datasets/transforms/auto_augment.py:355
↓ 14 callersMethodunbind
Reload ``unbind`` from self.tensor.
mmdet/structures/bbox/base_boxes.py:298
↓ 13 callersMethodclip_
Clip boxes according to the image shape in-place. Args: img_shape (Tuple[int, int]): A tuple of image height and width.
mmdet/structures/bbox/base_boxes.py:409
↓ 13 callersFunctionget_box_type
get both box type name and class. Args: box_type (str or type): Single box type name or class. Returns: Tuple[str, type]: A
mmdet/structures/bbox/box_type.py:165
↓ 13 callersMethodget_data_info
Get annotation by index. Args: idx (int): Global index of ``ConcatDataset``. Returns: dict: The idx-th annot
mmdet/datasets/dataset_wrappers.py:101
↓ 13 callersFunctionget_ori_model
Get original model if the input model is a model wrapper. Args: model (nn.Module): A model may be a model wrapper. Returns:
mmpretrain/utils/misc.py:6
↓ 13 callersFunctionis_block
Check if is ResNet building block.
tests/test_models/test_backbones/utils.py:11
↓ 13 callersMethodpredict_by_feat
Adjust the predicted bboxes from bbox head. Args: grid_preds (dict[str, Tensor]): dictionary outputted by forward
mmdet/models/roi_heads/mask_heads/grid_head.py:367
↓ 13 callersMethodset_pred_score
Set ``pred_label``.
mmpretrain/structures/data_sample.py:103
↓ 13 callersFunctionto_tensor
Convert value to torch.Tensor.
mmpretrain/evaluation/metrics/single_label.py:14
↓ 12 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None
mmpretrain/models/backbones/vig.py:480
↓ 12 callersMethod_bbox_post_process
bbox post-processing method. The boxes would be rescaled to the original image scale and do the nms operation. Usually with_nms is Fa
mmdet/models/dense_heads/paa_head.py:604
↓ 12 callersMethodextra_repr
Extra repr string when auto-generating magnitude is enabled.
mmpretrain/datasets/transforms/auto_augment.py:362
↓ 12 callersFunctionfloordiv
(dividend, divisor, rounding_mode='trunc')
mmdet/models/utils/misc.py:464
↓ 12 callersFunctionget_palette
Get palette from various inputs. Args: palette (list[tuple] | str | tuple): palette inputs. num_classes (int): the number of clas
mmdet/visualization/palette.py:25
↓ 12 callersFunctioninit_detector
Initialize a detector from config file. Args: config (str, :obj:`Path`, or :obj:`mmengine.Config`): Config file path, :obj:`P
mmdet/apis/inference.py:26
↓ 12 callersFunctionis_norm
Check if is one of the norms.
tests/test_models/test_backbones/utils.py:19
↓ 12 callersMethodrandom_choice
Random select some elements from the gallery. If `gallery` is a Tensor, the returned indices will be a Tensor; If `gallery` is a ndar
mmdet/models/task_modules/samplers/random_sampler.py:40
↓ 12 callersMethodrandom_magnitude
Randomly generate magnitude.
mmpretrain/datasets/transforms/auto_augment.py:339
↓ 12 callersMethodset_pred_label
Set ``pred_label``.
mmpretrain/structures/data_sample.py:98
↓ 12 callersMethodsummarize
Compute and display summary metrics for evaluation results. Note this function can *only* be applied on the default parameter setting
mmdet/evaluation/functional/ytviseval.py:488
↓ 12 callersMethodtrack
Tracking forward function. Args: model (nn.Module): MOT model. img (Tensor): of shape (T, C, H, W) encoding input ima
mmdet/models/trackers/sort_tracker.py:110
↓ 11 callersMethod_bbox_forward
Box head forward function used in both training and testing. Args: stage (int): The current stage in Cascade RoI Head.
mmdet/models/roi_heads/scnet_roi_head.py:128
↓ 11 callersFunctionaccuracy
Calculate accuracy according to the prediction and target. Args: pred (torch.Tensor): The model prediction, shape (N, num_class)
mmdet/models/losses/accuracy.py:5
↓ 11 callersFunctionbbox_xyxy_to_cxcyah
Convert bbox coordinates from (x1, y1, x2, y2) to (cx, cy, ratio, h). Args: bbox (Tensor): Shape (n, 4) for bboxes. Returns:
mmdet/structures/bbox/transforms.py:470
↓ 11 callersFunctionconvert_box_type
Convert boxes from source type to destination type. If ``boxes`` is a instance of BaseBoxes, the ``src_type`` will be set as the type of ``bo
mmdet/structures/bbox/box_type.py:190
↓ 11 callersMethodprocess
Process one batch of data samples and predictions. The processed results should be stored in ``self.results``, which will be used to c
mmdet/evaluation/metrics/coco_metric.py:346
↓ 11 callersMethodstem
(x)
mmpretrain/models/multimodal/chinese_clip/chinese_clip.py:196
↓ 10 callersMethod_get_chunk_data
Get batch data from dataset. Args: inputs (Iterable): An iterable dataset. chunk_size (int): Equivalent to batch size
mmpretrain/apis/base.py:316
↓ 10 callersFunction_isArrayLike
(obj)
mmdet/evaluation/functional/ytvis.py:39
↓ 10 callersMethod_make_layers
Initialize conv sequential for CornerHead.
mmdet/models/dense_heads/corner_head.py:163
↓ 10 callersMethod_mask_forward
Mask head forward function used in both training and testing. Args: stage (int): The current stage in Cascade RoI Head.
mmdet/models/roi_heads/scnet_roi_head.py:173
↓ 10 callersFunctionall_gather_concat
Gather tensors with different first-dimension size and concat to one tenosr. Note: Only the first dimension should be different.
mmpretrain/models/multimodal/blip/blip_retrieval.py:18
↓ 10 callersFunctionanchor_inside_flags
Check whether the anchors are inside the border. Args: flat_anchors (torch.Tensor): Flatten anchors, shape (n, 4). valid_flags (t
mmdet/models/task_modules/prior_generators/utils.py:10
↓ 10 callersFunctionbatched_index_select
r"""fetches neighbors features from a given neighbor idx Args: x (Tensor): input feature Tensor :math: `\
mmpretrain/models/backbones/vig.py:208
↓ 10 callersFunctioncat_boxes
Concatenate boxes with type of tensor or box type. Args: data_list (List[Union[Tensor, :obj:`BaseBoxes`]]): A list of tensors
mmdet/structures/bbox/transforms.py:356
↓ 10 callersMethodchunk
Reload ``chunk`` from self.tensor.
mmdet/structures/bbox/base_boxes.py:292
↓ 10 callersFunctionfilter_gt_instances
Filter ground truth (GT) instances by score and/or size. Args: batch_data_samples (SampleList): The Data Samples. It usually
mmdet/models/utils/misc.py:516
↓ 10 callersFunctionfilter_scores_and_topk
Filter results using score threshold and topk candidates. Args: scores (Tensor): The scores, shape (num_bboxes, K). score_thr (fl
mmdet/models/utils/misc.py:308
↓ 10 callersMethodgrid_priors
Generate grid points of multiple feature levels. Args: featmap_sizes (list[tuple]): List of feature map sizes in
mmdet/models/task_modules/prior_generators/point_generator.py:133
↓ 10 callersFunctionlist_models
List all models available in MMPretrain. Args: pattern (str | None): A wildcard pattern to match model names. Defaults to Non
mmpretrain/apis/model.py:247
↓ 10 callersMethodload_data_list
Load data list.
mmpretrain/datasets/vsr.py:35
↓ 10 callersMethodprocess
Process one batch of data samples and predictions. The processed results should be stored in ``self.results``, which will be used to
mmdet/evaluation/metrics/coco_video_metric.py:21
↓ 10 callersMethodtrain
Convert the model into training mode while keep normalization layer frozen.
mmdet/models/backbones/mobilenet_v2.py:189
↓ 10 callersMethodtranslate
Translate the BitmapMasks. Args: out_shape (tuple[int]): Shape for output mask, format (h, w). offset (int | float):
mmdet/structures/mask/structures.py:414
↓ 10 callersMethodtranslate_
Translate boxes in-place. Args: distances (Tuple[float, float]): translate distances. The first is horizontal dis
mmdet/structures/bbox/base_boxes.py:399
↓ 9 callersMethodassign
Computes one-to-one matching based on the weighted costs. This method assign each query prediction to a ground truth or background. T
mmdet/models/task_modules/assigners/hungarian_assigner.py:51
↓ 9 callersFunctionbuild_2d_sincos_position_embedding
The function is to build position embedding for model to obtain the position information of the image patches. Args: patches_resoluti
mmpretrain/models/utils/position_encoding.py:123
↓ 9 callersMethoddecode
Apply transformation `pred_bboxes` to `boxes`. Args: bboxes (torch.Tensor or :obj:`BaseBoxes`): Basic boxes. Shape
mmdet/models/task_modules/coders/delta_xywh_bbox_coder.py:163
↓ 9 callersMethodforward
The unified entry for a forward process in both training and test. The method should accept three modes: "tensor", "predict" and "loss":
mmdet/models/detectors/base.py:58
↓ 9 callersMethodget_img_ids
(self, img_ids=[], cat_ids=[])
mmdet/datasets/api_wrappers/coco_api.py:35
↓ 9 callersFunctioninference_detector
Inference image(s) with the detector. Args: model (nn.Module): The loaded detector. imgs (str, ndarray, Sequence[str/ndarray]):
mmdet/apis/inference.py:122
↓ 9 callersMethodloadRes
Load result file and return a result api object. :param resFile (str) : file name of result file :return: res (obj) : r
mmdet/evaluation/functional/ytvis.py:223
↓ 9 callersMethodnew_empty
Reload ``new_empty`` from self.tensor.
mmdet/structures/bbox/base_boxes.py:193
↓ 9 callersMethodnorm2
nn.Module: the normalization layer named "norm2"
mmdet/models/backbones/hrnet.py:408
↓ 9 callersMethodprocess
Process one batch of data samples and predictions. The processed results should be stored in ``self.results``, which will be used to c
mmdet/evaluation/metrics/lvis_metric.py:182
↓ 9 callersMethodtransform
Call function to pad images, masks, semantic segmentation maps. Args: results (dict): Result dict from loading pipeline.
mmdet/datasets/transforms/transforms.py:772
↓ 9 callersMethodvalid_flags
Generate valid flags of anchors in a feature map. Args: featmap_sizes (list(tuple[int, int])): List of feature map sizes in
mmdet/models/task_modules/prior_generators/point_generator.py:63
↓ 8 callersMethod__init__
(self, embed_dim, mlp_ratio, act_cfg=dict(type='HSwish'))
mmpretrain/models/backbones/levit.py:217
↓ 8 callersMethod__init__
(self, in_channels, hidden_channels=None, out_channels=None
mmpretrain/models/backbones/tinyvit.py:337
↓ 8 callersMethod__init__
(self, arch='t', patch_size=4, in_channels=3,
mmpretrain/models/backbones/davit.py:695
↓ 8 callersMethod__init__
(self, embed_dims, window_size, num_heads,
mmpretrain/models/utils/attention.py:76
↓ 8 callersMethod__init__
(self, encoder=None, decoder=None, init_cfg=None)
projects/CO-DETR/codetr/transformer.py:49
↓ 8 callersFunction_construct_bbox
(num_bbox=None)
tests/test_models/test_task_modules/test_iou2d_calculator.py:13
↓ 8 callersMethod_create_dummy_coco_json
(self, json_name)
tests/test_evaluation/test_metrics/test_coco_metric.py:15
↓ 8 callersMethod_create_dummy_lvis_json
(self, json_name)
tests/test_evaluation/test_metrics/test_lvis_metric.py:21
↓ 8 callersMethodadd_pred_to_datasample
Add predictions to `DetDataSample`. Args: data_samples (list[:obj:`DetDataSample`], optional): A batch of data sa
mmdet/models/detectors/base.py:130
↓ 8 callersMethodattention
Attention function.
mmpretrain/models/utils/clip_generator_helper.py:65
↓ 8 callersFunctionbuild_anchor_generator
(cfg, default_args=None)
mmdet/models/task_modules/builder.py:58
↓ 8 callersMethodcombine
(self, x)
projects/EfficientDet/efficientdet/bifpn.py:172
↓ 8 callersMethodconvert_tokens_to_ids
(self, tokens)
mmpretrain/models/utils/tokenizer.py:158
↓ 8 callersMethoddecode
Apply transformation `pred_bboxes` to `boxes`. Args: bboxes (torch.Tensor or :obj:`BaseBoxes`): Basic boxes. Shape
projects/EfficientDet/efficientdet/tensorflow/yxyx_bbox_coder.py:36
↓ 8 callersFunctionencode_mask_results
Encode bitmap mask to RLE code. Args: mask_results (list): bitmap mask results. Returns: list | tuple: RLE encoded mask.
mmdet/structures/mask/utils.py:38
↓ 8 callersMethodgetAnnIds
Get ann ids that satisfy given filter conditions. default skips that filter. :param vidIds (int array) : get anns for given vids
mmdet/evaluation/functional/ytvis.py:104
↓ 8 callersMethodget_ann_ids
(self, img_ids=[], cat_ids=[], area_rng=[], iscrowd=None)
mmdet/datasets/api_wrappers/coco_api.py:29
↓ 8 callersFunctionget_classes
Get class names of a dataset.
mmdet/evaluation/functional/class_names.py:503
↓ 8 callersFunctionget_free_device
()
projects/gradio_demo/launch.py:22
↓ 8 callersMethodis_inside
Find boxes inside the image. Args: img_shape (Tuple[int, int]): A tuple of image height and width. all_inside (bool):
mmdet/structures/bbox/base_boxes.py:471
↓ 8 callersMethodloadAnns
Load anns with the specified ids. :param ids (int array) : integer ids specifying anns :return: anns (object array) : loaded an
mmdet/evaluation/functional/ytvis.py:190
↓ 8 callersMethodloadCats
Load cats with the specified ids. :param ids (int array) : integer ids specifying cats :return: cats (object array) : loaded ca
mmdet/evaluation/functional/ytvis.py:201
↓ 8 callersMethodload_anns
(self, ids)
mmdet/datasets/api_wrappers/coco_api.py:38
↓ 8 callersFunctionparse_requirements
Parse the package dependencies listed in a requirements file but strips specific versioning information. Args: fname (str): path to r
setup.py:56
↓ 8 callersFunctionprint_process_memory
print process memory info.
mmdet/utils/benchmark.py:47
↓ 8 callersFunctionreplace_cfg_vals
Replace the string "${key}" with the corresponding value. Replace the "${key}" with the value of ori_cfg.key in the config. And support repla
mmdet/utils/replace_cfg_vals.py:7
↓ 8 callersMethodreset
Reset the buffer of the tracker.
mmdet/models/trackers/base_tracker.py:33
↓ 8 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()`. If t
projects/XDecoder/xdecoder/utils.py:29
↓ 8 callersMethodsparse_priors
Generate sparse anchors according to the ``prior_idxs``. Args: prior_idxs (Tensor): The index of corresponding anchors
mmdet/models/task_modules/prior_generators/anchor_generator.py:303
↓ 8 callersFunctiontranspose_and_gather_feat
Transpose and gather feature according to index. Args: feat (Tensor): Target feature map. ind (Tensor): Target coord index.
mmdet/models/utils/gaussian_target.py:255
↓ 8 callersFunctionwrapper
(*args, **kwargs)
mmpretrain/apis/utils.py:160
↓ 7 callersMethod__init__
(self, in_channels: int, pool_features: int, conv_cfg: Opti
mmpretrain/models/backbones/inception_v3.py:57
← previousnext →101–200 of 6,823, ranked by callers