MCPcopy Create free account

hub / github.com/ChenhongyiYang/PGD / functions

Functions2,117 in github.com/ChenhongyiYang/PGD

↓ 86 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:56
↓ 79 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:4
↓ 75 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:10
↓ 73 callersFunctionunmap
Unmap a subset of item (data) back to the original set of items (of size count)
mmdet/core/utils/misc.py:32
↓ 68 callersFunctionbuild_loss
Build loss.
mmdet/models/builder.py:42
↓ 68 callersMethodcuda
Since teacher_model is registered as a plain object, it is necessary to put the teacher model to cuda when calling cuda function.
mmdet/models/detectors/kd_one_stage.py:75
↓ 59 callersMethoddecode
Decode the predicted bboxes according to prediction and base boxes.
mmdet/core/bbox/coder/base_bbox_coder.py:15
↓ 50 callersMethodexpand
See :func:`BaseInstanceMasks.expand`.
mmdet/core/mask/structures.py:368
↓ 49 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:58
↓ 47 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
↓ 44 callersMethodto_ndarray
See :func:`BaseInstanceMasks.to_ndarray`.
mmdet/core/mask/structures.py:502
↓ 43 callersMethodforward
(self, *args, **kwargs)
tests/test_onnx/utils.py:27
↓ 38 callersMethodinit_weights
(self)
mmdet/models/necks/rfp.py:104
↓ 35 callersMethodassign
(self, bboxes, cls_scores, bbox_preds, gt_bboxes,
mmdet/models/dense_heads/pgd_heads/utils/pgw_anchor_based.py:24
↓ 33 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:34
↓ 31 callersFunctiondigit_version
(version_str)
mmdet/__init__.py:6
↓ 29 callersMethodload
:meth: read the object from a dict
crowd_code/evaluate/APMRToolkits/image.py:16
↓ 29 callersFunctionreduce_mean
Obtain the mean of tensor on different GPUs.
mmdet/core/utils/dist_utils.py:63
↓ 28 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:33
↓ 27 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:308
↓ 27 callersMethodtrain
Convert the model into training mode will keeping the normalization layer freezed.
mmdet/models/backbones/hrnet.py:556
↓ 25 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:8
↓ 24 callersFunctionbuild_detector
Build detector.
mmdet/models/builder.py:47
↓ 24 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:119
↓ 24 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/anchor_head.py:141
↓ 23 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:4
↓ 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:19
↓ 22 callersMethodflip
See :func:`BaseInstanceMasks.flip`.
mmdet/core/mask/structures.py:289
↓ 22 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:7
↓ 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:31
↓ 21 callersFunctionbuild_assigner
Builder of box assigner.
mmdet/core/bbox/builder.py:8
↓ 21 callersFunctionbuild_sampler
Builder of box sampler.
mmdet/core/bbox/builder.py:13
↓ 20 callersFunctionbuild_head
Build head.
mmdet/models/builder.py:37
↓ 19 callersMethodrandom
Generate random bitmap masks for demo / testing purposes. Example: >>> from mmdet.core.mask.structures import BitmapMasks
mmdet/core/mask/structures.py:511
↓ 18 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:99
↓ 18 callersMethodencode
Encode deltas between bboxes and ground truth boxes.
mmdet/core/bbox/coder/base_bbox_coder.py:11
↓ 17 callersFunctionbuild_dataset
(cfg, default_args=None)
mmdet/datasets/builder.py:53
↓ 17 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:197
↓ 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:6
↓ 16 callersFunctionslack
(k)
crowd_code/evaluate/JIToolkits/matching.py:194
↓ 15 callersMethodforward_plugin
(self, x, plugin_names)
mmdet/models/backbones/resnet.py:241
↓ 15 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:401
↓ 14 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:340
↓ 14 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:38
↓ 14 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:354
↓ 13 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:20
↓ 13 callersFunctionbuild_anchor_generator
(cfg, default_args=None)
mmdet/core/anchor/builder.py:14
↓ 13 callersFunctionis_block
Check if is ResNet building block.
tests/test_models/test_backbones/utils.py:10
↓ 12 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:175
↓ 12 callersFunction_print
(result, ap=1, iouThr=None, areaRng='all', maxDets=100)
tools/analysis_tools/robustness_eval.py:10
↓ 12 callersMethodevaluate
(self, results, logger=None)
tests/test_runtime/test_eval_hook.py:37
↓ 12 callersMethodget_points
Get points according to feature map sizes. Args: featmap_sizes (list[tuple]): Multi-level feature map sizes. img_meta
mmdet/models/dense_heads/reppoints_head.py:298
↓ 12 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:178
↓ 11 callersFunctionbbox_mapping
Map bboxes from the original image scale to testing scale.
mmdet/core/bbox/transforms.py:34
↓ 11 callersFunctionbuild_iou_calculator
Builder of IoU calculator.
mmdet/core/bbox/iou_calculators/builder.py:6
↓ 11 callersMethodget_bboxes
Transform network output for a batch into bbox predictions. Args: cls_scores (list[Tensor]): Box scores for each scale level
mmdet/models/dense_heads/rpn_head.py:79
↓ 11 callersMethodget_bboxes
(self, det_bboxes, grid_pred, img_metas)
mmdet/models/roi_heads/mask_heads/grid_head.py:297
↓ 11 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:17
↓ 10 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:34
↓ 10 callersMethod_make_layers
Initialize conv sequential for CornerHead.
mmdet/models/dense_heads/corner_head.py:156
↓ 10 callersMethod_mask_forward
Mask head forward function used in both training and testing.
mmdet/models/roi_heads/scnet_roi_head.py:122
↓ 10 callersFunctionbuild_distill_weight
Build distill loss.
mmdet/models/dense_heads/pgd_heads/utils/builder.py:28
↓ 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:77
↓ 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:31
↓ 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:13
↓ 10 callersMethodto_ndarray
Convert masks to the format of ndarray.
mmdet/core/mask/structures.py:884
↓ 10 callersMethodtrain
Convert the model into training mode while keep normalization layer frozen.
mmdet/models/backbones/mobilenet_v2.py:188
↓ 9 callersMethod_bbox_forward
Box forward function used in both training and testing.
mmdet/models/roi_heads/pisa_roi_head.py:86
↓ 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:60
↓ 9 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:28
↓ 8 callersFunction_build_demo_runner
()
tests/test_data/test_datasets/test_common.py:309
↓ 8 callersFunctionbuild_bbox_coder
Builder of box coder.
mmdet/core/bbox/builder.py:18
↓ 8 callersFunctionbuild_roi_extractor
Build roi extractor.
mmdet/models/builder.py:27
↓ 8 callersFunctioncast_tensor_type
(x, scale=1., dtype=None)
mmdet/core/bbox/iou_calculators/iou2d_calculator.py:6
↓ 8 callersFunctioncheck_shear
(results, results_sheared)
tests/test_data/test_pipelines/test_transform/test_shear.py:51
↓ 8 callersFunctioncreate_random_bboxes
(num_bboxes, img_w, img_h)
tests/test_data/test_pipelines/test_transform/test_transform.py:202
↓ 8 callersFunctionfpn_neck_config
Return the class containing the corresponding attributes according to the fpn_test_step_names.
tests/test_onnx/test_neck.py:34
↓ 8 callersMethodget_ann_ids
(self, img_ids=[], cat_ids=[], area_rng=[], iscrowd=None)
mmdet/datasets/api_wrappers/coco_api.py:26
↓ 8 callersFunctionis_norm
Check if is one of the norms.
tests/test_models/test_backbones/utils.py:18
↓ 8 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:141
↓ 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:273
↓ 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:254
↓ 7 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:221
↓ 7 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:235
↓ 7 callersFunctionblossomLeaves
(b)
crowd_code/evaluate/JIToolkits/matching.py:199
↓ 7 callersMethodbuild_trans
(self, cfg, in_channels, out_channels, **extra_args)
mmdet/models/necks/fpg.py:316
↓ 7 callersFunctioncheck_rotate
(results, results_rotated)
tests/test_data/test_pipelines/test_transform/test_rotate.py:50
↓ 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:62
↓ 7 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:45
↓ 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:45
↓ 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:120
↓ 7 callersMethodnorm1
nn.Module: the normalization layer named "norm1"
mmdet/models/backbones/hrnet.py:378
↓ 7 callersFunctionparse_requirements
Parse the package dependencies listed in a requirements file but strips specific versioning information. Args: fname (str): path to r
setup.py:50
↓ 7 callersMethodregress_by_class
Regress the bbox for the predicted class. Used in Cascade R-CNN. Args: rois (Tensor): shape (n, 4) or (n, 5) label (T
mmdet/models/roi_heads/bbox_heads/bbox_head.py:454
↓ 7 callersMethodset_extra_property
Set user-defined new property.
mmdet/core/bbox/assigners/assign_result.py:55
↓ 6 callersMethod__init__
(self, encoder=None, decoder=None, init_cfg=None)
mmdet/models/utils/transformer.py:200
↓ 6 callersFunction_construct_bbox
(num_bbox=None)
tests/test_metrics/test_box_overlap.py:10
↓ 6 callersFunction_create_dummy_results
()
tests/test_data/test_datasets/test_common.py:96
↓ 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:76
next →1–100 of 2,117, ranked by callers