Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/VincentHancoder/SSGD
/ functions
Functions
2,751 in github.com/VincentHancoder/SSGD
⨍
Functions
2,751
◇
Types & classes
447
↳
Endpoints
10
↓ 9 callers
Method
pad
See :func:`BaseInstanceMasks.pad`.
mmdet/core/mask/structures.py:303
↓ 9 callers
Function
select_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
↓ 8 callers
Function
_construct_bbox
(num_bbox=None)
tests/test_metrics/test_box_overlap.py:13
↓ 8 callers
Function
build_anchor_generator
(cfg, default_args=None)
mmdet/core/anchor/builder.py:15
↓ 8 callers
Function
build_roi_extractor
Build roi extractor.
mmdet/models/builder.py:28
↓ 8 callers
Function
eval_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 callers
Function
filter_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 callers
Function
fpn_neck_config
Return the class containing the corresponding attributes according to the fpn_test_step_names.
tests/test_onnx/test_neck.py:35
↓ 8 callers
Function
log_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 callers
Method
show_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
↓ 8 callers
Method
simple_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 callers
Method
sparse_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 callers
Function
transpose_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 callers
Method
valid_flags
(self, featmap_size, valid_size, device='cuda')
mmdet/core/anchor/point_generator.py:30
↓ 8 callers
Function
wrapper
(pred, target, weight=None, reduction='mean',
mmdet/models/losses/utils.py:94
↓ 7 callers
Function
_replace_r50_with_r18
Replace ResNet50 with ResNet18 in config.
tests/test_models/test_forward.py:46
↓ 7 callers
Function
build_backbone
Build backbone.
mmdet/models/builder.py:18
↓ 7 callers
Function
build_iou_calculator
Builder of IoU calculator.
mmdet/core/bbox/iou_calculators/builder.py:7
↓ 7 callers
Method
build_trans
(self, cfg, in_channels, out_channels, **extra_args)
mmdet/models/necks/fpg.py:317
↓ 7 callers
Function
compat_loader_args
Deprecated sample_per_gpu in cfg.data.
mmdet/utils/compat_config.py:54
↓ 7 callers
Method
decode
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 callers
Function
flip_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 callers
Method
format_results
Format the results to json (standard format for COCO evaluation). Args: results (list[tuple | numpy.ndarray]): Testing results of
mmdet/datasets/ssgd.py:325
↓ 7 callers
Method
get_ann_info
Get COCO annotation by index. Args: idx (int): Index of data. Returns: dict: Annotation info of specified in
mmdet/datasets/ssgd.py:58
↓ 7 callers
Method
get_bboxes
(self, cls_scores, bbox_preds, score_factors=None,
mmdet/models/dense_heads/paa_head.py:521
↓ 7 callers
Function
init_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:18
↓ 7 callers
Method
load_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
↓ 7 callers
Function
merge_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 callers
Method
regress_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 callers
Method
set_extra_property
Set user-defined new property.
mmdet/core/bbox/assigners/assign_result.py:56
↓ 7 callers
Method
train
(self, mode=True)
mmdet/models/backbones/csp_darknet.py:269
↓ 6 callers
Method
_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 callers
Function
_create_dummy_results
()
tests/test_data/test_datasets/test_common.py:96
↓ 6 callers
Function
adaptive_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 callers
Function
bbox_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:75
↓ 6 callers
Function
build_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:87
↓ 6 callers
Function
build_match_cost
Builder of IoU calculator.
mmdet/core/bbox/match_costs/builder.py:7
↓ 6 callers
Function
build_neck
Build neck.
mmdet/models/builder.py:23
↓ 6 callers
Function
check_norm_state
Check if norm layer is in correct train state.
tests/test_models/test_backbones/utils.py:26
↓ 6 callers
Method
decode
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 callers
Function
find_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:11
↓ 6 callers
Method
get_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 callers
Method
make_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 callers
Method
meta_info_items
(self)
mmdet/core/data_structures/general_data.py:191
↓ 6 callers
Method
meta_info_keys
Returns: list: Contains all keys in meta_info_fields.
mmdet/core/data_structures/general_data.py:166
↓ 6 callers
Method
refine_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 callers
Method
resize
see :func:`BaseInstanceMasks.resize`
mmdet/core/mask/structures.py:644
↓ 6 callers
Function
setup_multi_processes
Setup multi-processing environment variables.
mmdet/utils/setup_env.py:10
↓ 6 callers
Method
simple_test_rpn
Simple forward test function.
mmdet/models/dense_heads/cascade_rpn_head.py:773
↓ 6 callers
Method
to_tensor
See :func:`BaseInstanceMasks.to_tensor`.
mmdet/core/mask/structures.py:507
↓ 5 callers
Method
__init__
(self, embed_dims, feedforward_channels, act_cfg=dict(type=
mmdet/models/backbones/pvt.py:47
↓ 5 callers
Method
_bbox_forward
Box head forward function used in both training and testing.
mmdet/models/roi_heads/scnet_roi_head.py:96
↓ 5 callers
Method
_bbox_forward
Box head forward function used in both training and testing.
mmdet/models/roi_heads/cascade_roi_head.py:130
↓ 5 callers
Function
_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 callers
Function
_dummy_bbox_sampling
Create sample results that can be passed to BBoxHead.get_targets.
tests/test_models/test_roi_heads/utils.py:7
↓ 5 callers
Method
_freeze_stages
(self)
mmdet/models/backbones/resnet.py:613
↓ 5 callers
Method
_mask_forward
Mask head forward function used in both training and testing.
mmdet/models/roi_heads/cascade_roi_head.py:158
↓ 5 callers
Function
add_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 callers
Function
check_translate
(results, results_translated, offset,
tests/test_data/test_pipelines/test_transform/test_translate.py:335
↓ 5 callers
Method
crop
See :func:`BaseInstanceMasks.crop`.
mmdet/core/mask/structures.py:314
↓ 5 callers
Function
encode_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 callers
Method
extract_feat
Directly extract features from the backbone+neck.
mmdet/models/detectors/two_stage.py:65
↓ 5 callers
Method
extract_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
↓ 5 callers
Function
generate_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 callers
Method
get_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 callers
Method
get_cat_ids
Get COCO category ids by index. Args: idx (int): Index of data. Returns: list[int]: All categories in the im
mmdet/datasets/ssgd.py:73
↓ 5 callers
Method
get_extra_property
Get user-defined property.
mmdet/core/bbox/assigners/assign_result.py:61
↓ 5 callers
Method
get_img_ids
(self, img_ids=[], cat_ids=[])
mmdet/datasets/api_wrappers/coco_api.py:33
↓ 5 callers
Function
inference_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:93
↓ 5 callers
Function
interpolate_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 callers
Method
load_imgs
(self, ids)
mmdet/datasets/api_wrappers/coco_api.py:42
↓ 5 callers
Function
make_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 callers
Function
merge_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 callers
Method
norm3
nn.Module: normalization layer after the third convolution layer
mmdet/models/backbones/resnet.py:259
↓ 5 callers
Function
parse_requirements
Parse the package dependencies listed in a requirements file but strips specific versioning information. Args: fname (str): path to r
setup.py:56
↓ 5 callers
Method
pre_pipeline
Prepare results dict for pipeline.
mmdet/datasets/custom.py:167
↓ 5 callers
Method
retry_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 callers
Method
set_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 callers
Function
to_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 callers
Method
__init__
(self, embed_dims, num_heads, window_size,
mmdet/models/backbones/swin.py:41
↓ 4 callers
Method
__init__
(self, linear=False, eps=1e-6, reduction='mean',
mmdet/models/losses/iou_loss.py:256
↓ 4 callers
Method
_bbox_forward
Box head forward function used in both training and testing.
mmdet/models/roi_heads/htc_roi_head.py:158
↓ 4 callers
Function
_check_fields
Check data in fields from two results are same.
tests/test_data/test_pipelines/test_transform/utils.py:7
↓ 4 callers
Function
_context_for_ohem
()
tests/test_data/test_pipelines/test_sampler.py:95
↓ 4 callers
Function
_create_dummy_results
()
tests/test_data/test_datasets/test_openimages_dataset.py:120
↓ 4 callers
Function
_forward_train
()
tests/test_models/test_forward.py:855
↓ 4 callers
Function
_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 callers
Method
_mask_forward
Mask head forward function used in both training and testing.
mmdet/models/roi_heads/standard_roi_head.py:181
↓ 4 callers
Function
_pad
(h, w, c, pad_val, axis=-1, dtype=np.float32)
tests/test_data/test_pipelines/test_transform/test_translate.py:20
↓ 4 callers
Function
anchor_ctr_inside_region_flags
Get the flag indicate whether anchor centers are inside regions.
mmdet/core/bbox/assigners/region_assigner.py:27
↓ 4 callers
Function
area
(bboxes)
tests/test_data/test_pipelines/test_transform/test_transform.py:245
↓ 4 callers
Method
backward
(ctx, grad_output)
mmdet/models/utils/misc.py:25
↓ 4 callers
Function
bbox_mapping_back
Map bboxes from testing scale to original image scale.
mmdet/core/bbox/transforms.py:63
↓ 4 callers
Function
build_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 callers
Function
calc_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 callers
Function
calc_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 callers
Function
dummy_bboxes
(num, max_height, max_width)
tests/test_utils/test_masks.py:36
↓ 4 callers
Function
dummy_masks
(h, w, num_obj=3, mode='bitmap')
tests/test_runtime/test_config.py:271
↓ 4 callers
Function
dynamic_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 callers
Function
ensure_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
← previous
next →
101–200 of 2,751, ranked by callers