MCPcopy Create free account

hub / github.com/Sense-X/Co-DETR / functions

Functions2,920 in github.com/Sense-X/Co-DETR

↓ 487 callersMethodcat
Concat the predictions of all :obj:`InstanceData` in the list. Args: instances_list (list[:obj:`InstanceData`]): A list
mmdet/core/data_structures/instance_data.py:151
↓ 326 callersMethodget
(self, *args)
mmdet/core/data_structures/general_data.py:231
↓ 128 callersMethodpop
(self, *args)
mmdet/core/data_structures/general_data.py:235
↓ 103 callersMethodto
Apply same name function to all tensors in data_fields.
mmdet/core/data_structures/general_data.py:257
↓ 102 callersMethoditems
(self)
mmdet/core/data_structures/general_data.py:187
↓ 89 callersMethoddetach
Apply same name function to all tensors in data_fields.
mmdet/core/data_structures/general_data.py:297
↓ 87 callersMethodcuda
Apply same name function to all tensors in data_fields.
mmdet/core/data_structures/general_data.py:287
↓ 85 callersFunctionbuild_loss
Build loss.
mmdet/models/builder.py:43
↓ 85 callersMethodcpu
Apply same name function to all tensors in data_fields.
mmdet/core/data_structures/general_data.py:267
↓ 82 callersFunctionmulti_apply
Apply function to a list of arguments. Note: This function applies the ``func`` to multiple inputs and map the multiple outputs o
mmdet/core/utils/misc.py:11
↓ 69 callersMethodnumpy
Apply same name function to all tensors in data_fields.
mmdet/core/data_structures/general_data.py:307
↓ 66 callersMethodassign
Assign gt to bboxes. The assignment is done in following steps 1. compute iou between all bbox (bbox of all pyramid levels) and gt
mmdet/core/bbox/assigners/atss_assigner.py:52
↓ 64 callersMethodloss
Compute losses of the head. Args: cls_scores (list[Tensor]): Cls and quality scores for each scale level has shap
mmdet/models/dense_heads/ld_head.py:185
↓ 62 callersMethodexpand
See :func:`BaseInstanceMasks.expand`.
mmdet/core/mask/structures.py:369
↓ 61 callersMethoddecode
Decode the predicted bboxes according to prediction and base boxes.
mmdet/core/bbox/coder/base_bbox_coder.py:16
↓ 61 callersFunctionimages_to_levels
Convert targets by image to targets by feature level. [target_img0, target_img1] -> [target_level0, target_level1, ...]
mmdet/core/anchor/utils.py:5
↓ 59 callersFunctionbbox2roi
Convert a list of bboxes to roi format. Args: bbox_list (list[Tensor]): a list of bboxes corresponding to a batch of images.
mmdet/core/bbox/transforms.py:75
↓ 56 callersMethodforward
(self, x)
tests/test_utils/test_hook.py:34
↓ 50 callersFunctionunmap
Unmap a subset of item (data) back to the original set of items (of size count)
mmdet/core/utils/misc.py:33
↓ 48 callersMethodkeys
Returns: list: Contains all keys in data_fields.
mmdet/core/data_structures/general_data.py:159
↓ 45 callersMethodto_ndarray
See :func:`BaseInstanceMasks.to_ndarray`.
mmdet/core/mask/structures.py:503
↓ 41 callersFunctiondigit_version
(version_str)
mmdet/__init__.py:7
↓ 37 callersFunctionreduce_mean
Obtain the mean of tensor on different GPUs.
mmdet/core/utils/dist_utils.py:68
↓ 36 callersMethodsample
Sample positive and negative bboxes. This is a simple implementation of bbox sampling given candidates, assigning results and ground
mmdet/core/bbox/samplers/base_sampler.py:35
↓ 35 callersFunctionbuild_head
Build head.
mmdet/models/builder.py:38
↓ 34 callersMethodvalues
Returns: list: Contains all values in data_fields.
mmdet/core/data_structures/general_data.py:173
↓ 33 callersFunctionbbox_overlaps
Calculate the ious between each bbox of bboxes1 and bboxes2. Args: bboxes1 (ndarray): Shape (n, 4) bboxes2 (ndarray): Shape (k, 4
mmdet/core/evaluation/bbox_overlaps.py:5
↓ 32 callersMethodtrain
Convert the model into training mode will keeping the normalization layer freezed.
mmdet/models/backbones/hrnet.py:581
↓ 31 callersMethodnew
Return a new results with same image meta information. Args: meta_info (dict, optional): A dict contains the meta information
mmdet/core/data_structures/general_data.py:141
↓ 29 callersMethodinfo
dict: a dictionary of info about the object
mmdet/core/bbox/assigners/assign_result.py:66
↓ 27 callersFunctionbuild_detector
Build detector.
mmdet/models/builder.py:48
↓ 27 callersMethodextract_feat
Extract features. Args: img (torch.Tensor): Image tensor with shape (n, c, h ,w). Returns: list[torch.Tensor
mmdet/models/detectors/rpn.py:39
↓ 26 callersFunctionbbox2result
Convert detection results to a list of numpy arrays. Args: bboxes (torch.Tensor | np.ndarray): shape (n, 5) labels (torch.Tensor
mmdet/core/bbox/transforms.py:116
↓ 26 callersFunctionbbox_cxcywh_to_xyxy
Convert bbox coordinates from (cx, cy, w, h) to (x1, y1, x2, y2). Args: bbox (Tensor): Shape (n, 4) for bboxes. Returns: Ten
mmdet/core/bbox/transforms.py:245
↓ 26 callersFunctionbuild_assigner
Builder of box assigner.
mmdet/core/bbox/builder.py:9
↓ 26 callersFunctiondummy_raw_bitmap_masks
Args: size (tuple): expected shape of dummy masks, (H, W) or (N, H, W) Return: ndarray: dummy mask
tests/test_utils/test_masks.py:9
↓ 26 callersMethodrandom
Generate random bitmap masks for demo / testing purposes. Example: >>> from mmdet.core.mask.structures import BitmapMasks
mmdet/core/mask/structures.py:512
↓ 26 callersMethodto
Change the device of the data inplace. Example: >>> self = SamplingResult.random() >>> print(f'self = {self.to(None)}
mmdet/core/bbox/samplers/sampling_result.py:57
↓ 25 callersFunctionbuild_sampler
Builder of box sampler.
mmdet/core/bbox/builder.py:14
↓ 23 callersMethodflip
See :func:`BaseInstanceMasks.flip`.
mmdet/core/mask/structures.py:290
↓ 22 callersFunctiondummy_raw_polygon_masks
Args: size (tuple): expected shape of dummy masks, (N, H, W) Return: list[list[ndarray]]: dummy mask
tests/test_utils/test_masks.py:20
↓ 22 callersFunctionort_validate
Validate the output of the onnxruntime backend is the same as the output generated by torch. Args: model (nn.Module | function): the
tests/test_onnx/utils.py:32
↓ 20 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:12
↓ 20 callersMethodgrid_priors
Generate grid anchors in multiple feature levels. Args: featmap_sizes (list[tuple]): List of feature map sizes in
mmdet/core/anchor/anchor_generator.py:216
↓ 19 callersFunctionbuild_dataset
(cfg, default_args=None)
mmdet/datasets/builder.py:59
↓ 18 callersMethodencode
Encode deltas between bboxes and ground truth boxes.
mmdet/core/bbox/coder/base_bbox_coder.py:12
↓ 18 callersMethodget_anchors
Get anchors according to feature map sizes. Args: featmap_sizes (list[tuple]): Multi-level feature map sizes. img_met
mmdet/models/dense_heads/vfnet_head.py:568
↓ 18 callersMethodloss
Loss function of DIIHead, get loss of all images. Args: cls_score (Tensor): Classification prediction results of
mmdet/models/roi_heads/bbox_heads/dii_head.py:201
↓ 17 callersMethod_parse_losses
Parse the raw outputs (losses) of the network. Args: losses (dict): Raw output of the network, which usually contain
mmdet/models/detectors/base.py:176
↓ 17 callersFunctionbbox_xyxy_to_cxcywh
Convert bbox coordinates from (x1, y1, x2, y2) to (cx, cy, w, h). Args: bbox (Tensor): Shape (n, 4) for bboxes. Returns: Ten
mmdet/core/bbox/transforms.py:259
↓ 16 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:7
↓ 15 callersFunctioncheck_result_same
Check whether the `pipeline_results` is the same with the predefined `results`. Args: results (dict): Predefined results which should
tests/test_data/test_pipelines/test_transform/utils.py:18
↓ 15 callersMethodforward_plugin
(self, x, plugin_names)
mmdet/models/backbones/resnet.py:242
↓ 15 callersMethodget_targets
Calculate the ground truth for all samples in a batch according to the sampling_results. Almost the same as the implementation in bbo
mmdet/models/roi_heads/bbox_heads/dii_head.py:359
↓ 15 callersMethodinit_weights
(self)
mmdet/models/necks/rfp.py:105
↓ 15 callersMethodpad
See :func:`BaseInstanceMasks.pad`.
mmdet/core/mask/structures.py:303
↓ 14 callersFunctionconstruct_toy_data
(poly2mask=True)
tests/test_data/test_pipelines/test_transform/utils.py:42
↓ 14 callersFunctioncreate_random_bboxes
(num_bboxes, img_w, img_h)
tests/test_data/test_pipelines/test_transform/utils.py:72
↓ 14 callersMethodgrid_anchors
Generate grid anchors in multiple feature levels. Args: featmap_sizes (list[tuple]): List of feature map sizes in
mmdet/core/anchor/anchor_generator.py:318
↓ 14 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/dense_heads/paa_head.py:18
↓ 13 callersFunction_demo_mm_inputs
Create a superset of inputs needed to run test or train batches. Args: input_shape (tuple): input batch dimensions n
tests/test_models/test_forward.py:440
↓ 13 callersFunctionbuild_roi_extractor
Build roi extractor.
mmdet/models/builder.py:28
↓ 13 callersMethodevaluate
(self, results, logger=None)
tests/test_runtime/test_eval_hook.py:38
↓ 13 callersMethodget_bboxes
(self)
mmdet/core/mask/structures.py:532
↓ 13 callersMethodget_seg_masks
Get segmentation masks from mask_pred and bboxes. Args: mask_pred (Tensor or ndarray): shape (n, #class, h, w). F
mmdet/models/roi_heads/mask_heads/fcn_mask_head.py:179
↓ 13 callersMethodget_targets
Get targets for ATSS head. This method is almost the same as `AnchorHead.get_targets()`. Besides returning the targets as the parent
projects/models/co_atss_head.py:316
↓ 13 callersFunctionis_block
Check if is ResNet building block.
tests/test_models/test_backbones/utils.py:11
↓ 13 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
↓ 13 callersFunctionweight_reduce_loss
Apply element-wise weight and reduce loss. Args: loss (Tensor): Element-wise loss. weight (Tensor): Element-wise weights.
mmdet/models/losses/utils.py:30
↓ 12 callersFunction_get_detector_cfg
Grab configs necessary to create a detector. These are deep copied to allow for safe modification of parameters without influencing other tes
tests/test_models/test_forward.py:35
↓ 12 callersFunction_print
(result, ap=1, iouThr=None, areaRng='all', maxDets=100)
tools/analysis_tools/robustness_eval.py:11
↓ 12 callersFunctionfloordiv
(dividend, divisor, rounding_mode='trunc')
mmdet/utils/misc.py:85
↓ 12 callersFunctioninit_detector
Initialize a detector from config file. Args: config (str, :obj:`Path`, or :obj:`mmcv.Config`): Config file path, :obj:`Path`
mmdet/apis/inference.py:19
↓ 12 callersMethodset_meta_info
Add meta information. Args: meta_info (dict): A dict contains the meta information of image. such as `img_shape`,
mmdet/core/data_structures/general_data.py:97
↓ 11 callersFunction_equal
(a, b)
tests/test_utils/test_general_data.py:10
↓ 11 callersMethod_mask_forward
Mask head forward function used in both training and testing.
mmdet/models/roi_heads/scnet_roi_head.py:125
↓ 11 callersFunctionbbox_mapping
Map bboxes from the original image scale to testing scale.
mmdet/core/bbox/transforms.py:51
↓ 11 callersFunctionbuild_prior_generator
(cfg, default_args=None)
mmdet/core/anchor/builder.py:11
↓ 11 callersMethodget_bboxes
(self, det_bboxes, grid_pred, img_metas)
mmdet/models/roi_heads/mask_heads/grid_head.py:298
↓ 11 callersFunctionget_root_logger
Get root logger. Args: log_file (str, optional): File path of log. Defaults to None. log_level (int, optional): The level of logg
mmdet/utils/logger.py:8
↓ 11 callersFunctionmask_matrix_nms
Matrix NMS for multi-class masks. Args: masks (Tensor): Has shape (num_instances, h, w) labels (Tensor): Labels of corresponding
mmdet/core/post_processing/matrix_nms.py:5
↓ 11 callersFunctionmulticlass_nms
NMS for multi-class bboxes. Args: multi_bboxes (Tensor): shape (n, #class*4) or (n, 4) multi_scores (Tensor): shape (n, #class),
mmdet/core/post_processing/bbox_nms.py:8
↓ 11 callersMethodnorm1
nn.Module: the normalization layer named "norm1"
mmdet/models/backbones/hrnet.py:403
↓ 11 callersMethodshow_result
Show RPN proposals on the image. Args: data (str or np.ndarray): Image filename or loaded image. result (Tensor or tu
mmdet/models/detectors/rpn.py:142
↓ 10 callersMethod_make_layers
Initialize conv sequential for CornerHead.
mmdet/models/dense_heads/corner_head.py:158
↓ 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/core/anchor/utils.py:21
↓ 10 callersFunctiondistance2bbox
Decode distance prediction to bounding box. Args: points (Tensor): Shape (B, N, 2) or (N, 2). distance (Tensor): Distance from th
mmdet/core/bbox/transforms.py:136
↓ 10 callersMethodget_targets
Get targets for PAA head. This method is almost the same as `AnchorHead.get_targets()`. We direct return the results from _get_target
mmdet/models/dense_heads/paa_head.py:402
↓ 10 callersMethodgrid_priors
Generate grid points of multiple feature levels. Args: featmap_sizes (list[tuple]): List of feature map sizes in
mmdet/core/anchor/point_generator.py:80
↓ 10 callersFunctioninverse_sigmoid
Inverse function of sigmoid. Args: x (Tensor): The tensor to do the inverse. eps (float): EPS avoid numerical
projects/models/transformer.py:16
↓ 10 callersFunctionload
(module, prefix='')
mmcv_custom/checkpoint.py:65
↓ 10 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/core/bbox/samplers/random_sampler.py:32
↓ 10 callersFunctionreplace_ImageToTensor
Replace the ImageToTensor transform in a data pipeline to DefaultFormatBundle, which is normally useful in batch inference. Args: pip
mmdet/datasets/utils.py:15
↓ 10 callersMethodto_ndarray
Convert masks to the format of ndarray.
mmdet/core/mask/structures.py:900
↓ 10 callersMethodtrain
Convert the model into training mode while keep normalization layer frozen.
mmdet/models/backbones/mobilenet_v2.py:188
↓ 9 callersMethod__init__
( self, in_channels=3, embed_dims=768, conv_type='Conv2d', kernel_size
mmdet/models/utils/transformer.py:164
↓ 9 callersMethod_bbox_forward
Box forward function used in both training and testing.
mmdet/models/roi_heads/pisa_roi_head.py:87
↓ 9 callersFunction_build_demo_runner
(runner_type='EpochBasedRunner', max_epochs=1, max_iters=None,
tests/test_utils/test_hook.py:68
↓ 9 callersFunction_build_demo_runner
()
tests/test_data/test_datasets/test_common.py:318
↓ 9 callersMethodassign
Assign gt to bboxes. This method assign a gt bbox to every bbox (proposal/anchor), each bbox will be assigned with -1, or a semi-posi
mmdet/core/bbox/assigners/max_iou_assigner.py:66
next →1–100 of 2,920, ranked by callers