Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KyanChen/RSPrompter
/ functions
Functions
6,823 in github.com/KyanChen/RSPrompter
⨍
Functions
6,823
◇
Types & classes
1,658
↳
Endpoints
29
↓ 7 callers
Method
__init__
(self, in_features: int, out_features: Optional[int] = None,
mmpretrain/models/backbones/xcit.py:346
↓ 7 callers
Method
__init__
(self, input_dim, hidden_dim, output_dim, num_layers)
projects/XDecoder/xdecoder/transformer_blocks.py:426
↓ 7 callers
Method
_create_dummy_coco_json
(self, json_name)
tests/test_evaluation/test_metrics/test_coco_video_metric.py:18
↓ 7 callers
Method
_shape
(self, tensor: torch.Tensor, seq_len: int, bsz: int)
mmpretrain/models/multimodal/blip2/modeling_opt.py:147
↓ 7 callers
Method
assign
Assign gt to bboxes. The process is very much like the max iou assigner, except that positive samples are constrained within the cell
mmdet/models/task_modules/assigners/grid_assigner.py:52
↓ 7 callers
Method
before_train_epoch
switch pipeline.
mmdet/engine/hooks/pipeline_switch_hook.py:23
↓ 7 callers
Method
build_dataloader
(dataset)
mmpretrain/apis/image_retrieval.py:83
↓ 7 callers
Method
build_trans
(self, cfg, in_channels, out_channels, **extra_args)
mmdet/models/necks/fpg.py:317
↓ 7 callers
Method
calculate
Calculate the accuracy. Args: pred (torch.Tensor | np.ndarray | Sequence): The prediction results. It can be labe
mmpretrain/evaluation/metrics/single_label.py:203
↓ 7 callers
Function
conv_bn_relu
Construct a sequential conv, bn and relu. Args: in_channels (int): Dimension of input features. out_channels (int): Dimension of
mmpretrain/models/backbones/replknet.py:56
↓ 7 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
↓ 7 callers
Method
evaluate
Evaluate the model performance of the whole dataset after processing all batches. Args: size (int): Length of the entire
mmpretrain/evaluation/metrics/multi_task.py:86
↓ 7 callers
Function
gaussian_focal_loss
`Focal Loss <https://arxiv.org/abs/1708.02002>`_ for targets in gaussian distribution. Args: pred (torch.Tensor): The prediction.
mmdet/models/losses/gaussian_focal_loss.py:12
↓ 7 callers
Method
get_data_info
Get annotation by index. Args: idx (int): Global index of ``KFoldDataset``. Returns: dict: The idx-th annota
mmpretrain/datasets/dataset_wrappers.py:101
↓ 7 callers
Function
label_to_onehot
Convert a label to onehot format tensor. Args: label (LABEL_TYPE): Label value. num_classes (int): The number of classes. Re
mmpretrain/structures/utils.py:131
↓ 7 callers
Function
make_divisible
Make divisible function. This function rounds the channel number down to the nearest value that can be divisible by the divisor. Args:
mmpretrain/models/utils/make_divisible.py:2
↓ 7 callers
Method
match
Calculate the dist matrixes for loss measurement. Args: key_embeds (Tensor): Embeds of positive bboxes in sampling results
mmdet/models/tracking_heads/quasi_dense_embed_head.py:203
↓ 7 callers
Function
merge_aug_masks
Merge augmented mask prediction. Args: aug_masks (list[Tensor]): each has shape (n, c, h, w). img_metas (dict): Image
mmdet/models/test_time_augs/merge_augs.py:179
↓ 7 callers
Function
multiclass_nms
NMS for multi-class bboxes. Args: multi_bboxes (Tensor): shape (n, #class*4) or (n, 4) multi_scores (Tensor): shape (n, #class),
mmdet/models/layers/bbox_nms.py:12
↓ 7 callers
Method
norm3
nn.Module: normalization layer after the third convolution layer
mmdet/models/backbones/resnet.py:259
↓ 7 callers
Method
process
(self, data_batch, predictions)
tests/test_engine/test_hooks/test_mean_teacher_hook.py:84
↓ 7 callers
Function
scale_boxes
Scale boxes with type of tensor or box type. Args: boxes (Tensor or :obj:`BaseBoxes`): boxes need to be scaled. Its type can
mmdet/structures/bbox/transforms.py:394
↓ 7 callers
Method
set_extra_property
Set user-defined new property.
mmdet/models/task_modules/assigners/assign_result.py:55
↓ 7 callers
Function
track
(sequence, description: str = '', total: Optional[float] = None)
mmpretrain/utils/progress.py:18
↓ 7 callers
Method
train
(self, mode=True)
mmdet/models/backbones/csp_darknet.py:271
↓ 7 callers
Method
transpose_for_scores
Transpose the dimensions of `x`.
mmdet/models/utils/vlfuse_helper.py:594
↓ 7 callers
Method
transpose_for_scores
(self, x)
mmpretrain/models/multimodal/blip/language_model.py:194
↓ 7 callers
Function
weight_reduce_loss
Apply element-wise weight and reduce loss. Args: loss (Tensor): Element-wise loss. weight (Tensor): Element-wise weights.
mmpretrain/models/losses/utils.py:28
↓ 6 callers
Method
__init__
(self, prob: float = 1.0, level: Optional[int] = None, min_
mmdet/datasets/transforms/colorspace.py:132
↓ 6 callers
Method
__init__
(self, linear: bool = False, eps: float = 1e-6, reduction:
mmdet/models/losses/iou_loss.py:425
↓ 6 callers
Method
__init__
(self, )
mmpretrain/models/backbones/efficientformer.py:98
↓ 6 callers
Method
__init__
(self, depth, *args, **kwargs)
mmpretrain/models/multimodal/ofa/ofa_modules.py:230
↓ 6 callers
Method
__init__
(self, in_channels, dim=256, num_convs=4,
projects/SparseInst/sparseinst/decoder.py:91
↓ 6 callers
Method
_create_dummy_results
(self)
tests/test_evaluation/test_metrics/test_coco_metric.py:89
↓ 6 callers
Function
_equal
(a, b)
tests/test_structures/test_reid_data_sample.py:11
↓ 6 callers
Method
_forward
(self, batch_inputs: Tensor, batch_data_samples: OptSampleList = None)
mmdet/rsprompter/models.py:1080
↓ 6 callers
Method
_get_pad_shape
Get the pad_shape of each image based on data and pad_size_divisor.
mmdet/models/data_preprocessors/data_preprocessor.py:151
↓ 6 callers
Function
_print
(result, ap=1, iouThr=None, areaRng='all', maxDets=100)
tools/analysis_tools/robustness_eval.py:11
↓ 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/layers/brick_wrappers.py:17
↓ 6 callers
Method
after_train_iter
Regularly check whether the loss is valid every n iterations. Args: runner (:obj:`Runner`): The runner of the training process.
mmdet/engine/hooks/checkloss_hook.py:26
↓ 6 callers
Function
align_tensor
Pad each input to `max_len`, then stack them. If `max_len` is None, then it is the max size of the first dimension of each input. https:/
mmdet/models/utils/misc.py:678
↓ 6 callers
Method
anchor_offset
Get offset for deformable conv based on anchor shape NOTE: currently support deformable kernel_size=3 and dilation=1 Args:
mmdet/models/dense_heads/cascade_rpn_head.py:423
↓ 6 callers
Method
assign
Computes 1-to-k gt-pred matching based on the weighted costs. This method assign each query prediction to a ground truth or backgroun
mmdet/models/task_modules/assigners/topk_hungarian_assigner.py:45
↓ 6 callers
Method
assign
Assign gt to bboxes. This method assigns gts to every prior (proposal/anchor), each prior will be assigned with -1, or a semi-positiv
mmdet/models/task_modules/assigners/center_region_assigner.py:135
↓ 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
Function
conv_bn
Construct a sequential conv and bn. Args: in_channels (int): Dimension of input features. out_channels (int): Dimension of output
mmpretrain/models/backbones/replknet.py:14
↓ 6 callers
Function
create_random_bboxes
(num_bboxes, img_w, img_h)
tests/test_datasets/test_transforms/utils.py:9
↓ 6 callers
Method
get_key_frames
(self)
mmdet/structures/track_data_sample.py:132
↓ 6 callers
Method
get_ref_frames
(self)
mmdet/structures/track_data_sample.py:141
↓ 6 callers
Method
init_weights
Initialize weights.
mmpretrain/models/selfsup/cae.py:405
↓ 6 callers
Method
init_weights
(self)
projects/CO-DETR/codetr/transformer.py:55
↓ 6 callers
Method
load_imgs
(self, ids)
mmdet/datasets/api_wrappers/coco_api.py:44
↓ 6 callers
Method
loss_and_predict
Perform forward propagation of the head, then calculate loss and predictions from the features and data samples. Over-write because im
mmdet/models/dense_heads/detr_head.py:461
↓ 6 callers
Method
loss_by_feat
Calculate the loss based on the features extracted by the detection head. Args: cls_scores (list[Tensor]): Box scores for
mmdet/models/dense_heads/condinst_head.py:89
↓ 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
norm3
(self)
mmpretrain/models/backbones/resnet.py:246
↓ 6 callers
Method
predict
(self, batch_inputs: Tensor, batch_data_samples: SampleList, r
mmdet/rsprompter/models.py:1155
↓ 6 callers
Method
predict_by_feat
(self, x, time_pairs, batch_noise_bbox
projects/DiffusionDet/diffusiondet/head.py:479
↓ 6 callers
Method
process
Process one batch of data samples and predictions. The processed results should be stored in ``self.results``, which will be used to c
mmdet/evaluation/metrics/coco_panoptic_metric.py:419
↓ 6 callers
Method
refine_bboxes
Refine bboxes during training. Args: sampling_results (List[:obj:`SamplingResult`] or List[:obj:`InstanceData`]):
mmdet/models/roi_heads/bbox_heads/bbox_head.py:573
↓ 6 callers
Function
remove_transform
Remove the target transform type from the pipeline. Args: pipeline (List[dict] | List[BaseTransform]): The transforms list. targe
mmpretrain/datasets/transforms/utils.py:35
↓ 6 callers
Method
rescale_
Rescale boxes w.r.t. rescale_factor in-place. Note: Both ``rescale_`` and ``resize_`` will enlarge or shrink boxes w.
mmdet/structures/bbox/base_boxes.py:439
↓ 5 callers
Method
__init__
(self, embed_dims, feedforward_channels, act_cfg=dict(type=
mmdet/models/backbones/pvt.py:48
↓ 5 callers
Method
__init__
(self, v_dim: int = 256, l_dim: int = 768, embed_dim: int =
mmdet/models/utils/vlfuse_helper.py:416
↓ 5 callers
Method
__init__
( self, scale: tuple, pad_size_divisor: int = 1, pad_value: Union[float, int]
mmdet/models/data_preprocessors/data_preprocessor.py:587
↓ 5 callers
Method
__init__
(self, iou_mode: str = 'giou', weight: Union[float, int] = 1.)
mmdet/models/task_modules/assigners/match_cost.py:142
↓ 5 callers
Method
__init__
(self, input_dim: int, hidden_dim: int, output_dim: int, num_layers: int)
mmdet/models/layers/transformer/utils.py:748
↓ 5 callers
Method
__init__
(self, in_channels, hidden_channels=None, out_channels=None
mmpretrain/models/backbones/repmlp.py:363
↓ 5 callers
Method
__init__
(self, arch, stem_fn, in_channels=3, out_i
mmpretrain/models/backbones/cspnet.py:302
↓ 5 callers
Method
__init__
(self, embed_dims, init_cfg=None)
mmpretrain/models/backbones/van.py:93
↓ 5 callers
Method
__init__
(self, in_features, hidden_features=None, out_features=None
mmpretrain/models/backbones/hivit.py:25
↓ 5 callers
Method
__init__
(self, arch, in_channels=3, out_indices=(3, ),
mmpretrain/models/backbones/twins.py:689
↓ 5 callers
Method
__init__
(self, depth, in_channels=3, stem_channels=64,
mmpretrain/models/backbones/resnet.py:476
↓ 5 callers
Method
__init__
(self, model_style: str, vision_model_width: int, add_cross_attention: bool, cross_attention_
mmpretrain/models/multimodal/blip2/Qformer.py:764
↓ 5 callers
Method
__init__
(self, config: OPTConfig)
mmpretrain/models/multimodal/blip2/modeling_opt.py:794
↓ 5 callers
Method
__init__
( self, in_features, hidden_features=None, out_features=None,
projects/ViTDet/vitdet/vit.py:226
↓ 5 callers
Method
__init__
(self, in_features, hidden_features=None, out_features=None
projects/XDecoder/xdecoder/focalnet.py:118
↓ 5 callers
Method
_create_dummy_results
(self)
tests/test_evaluation/test_metrics/test_coco_video_metric.py:92
↓ 5 callers
Method
_create_dummy_results
(self)
tests/test_evaluation/test_metrics/test_lvis_metric.py:95
↓ 5 callers
Method
_freeze_stages
(self)
mmdet/models/backbones/resnet.py:613
↓ 5 callers
Method
_get_active_map_or_index
Get current active map with (B, 1, f, f) shape or index format.
mmpretrain/models/utils/sparse_modules.py:17
↓ 5 callers
Function
_get_adaptive_scales
Get adaptive scales according to areas. The scale range is [0.5, 1.0]. When the area is less than ``min_area``, the scale is 0.5 while the ar
mmdet/visualization/palette.py:70
↓ 5 callers
Method
_get_decoder_layers
Get decoder layers according to attribute name.
mmpretrain/models/multimodal/flamingo/adapter.py:59
↓ 5 callers
Method
_init_reg_convs
Initialize bbox regression conv layers of the head.
mmdet/models/dense_heads/anchor_free_head.py:141
↓ 5 callers
Function
_rand_bboxes
(rng, num_boxes, w, h)
mmdet/testing/_utils.py:67
↓ 5 callers
Method
add_datasample
Draw datasample and save to all backends. - If GT and prediction are plotted at the same time, they are displayed in a stitched image
mmdet/visualization/local_visualizer.py:628
↓ 5 callers
Method
assign
Assign gt to anchors. This method assign a gt bbox to every bbox (proposal/anchor), each bbox will be assigned with -1, 0, or a posit
mmdet/models/task_modules/assigners/region_assigner.py:69
↓ 5 callers
Function
batch_unshuffle_ddp
Undo batch shuffle. Args: x (torch.Tensor): Data in each GPU. idx_unshuffle (torch.Tensor): Index for restoring. Returns:
mmpretrain/models/utils/batch_shuffle.py:44
↓ 5 callers
Method
before_train_epoch
Close mosaic and mixup augmentation and switches to use L1 loss.
mmdet/engine/hooks/yolox_mode_switch_hook.py:35
↓ 5 callers
Method
device
Reload ``device`` from self.tensor.
mmdet/structures/bbox/base_boxes.py:215
↓ 5 callers
Function
embed_similarity
Calculate feature similarity from embeddings. Args: key_embeds (Tensor): Shape (N1, C). ref_embeds (Tensor): Shape (N2, C).
mmdet/models/task_modules/tracking/similarity.py:7
↓ 5 callers
Method
extract_feat
Extract features. Args: batch_inputs (Tensor): Image tensor, has shape (bs, dim, H, W). Returns: tuple[Tenso
projects/CO-DETR/codetr/codetr.py:126
↓ 5 callers
Method
fit
(self, loss)
tests/test_models/test_dense_heads/test_lad_head.py:24
↓ 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/models/utils/misc.py:379
↓ 5 callers
Method
getCatIds
filtering parameters. default skips that filter. :param catNms (str array) : get cats for given cat names :param supNms (str array)
mmdet/evaluation/functional/ytvis.py:141
↓ 5 callers
Method
get_activation
(self, pred)
mmdet/models/losses/eqlv2_loss.py:143
↓ 5 callers
Function
get_adaptive_scale
Get adaptive scale according to image shape. The target scale depends on the the short edge length of the image. If the short edge length equ
mmpretrain/visualization/utils.py:8
↓ 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
projects/Detic_new/detic/imagenet_lvis.py:381
↓ 5 callers
Function
get_expansion
Get the expansion of a residual block. The block expansion will be obtained by the following order: 1. If ``expansion`` is given, just retur
mmpretrain/models/backbones/resnet.py:284
↓ 5 callers
Method
get_extra_property
Get user-defined property.
mmdet/models/task_modules/assigners/assign_result.py:60
← previous
next →
201–300 of 6,823, ranked by callers