MCPcopy Create free account

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

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

↓ 4 callersMethod_mask_forward
Mask head forward function used in both training and testing.
mmdet/models/roi_heads/standard_roi_head.py:181
↓ 4 callersMethod_mask_forward
Mask head forward function used in both training and testing.
projects/models/co_roi_head.py:205
↓ 4 callersFunction_pad
(h, w, c, pad_val, axis=-1, dtype=np.float32)
tests/test_data/test_pipelines/test_transform/test_translate.py:20
↓ 4 callersFunctionanchor_ctr_inside_region_flags
Get the flag indicate whether anchor centers are inside regions.
mmdet/core/bbox/assigners/region_assigner.py:27
↓ 4 callersFunctionarea
(bboxes)
tests/test_data/test_pipelines/test_transform/test_transform.py:245
↓ 4 callersFunctionasync_inference_detector
Async inference image(s) with the detector. Args: model (nn.Module): The loaded detector. img (str | ndarray): Either image files
mmdet/apis/inference.py:160
↓ 4 callersMethodbackward
(ctx, grad_output)
mmdet/models/utils/misc.py:25
↓ 4 callersFunctionbbox_mapping_back
Map bboxes from testing scale to original image scale.
mmdet/core/bbox/transforms.py:63
↓ 4 callersFunctionbuild_linear_layer
Build linear layer. Args: cfg (None or dict): The linear layer config, which should contain: - type (str): Layer type.
mmdet/models/utils/builder.py:17
↓ 4 callersFunctioncalc_region
Calculate region of the box defined by the ratio, the ratio is from the center of the box to every edge.
mmdet/core/bbox/assigners/region_assigner.py:10
↓ 4 callersFunctioncalc_region
Calculate a proportional bbox region. The bbox center are fixed and the new h' and w' is h * ratio and w * ratio. Args: bbox (Tensor
mmdet/core/anchor/utils.py:50
↓ 4 callersFunctiondummy_bboxes
(num, max_height, max_width)
tests/test_utils/test_masks.py:36
↓ 4 callersFunctiondummy_masks
(h, w, num_obj=3, mode='bitmap')
tests/test_runtime/test_config.py:271
↓ 4 callersFunctiondynamic_clip_for_onnx
Clip boxes dynamically for onnx. Since torch.clamp cannot have dynamic `min` and `max`, we scale the boxes by 1/max_shape and clamp in the
mmdet/core/export/onnx_helper.py:7
↓ 4 callersFunctionensure_rng
Coerces input into a random number generator. If the input is None, then a global random state is returned. If the input is a numeric value,
mmdet/utils/util_random.py:6
↓ 4 callersMethodevaluate
Evaluation in COCO Panoptic protocol. Args: results (list[dict]): Testing results of the dataset. metric (str | list[
mmdet/datasets/coco_panoptic.py:568
↓ 4 callersMethodevaluate
Evaluation in COCO protocol. Args: results (list[list | tuple]): Testing results of the dataset. metric (str | list[s
mmdet/datasets/coco.py:592
↓ 4 callersMethodextract_feat
Directly extract features from the backbone+neck.
mmdet/models/detectors/single_stage.py:41
↓ 4 callersMethodflip
see :func:`BaseInstanceMasks.flip`
mmdet/core/mask/structures.py:663
↓ 4 callersMethodforward
(self, x)
tests/test_data/test_datasets/test_common.py:326
↓ 4 callersFunctiongenerate_block_target
(mask_target, boundary_width=3)
mmdet/models/losses/cross_entropy_loss.py:12
↓ 4 callersMethodget_ann_info
Get annotation of concatenated dataset by index. Args: idx (int): Index of data. Returns: dict: Annotation i
mmdet/datasets/dataset_wrappers.py:72
↓ 4 callersMethodget_img_ids
(self, img_ids=[], cat_ids=[])
mmdet/datasets/api_wrappers/coco_api.py:33
↓ 4 callersFunctionget_k_for_topk
Get k of TopK for onnx exporting. The K of TopK in TensorRT should not be a Tensor, while in ONNX Runtime it could be a Tensor.Due to dynam
mmdet/core/export/onnx_helper.py:46
↓ 4 callersMethodinit_weights
(self)
projects/models/transformer.py:590
↓ 4 callersMethodload_anns
Load anns with the specified ids. self.anns is a list of annotation lists instead of a list of annotations. Args:
mmdet/datasets/coco_panoptic.py:89
↓ 4 callersMethodload_imgs
(self, ids)
mmdet/datasets/api_wrappers/coco_api.py:42
↓ 4 callersMethodmake_stage_plugins
Make plugins for ResNet ``stage_idx`` th stage. Currently we support to insert ``context_block``, ``empirical_attention_block``, ``no
mmdet/models/backbones/resnet.py:494
↓ 4 callersFunctionmask2bbox
Obtain tight bounding boxes of binary masks. Args: masks (Tensor): Binary mask of shape (n, h, w). Returns: Tensor: Bboxe wi
mmdet/core/mask/utils.py:68
↓ 4 callersFunctionmodel_aug_test_template
(cfg_file)
tests/test_data/test_pipelines/test_transform/test_models_aug_test.py:13
↓ 4 callersFunctionnlc_to_nchw
Convert [N, L, C] shape tensor to [N, C, H, W] shape tensor. Args: x (Tensor): The input tensor of shape [N, L, C] before conversion.
mmdet/models/utils/transformer.py:34
↓ 4 callersMethodpoints2bbox
Converting the points set into bounding box. :param pts: the input points sets (fields), each points set (fields) is represented
mmdet/models/dense_heads/reppoints_head.py:170
↓ 4 callersMethodprepare_train_img
Get training data and annotations after pipeline. Args: idx (int): Index of data. Returns: dict: Training da
mmdet/datasets/custom.py:226
↓ 4 callersFunctionpreprocess_example_input
Prepare an example input image for ``generate_inputs_and_wrap_model``. Args: input_config (dict): customized config describing the exampl
mmdet/core/export/pytorch2onnx.py:102
↓ 4 callersMethodresize
See :func:`BaseInstanceMasks.resize`.
mmdet/core/mask/structures.py:278
↓ 4 callersMethodresize_feats
Downsample the first feat and upsample last feat in feats.
mmdet/models/dense_heads/solo_head.py:133
↓ 4 callersMethodresults2json
Dump the detection results to a COCO style json file. There are 3 types of results: proposals, bbox predictions, mask predictions, an
mmdet/datasets/coco.py:294
↓ 4 callersFunctionshow_result_pyplot
Visualize the detection results on the image. Args: model (nn.Module): The loaded detector. img (str or np.ndarray): Image filena
mmdet/apis/inference.py:217
↓ 4 callersMethodside_aware_split
Split side-aware features aligned with orders of bucketing targets.
mmdet/models/roi_heads/bbox_heads/sabl_head.py:289
↓ 4 callersMethodsimple_test_bboxes
Test det bboxes without test-time augmentation. Args: feats (tuple[torch.Tensor]): Multi-level features from the
mmdet/models/dense_heads/detr_head.py:676
↓ 4 callersFunctionsingle_gpu_test
(model, data_loader, show=False, out_dir=None,
mmdet/apis/test.py:17
↓ 4 callersMethodsparse_priors
Generate sparse points according to the ``prior_idxs``. Args: prior_idxs (Tensor): The index of corresponding anchors
mmdet/core/anchor/point_generator.py:234
↓ 4 callersFunctionsync_random_seed
Make sure different ranks share the same seed. All workers must call this function, otherwise it will deadlock. This method is generally used
mmdet/core/utils/dist_utils.py:157
↓ 4 callersFunctiontpfp_openimages
Check if detected bboxes are true positive or false positive. Args: det_bbox (ndarray): Detected bboxes of this image, of shape (m, 5).
mmdet/core/evaluation/mean_ap.py:272
↓ 4 callersMethodxyxy2xywh
Convert ``xyxy`` style bounding boxes to ``xywh`` style for COCO evaluation. Args: bbox (numpy.ndarray): The bounding box
mmdet/datasets/coco.py:204
↓ 3 callersMethod__init__
(self, in_channels, out_channels, num_outs,
mmdet/models/necks/fpg.py:150
↓ 3 callersMethod__init__
(self, groups=1, base_width=4, radix=2, re
mmdet/models/backbones/resnest.py:299
↓ 3 callersMethod__init__
(self, depth, in_channels=3, stem_channels=None,
mmdet/models/backbones/resnet.py:369
↓ 3 callersMethod__init__
(self, num_classes, in_channels, anchor_generator=dict(
mmdet/models/dense_heads/yolact_head.py:44
↓ 3 callersMethod__init__
(self, *args, **kwargs)
projects/models/transformer.py:564
↓ 3 callersMethod__init__
(self)
tests/test_utils/test_hook.py:29
↓ 3 callersMethod_add_conv_fc_branch
Add shared or separable branch. convs -> avg pool (optional) -> fcs
mmdet/models/roi_heads/bbox_heads/convfc_bbox_head.py:118
↓ 3 callersMethod_add_fc_branch
(self, num_branch_fcs, in_channels, roi_feat_size, fc_out_channels)
mmdet/models/roi_heads/bbox_heads/sabl_head.py:221
↓ 3 callersMethod_bbox_forward
Box head forward function used in both training and testing. Returns all regression, classification results and a intermediate feature.
mmdet/models/roi_heads/sparse_roi_head.py:88
↓ 3 callersMethod_bbox_forward
Box head forward function used in both training and testing.
mmdet/models/roi_heads/standard_roi_head.py:118
↓ 3 callersMethod_bbox_forward
Box head forward function used in both training and testing.
projects/models/co_roi_head.py:142
↓ 3 callersMethod_bboxes_nms
(self, cls_scores, bboxes, score_factor, cfg)
mmdet/models/dense_heads/yolox_head.py:313
↓ 3 callersMethod_build_head
Build head for each branch.
mmdet/models/dense_heads/centernet_head.py:64
↓ 3 callersFunction_check_roi_extractor
(config, roi_extractor, prev_roi_extractor=None)
tests/test_runtime/test_config.py:116
↓ 3 callersFunction_create_mask
(N, h, w)
tests/test_utils/test_nms.py:7
↓ 3 callersMethod_decode_init_proposals
Decode init_proposal_bboxes according to the size of images and expand dimension of init_proposal_features to batch_size. Args:
mmdet/models/dense_heads/embedding_rpn_head.py:54
↓ 3 callersMethod_init_cls_convs
Initialize classification conv layers of the head.
mmdet/models/dense_heads/anchor_free_head.py:113
↓ 3 callersMethod_init_reg_convs
Initialize bbox regression conv layers of the head.
mmdet/models/dense_heads/anchor_free_head.py:133
↓ 3 callersMethod_make_stage
(self, layer_config, in_channels, multiscale_output=True)
mmdet/models/backbones/hrnet.py:505
↓ 3 callersMethod_make_transition_layer
(self, num_channels_pre_layer, num_channels_cur_layer)
mmdet/models/backbones/hrnet.py:412
↓ 3 callersMethod_mask_forward
Mask head forward function used in both training and testing.
mmdet/models/roi_heads/sparse_roi_head.py:151
↓ 3 callersMethod_mask_forward_train
Run forward function and calculate loss for mask head in training.
mmdet/models/roi_heads/scnet_roi_head.py:179
↓ 3 callersMethod_meshgrid
Generate mesh grid of x and y. Args: x (torch.Tensor): Grids of x dimension. y (torch.Tensor): Grids of y dimension.
mmdet/core/anchor/anchor_generator.py:196
↓ 3 callersMethod_split_cls_score
(self, cls_score)
mmdet/models/losses/seesaw_loss.py:138
↓ 3 callersMethodanchor_center
Get anchor centers from anchors. Args: anchors (Tensor): Anchor list with shape (N, 4), "xyxy" format. Returns:
mmdet/models/dense_heads/gfl_head.py:205
↓ 3 callersMethodassign_wrt_overlaps
Assign w.r.t. the overlaps of bboxes with gts. Args: overlaps (Tensor): Overlaps between k gt_bboxes and n bboxes,
mmdet/core/bbox/assigners/max_iou_assigner.py:133
↓ 3 callersMethodaug_test_bboxes
Test det bboxes with test time augmentation, can be applied in DenseHead except for ``RPNHead`` and its variants, e.g., ``GARPNHead``,
mmdet/models/dense_heads/dense_test_mixins.py:41
↓ 3 callersMethodaug_test_rpn
Augmented forward test function.
mmdet/models/dense_heads/cascade_rpn_head.py:798
↓ 3 callersFunctionbbox2fields
The key correspondence from bboxes to labels, masks and segmentations.
mmdet/datasets/pipelines/auto_augment.py:29
↓ 3 callersFunctionbuild_transformer
Builder for Transformer.
mmdet/models/utils/builder.py:9
↓ 3 callersFunctioncarl_loss
Classification-Aware Regression Loss (CARL). Args: cls_score (Tensor): Predicted classification scores. labels (Tensor): Targets
mmdet/models/losses/pisa_loss.py:123
↓ 3 callersFunctioncenter_of_mass
Calculate the centroid coordinates of the mask. Args: mask (Tensor): The mask to be calculated, shape (h, w). esp (float): Avoid
mmdet/core/utils/misc.py:168
↓ 3 callersFunctioncompat_cfg
This function would modify some filed to keep the compatibility of config. For example, it will move some args which will be deprecated to th
mmdet/utils/compat_config.py:8
↓ 3 callersFunctioncompleted
Async context manager that waits for work to complete on given CUDA streams.
mmdet/utils/contextmanagers.py:17
↓ 3 callersFunctionconstruct_toy_data
(poly2mask=True)
tests/test_data/test_pipelines/test_transform/test_translate.py:135
↓ 3 callersFunctionconvert_bn
(blobs, state_dict, caffe_name, torch_name, converted_names)
tools/model_converters/detectron2pytorch.py:11
↓ 3 callersFunctionconvert_conv_fc
(blobs, state_dict, caffe_name, torch_name, converted_names)
tools/model_converters/detectron2pytorch.py:24
↓ 3 callersMethodcrop
see :func:`BaseInstanceMasks.crop`
mmdet/core/mask/structures.py:687
↓ 3 callersFunctionenhance_level_to_value
Map from level to values.
mmdet/datasets/pipelines/auto_augment.py:19
↓ 3 callersMethodevaluate
Evaluate in VOC protocol. Args: results (list[list | tuple]): Testing results of the dataset. metric (str | list[str]
mmdet/datasets/voc.py:34
↓ 3 callersMethodevaluate
Evaluate in OpenImages. Args: results (list[list | tuple]): Testing results of the dataset. metric (str | list[str]):
mmdet/datasets/openimages.py:615
↓ 3 callersFunctionfcos_config
FCOS Head Config.
tests/test_onnx/test_head.py:243
↓ 3 callersFunctionfind_inside_bboxes
Find bboxes as long as a part of bboxes is inside the image. Args: bboxes (Tensor): Shape (N, 4). img_h (int): Image height.
mmdet/core/bbox/transforms.py:6
↓ 3 callersFunctionfp16_clamp
(x, min=None, max=None)
mmdet/core/bbox/iou_calculators/iou2d_calculator.py:14
↓ 3 callersFunctionfsaf_config
FSAF Head Config.
tests/test_onnx/test_head.py:311
↓ 3 callersFunctiongather_feat
Gather feature according to index. Args: feat (Tensor): Target feature map. ind (Tensor): Target coord index. mask (Tenso
mmdet/models/utils/gaussian_target.py:234
↓ 3 callersMethodgen_encoder_output_proposals
Generate proposals from encoded memory. Args: memory (Tensor) : The output of encoder, has shape (bs, num_key, em
mmdet/models/utils/transformer.py:759
↓ 3 callersFunctiongen_gaussian_target
Generate 2D gaussian heatmap. Args: heatmap (Tensor): Input heatmap, the gaussian kernel will cover on it and maintain the ma
mmdet/models/utils/gaussian_target.py:32
↓ 3 callersMethodget_ann_info
Get annotation by index. Args: idx (int): Index of data. Returns: dict: Annotation info of specified index.
mmdet/datasets/custom.py:145
↓ 3 callersMethodget_ann_info
Get annotation of repeat dataset by index. Args: idx (int): Index of data. Returns: dict: Annotation info of
mmdet/datasets/dataset_wrappers.py:192
↓ 3 callersMethodget_ann_info
Get OpenImages annotation by index. Args: idx (int): Index of data. Returns: dict: Annotation info of specif
mmdet/datasets/openimages.py:220
↓ 3 callersMethodget_bboxes
Transform network outputs for a batch into bbox predictions. Args: all_cls_scores (Tensor): Classification score of all
projects/models/co_deformable_detr_head.py:721
↓ 3 callersMethodget_cat_ids
Get category ids of repeat dataset by index. Args: idx (int): Index of data. Returns: list[int]: All categor
mmdet/datasets/dataset_wrappers.py:180
↓ 3 callersMethodget_cls_channels
Get custom classification channels. Args: num_classes (int): The number of classes. Returns: int: The custom
mmdet/models/losses/seesaw_loss.py:145
↓ 3 callersFunctionget_device
Returns an available device, cpu, cuda or mlu.
mmdet/utils/util_distribution.py:67
← previousnext →201–300 of 2,920, ranked by callers