MCPcopy Create free account

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

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

↓ 9 callersFunctionbuild_bbox_coder
Builder of box coder.
mmdet/core/bbox/builder.py:19
↓ 9 callersMethodforward_train
Args: img (Tensor): Input images of shape (N, C, H, W). Typically these should be mean centered and std scaled.
mmdet/models/detectors/lad.py:54
↓ 9 callersFunctionis_norm
Check if is one of the norms.
tests/test_models/test_backbones/utils.py:19
↓ 9 callersFunctionload_checkpoint
Load checkpoint from a file or URI. Args: model (Module): Module to load checkpoint. filename (str): Accept local filepath, URL, `
mmcv_custom/checkpoint.py:282
↓ 9 callersFunctionselect_single_mlvl
Extract a multi-scale single image tensor from a multi-scale batch tensor based on batch index. Note: The default value of detach is True, be
mmdet/core/utils/misc.py:88
↓ 9 callersFunctionupdate_data_root
Update data root according to env MMDET_DATASETS. If set env MMDET_DATASETS, update cfg.data_root according to MMDET_DATASETS. Otherwise, usi
mmdet/utils/misc.py:46
↓ 8 callersFunction_construct_bbox
(num_bbox=None)
tests/test_metrics/test_box_overlap.py:13
↓ 8 callersFunctionbuild_anchor_generator
(cfg, default_args=None)
mmdet/core/anchor/builder.py:15
↓ 8 callersFunctionbuild_backbone
Build backbone.
mmdet/models/builder.py:18
↓ 8 callersFunctioneval_map
Evaluate mAP of a dataset. Args: det_results (list[list]): [[cls1_det, cls2_det, ...], ...]. The outer list indicates images,
mmdet/core/evaluation/mean_ap.py:525
↓ 8 callersFunctioneval_recalls
Calculate recalls. Args: gts (list[ndarray]): a list of arrays of shape (n, 4) proposals (list[ndarray]): a list of arrays of sha
mmdet/core/evaluation/recall.py:65
↓ 8 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/core/utils/misc.py:119
↓ 8 callersFunctionfpn_neck_config
Return the class containing the corresponding attributes according to the fpn_test_step_names.
tests/test_onnx/test_neck.py:35
↓ 8 callersFunctionimshow_det_bboxes
Draw bboxes and class labels (with scores) on an image. Args: img (str | ndarray): The image to be displayed. bboxes (ndarray): B
mmdet/core/visualization/image.py:208
↓ 8 callersFunctioninference_detector
Inference image(s) with the detector. Args: model (nn.Module): The loaded detector. imgs (str/ndarray or list[str/ndarray] or tup
mmdet/apis/inference.py:94
↓ 8 callersFunctionlog_img_scale
Log image size. Args: img_scale (tuple): Image size to be logged. shape_order (str, optional): The order of image shape.
mmdet/utils/logger.py:37
↓ 8 callersMethodsimple_test
Test function without test time augmentation. Args: imgs (list[torch.Tensor]): List of multiple images img_metas (lis
mmdet/models/detectors/rpn.py:91
↓ 8 callersMethodsparse_priors
Generate sparse anchors according to the ``prior_idxs``. Args: prior_idxs (Tensor): The index of corresponding anchors
mmdet/core/anchor/anchor_generator.py:283
↓ 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 callersMethodvalid_flags
(self, featmap_size, valid_size, device='cuda')
mmdet/core/anchor/point_generator.py:30
↓ 8 callersFunctionwrapper
(pred, target, weight=None, reduction='mean',
mmdet/models/losses/utils.py:94
↓ 7 callersFunction_replace_r50_with_r18
Replace ResNet50 with ResNet18 in config.
tests/test_models/test_forward.py:46
↓ 7 callersFunctionbuild_iou_calculator
Builder of IoU calculator.
mmdet/core/bbox/iou_calculators/builder.py:7
↓ 7 callersFunctionbuild_neck
Build neck.
mmdet/models/builder.py:23
↓ 7 callersMethodbuild_trans
(self, cfg, in_channels, out_channels, **extra_args)
mmdet/models/necks/fpg.py:317
↓ 7 callersFunctioncompat_loader_args
Deprecated sample_per_gpu in cfg.data.
mmdet/utils/compat_config.py:54
↓ 7 callersMethoddecode
Apply transformation `pred_bboxes` to `boxes`. Args: bboxes (torch.Tensor): Basic boxes. Shape (B, N, 4) or (N, 4) pr
mmdet/core/bbox/coder/delta_xywh_bbox_coder.py:65
↓ 7 callersFunctionflip_tensor
flip tensor base on flip_direction. Args: src_tensor (Tensor): input feature map, shape (B, C, H, W). flip_direction (str): The f
mmdet/core/utils/misc.py:65
↓ 7 callersMethodformat_results
Format the results to json (standard format for COCO evaluation). Args: results (list[tuple | numpy.ndarray]): Testing results of
mmdet/datasets/coco.py:358
↓ 7 callersMethodget_bboxes
(self, cls_scores, bbox_preds, score_factors=None,
mmdet/models/dense_heads/paa_head.py:521
↓ 7 callersFunctionmask2ndarray
Convert Mask to ndarray.. Args: mask (:obj:`BitmapMasks` or :obj:`PolygonMasks` or torch.Tensor or np.ndarray): The mask to be co
mmdet/core/utils/misc.py:46
↓ 7 callersFunctionmerge_aug_masks
Merge augmented mask prediction. Args: aug_masks (list[ndarray]): shape (n, #class, h, w) img_shapes (list[ndarray]): shape (3, )
mmdet/core/post_processing/merge_augs.py:121
↓ 7 callersMethodregress_by_class
Regress the bbox for the predicted class. Used in Cascade R-CNN. Args: rois (Tensor): Rois from `rpn_head` or last stage
mmdet/models/roi_heads/bbox_heads/bbox_head.py:460
↓ 7 callersMethodset_extra_property
Set user-defined new property.
mmdet/core/bbox/assigners/assign_result.py:56
↓ 7 callersMethodsimple_test_rpn
Simple forward test function.
mmdet/models/dense_heads/cascade_rpn_head.py:773
↓ 7 callersMethodtrain
(self, mode=True)
mmdet/models/backbones/csp_darknet.py:269
↓ 6 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
projects/models/swin_transformer.py:24
↓ 6 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:620
↓ 6 callersFunction_create_dummy_results
()
tests/test_data/test_datasets/test_common.py:96
↓ 6 callersFunctionadaptive_avg_pool2d
Handle empty batch dimension to adaptive_avg_pool2d. Args: input (tensor): 4D tensor. output_size (int, tuple[int,int]): the targ
mmdet/models/utils/brick_wrappers.py:15
↓ 6 callersFunctionbbox_overlaps
Calculate overlap between two set of bboxes. FP16 Contributed by https://github.com/open-mmlab/mmdetection/pull/4889 Note: Assume bbo
mmdet/core/bbox/iou_calculators/iou2d_calculator.py:74
↓ 6 callersFunctionbuild_dataloader
Build PyTorch DataLoader. In distributed training, each GPU/process has a dataloader. In non-distributed training, there is only one dataload
mmdet/datasets/builder.py:91
↓ 6 callersFunctionbuild_match_cost
Builder of IoU calculator.
mmdet/core/bbox/match_costs/builder.py:7
↓ 6 callersFunctioncheck_norm_state
Check if norm layer is in correct train state.
tests/test_models/test_backbones/utils.py:26
↓ 6 callersMethoddecode
Apply transformation `pred_bboxes` to `boxes`. Args: bboxes (torch.Tensor): Basic boxes.Shape (B, N, 4) or (N, 4) pre
mmdet/core/bbox/coder/tblr_bbox_coder.py:50
↓ 6 callersMethodextract_feat
Directly extract features from the backbone+neck.
projects/models/co_detr.py:131
↓ 6 callersMethodextract_feats
Extract features from multiple images. Args: imgs (list[torch.Tensor]): A list of images. The images are augmente
mmdet/models/detectors/base.py:50
↓ 6 callersFunctionfind_latest_checkpoint
Find the latest checkpoint from the working directory. Args: path(str): The path to find checkpoints. suffix(str): File extension
mmdet/utils/misc.py:12
↓ 6 callersMethodget_activation
Get custom activation of cls_score. Args: cls_score (torch.Tensor): The prediction with shape (N, C + 2). Returns:
mmdet/models/losses/seesaw_loss.py:157
↓ 6 callersMethodget_ann_info
Get COCO annotation by index. Args: idx (int): Index of data. Returns: dict: Annotation info of specified in
mmdet/datasets/coco.py:91
↓ 6 callersMethodmake_block_plugins
make plugins for block. Args: in_channels (int): Input channels of plugin. plugins (list[dict]): List of plugins cfg
mmdet/models/backbones/resnet.py:219
↓ 6 callersMethodmeta_info_items
(self)
mmdet/core/data_structures/general_data.py:191
↓ 6 callersMethodmeta_info_keys
Returns: list: Contains all keys in meta_info_fields.
mmdet/core/data_structures/general_data.py:166
↓ 6 callersMethodnorm2
nn.Module: the normalization layer named "norm2"
mmdet/models/backbones/hrnet.py:408
↓ 6 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
↓ 6 callersMethodrefine_bboxes
Refine bboxes during training. Args: rois (Tensor): Shape (n*bs, 5), where n is image number per GPU, and bs is t
mmdet/models/roi_heads/bbox_heads/bbox_head.py:381
↓ 6 callersMethodresize
see :func:`BaseInstanceMasks.resize`
mmdet/core/mask/structures.py:644
↓ 6 callersFunctionsetup_multi_processes
Setup multi-processing environment variables.
mmdet/utils/setup_env.py:10
↓ 6 callersMethodto_tensor
See :func:`BaseInstanceMasks.to_tensor`.
mmdet/core/mask/structures.py:507
↓ 5 callersMethod__init__
Args: img_size (int): Input image size. patch_size (int): Patch size. in_chans (int): Number of input ima
mmdet/models/backbones/vit.py:464
↓ 5 callersMethod__init__
(self, embed_dims, feedforward_channels, act_cfg=dict(type=
mmdet/models/backbones/pvt.py:47
↓ 5 callersMethod_bbox_forward
Box head forward function used in both training and testing.
mmdet/models/roi_heads/scnet_roi_head.py:96
↓ 5 callersMethod_bbox_forward
Box head forward function used in both training and testing.
mmdet/models/roi_heads/cascade_roi_head.py:130
↓ 5 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_downstream/test_mmtrack.py:152
↓ 5 callersFunction_do_paste_mask
Paste instance masks according to boxes. This implementation is modified from https://github.com/facebookresearch/detectron2/ Args:
mmdet/models/roi_heads/mask_heads/fcn_mask_head.py:344
↓ 5 callersFunction_dummy_bbox_sampling
Create sample results that can be passed to BBoxHead.get_targets.
tests/test_models/test_roi_heads/utils.py:7
↓ 5 callersMethod_freeze_stages
(self)
mmdet/models/backbones/resnet.py:613
↓ 5 callersMethod_mask_forward
Mask head forward function used in both training and testing.
mmdet/models/roi_heads/cascade_roi_head.py:158
↓ 5 callersFunctionadd_dummy_nms_for_onnx
Create a dummy onnx::NonMaxSuppression op while exporting to ONNX. This function helps exporting to onnx with batch and multiclass NMS op. It
mmdet/core/export/onnx_helper.py:82
↓ 5 callersFunctioncheck_translate
(results, results_translated, offset,
tests/test_data/test_pipelines/test_transform/test_translate.py:335
↓ 5 callersMethodcrop
See :func:`BaseInstanceMasks.crop`.
mmdet/core/mask/structures.py:314
↓ 5 callersMethodcrop_and_resize
See :func:`BaseInstanceMasks.crop_and_resize`.
mmdet/core/mask/structures.py:333
↓ 5 callersFunctionencode_mask_results
Encode bitmap mask to RLE code. Args: mask_results (list | tuple[list]): bitmap mask results. In mask scoring rcnn, mask_resu
mmdet/core/mask/utils.py:38
↓ 5 callersMethodextract_feat
Directly extract features from the backbone+neck.
mmdet/models/detectors/two_stage.py:65
↓ 5 callersFunctiongenerate_coordinate
Generate the coordinate. Args: featmap_sizes (tuple): The feature to be calculated, of shape (N, C, W, H). device (st
mmdet/core/utils/misc.py:190
↓ 5 callersMethodget_ann_ids
(self, img_ids=[], cat_ids=[], area_rng=[], iscrowd=None)
mmdet/datasets/api_wrappers/coco_api.py:27
↓ 5 callersMethodget_cat_ids
Get category ids of concatenated dataset by index. Args: idx (int): Index of data. Returns: list[int]: All c
mmdet/datasets/dataset_wrappers.py:50
↓ 5 callersMethodget_cat_ids
Get COCO category ids by index. Args: idx (int): Index of data. Returns: list[int]: All categories in the im
mmdet/datasets/coco.py:106
↓ 5 callersMethodget_extra_property
Get user-defined property.
mmdet/core/bbox/assigners/assign_result.py:61
↓ 5 callersMethodget_valid_ratio
Get the valid radios of feature maps of all level.
mmdet/models/utils/transformer.py:861
↓ 5 callersFunctioninterpolate_as
Interpolate the `source` to the shape of the `target`. The `source` must be a Tensor, but the `target` can be a Tensor or a np.ndarray with t
mmdet/models/utils/misc.py:35
↓ 5 callersFunctionload_url_dist
In distributed setting, this function only download checkpoint at local rank 0.
mmcv_custom/checkpoint.py:107
↓ 5 callersMethodloss
(self, all_cls_scores, all_bbox_preds, enc_topk_scores, en
projects/models/co_dino_head.py:162
↓ 5 callersFunctionmake_divisible
Make divisible function. This function rounds the channel number to the nearest value that can be divisible by the divisor. It is taken from
mmdet/models/utils/make_divisible.py:2
↓ 5 callersFunctionmerge_aug_bboxes
Merge augmented detection bboxes and scores. Args: aug_bboxes (list[Tensor]): shape (n, 4*#class) aug_scores (list[Tensor] or Non
mmdet/core/post_processing/merge_augs.py:84
↓ 5 callersMethodnorm3
nn.Module: normalization layer after the third convolution layer
mmdet/models/backbones/resnet.py:259
↓ 5 callersMethodpre_pipeline
Prepare results dict for pipeline.
mmdet/datasets/custom.py:169
↓ 5 callersMethodretry_if_cuda_oom
Makes a function retry itself after encountering pytorch's CUDA OOM error. The implementation logic is referred to https://gi
mmdet/utils/memory.py:124
↓ 5 callersMethodset_data
Update a dict to `data_fields`. Args: data (dict): A dict contains annotations of image or model predictions. Def
mmdet/core/data_structures/general_data.py:129
↓ 5 callersFunctionto_tensor
Convert objects of various python types to :obj:`torch.Tensor`. Supported types are: :class:`numpy.ndarray`, :class:`torch.Tensor`, :class:`S
mmdet/datasets/pipelines/formatting.py:12
↓ 4 callersMethod__init__
(self, embed_dims, num_heads, window_size,
mmdet/models/backbones/swin.py:41
↓ 4 callersMethod__init__
(self, semantic_in_channel=256, semantic_out_channel=256, i
mmdet/models/roi_heads/mask_heads/refine_mask_head.py:49
↓ 4 callersMethod__init__
(self, linear=False, eps=1e-6, reduction='mean',
mmdet/models/losses/iou_loss.py:256
↓ 4 callersMethod_bbox_forward
Box head forward function used in both training and testing.
mmdet/models/roi_heads/htc_roi_head.py:158
↓ 4 callersFunction_check_fields
Check data in fields from two results are same.
tests/test_data/test_pipelines/test_transform/utils.py:7
↓ 4 callersFunction_context_for_ohem
()
tests/test_data/test_pipelines/test_sampler.py:95
↓ 4 callersFunction_create_dummy_results
()
tests/test_data/test_datasets/test_openimages_dataset.py:120
↓ 4 callersFunction_forward_train
()
tests/test_models/test_forward.py:855
↓ 4 callersFunction_ignore_torch_cuda_oom
A context which ignores CUDA OOM exception from pytorch. Code is modified from <https://github.com/facebookresearch/detectron2/blob/main/dete
mmdet/utils/memory.py:63
↓ 4 callersFunction_load_checkpoint
Load checkpoint from somewhere (modelzoo, file, url). Args: filename (str): Accept local filepath, URL, ``torchvision://xxx``,
mmcv_custom/checkpoint.py:223
← previousnext →101–200 of 2,920, ranked by callers