MCPcopy Create free account

hub / github.com/LeapLabTHU/Agent-Attention / functions

Functions3,501 in github.com/LeapLabTHU/Agent-Attention

↓ 4 callersMethodto_tensor
See :func:`BaseInstanceMasks.to_tensor`.
downstream/detection/mmdet/core/mask/structures.py:507
↓ 4 callersMethodvalid_flags
(self, featmap_size, valid_size, device='cuda')
downstream/detection/mmdet/core/anchor/point_generator.py:30
↓ 4 callersFunctionvalidate
(config, data_loader, model, logger)
agent_transformer/main_ema.py:287
↓ 4 callersFunctionwmsa_ad_flops
(h, w, dim, group_size, attn_type)
downstream/detection/tools/analysis_tools/get_flops.py:77
↓ 4 callersFunctionwmsa_ad_flops
(h, w, dim, group_size, attn_type)
downstream/segmentation/tools/get_flops.py:59
↓ 4 callersFunctionwmsa_adv4_flops
(h, w, cls_reso, dim, group_size, down_stream_scale_factor, attn_type)
downstream/detection/tools/analysis_tools/get_flops.py:87
↓ 4 callersFunctionwmsa_adv4_flops
(h, w, cls_reso, dim, group_size, down_stream_scale_factor, attn_type)
downstream/segmentation/tools/get_flops.py:69
↓ 4 callersFunctionwmsa_flops
(h, w, dim, stage)
downstream/detection/tools/analysis_tools/get_flops.py:68
↓ 4 callersFunctionwmsa_flops
(h, w, dim, stage)
downstream/segmentation/tools/get_flops.py:50
↓ 4 callersMethodxyxy2xywh
Convert ``xyxy`` style bounding boxes to ``xywh`` style for COCO evaluation. Args: bbox (numpy.ndarray): The bounding box
downstream/detection/mmdet/datasets/coco.py:204
↓ 3 callersMethod__init__
(self, in_channels, out_channels, num_outs,
downstream/detection/mmdet/models/necks/fpg.py:150
↓ 3 callersMethod__init__
(self, groups=1, base_width=4, radix=2, re
downstream/detection/mmdet/models/backbones/resnest.py:299
↓ 3 callersMethod__init__
(self, depth, in_channels=3, stem_channels=None,
downstream/detection/mmdet/models/backbones/resnet.py:369
↓ 3 callersMethod__init__
(self, num_classes, in_channels, anchor_generator=dict(
downstream/detection/mmdet/models/dense_heads/yolact_head.py:44
↓ 3 callersMethod__init__
(self, groups=1, base_width=4, radix=2, re
downstream/segmentation/mmseg/models/backbones/resnest.py:295
↓ 3 callersMethod__init__
(self, stdc_type, in_channels, channels, b
downstream/segmentation/mmseg/models/backbones/stdc.py:232
↓ 3 callersMethod__init__
(self, embed_dims, feedforward_channels, act_cfg=dict(type=
downstream/segmentation/mmseg/models/backbones/mit.py:40
↓ 3 callersMethod__init__
(self, in_channels=3, base_channels=64, num_stages=5,
downstream/segmentation/mmseg/models/backbones/unet.py:283
↓ 3 callersMethod__init__
(self, in_channels=3, num_channels=(32, 64, 128), num_block
downstream/segmentation/mmseg/models/backbones/cgnet.py:219
↓ 3 callersMethod__init__
(self, in_channels=3, downsample_dw_channels=(32, 48), glob
downstream/segmentation/mmseg/models/backbones/fast_scnn.py:326
↓ 3 callersMethod__init__
(self, in_channels=3, enc_downsample_channels=(16, 64, 128),
downstream/segmentation/mmseg/models/backbones/erfnet.py:230
↓ 3 callersMethod__init__
(self, embed_dims=768, post_process_channels=[96, 192, 384, 768],
downstream/segmentation/mmseg/models/decode_heads/dpt_head.py:236
↓ 3 callersMethod_add_conv_fc_branch
Add shared or separable branch. convs -> avg pool (optional) -> fcs
downstream/detection/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)
downstream/detection/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.
downstream/detection/mmdet/models/roi_heads/sparse_roi_head.py:88
↓ 3 callersMethod_bbox_forward
Box head forward function used in both training and testing.
downstream/detection/mmdet/models/roi_heads/standard_roi_head.py:118
↓ 3 callersMethod_bboxes_nms
(self, cls_scores, bboxes, score_factor, cfg)
downstream/detection/mmdet/models/dense_heads/yolox_head.py:313
↓ 3 callersMethod_build_head
Build head for each branch.
downstream/detection/mmdet/models/dense_heads/centernet_head.py:64
↓ 3 callersFunction_create_vision_transformer
(variant, pretrained=False, default_cfg=None, **kwargs)
agent_transformer/models/agent_deit.py:593
↓ 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:
downstream/detection/mmdet/models/dense_heads/embedding_rpn_head.py:54
↓ 3 callersFunction_do_paste_mask
Paste instance masks according to boxes. This implementation is modified from https://github.com/facebookresearch/detectron2/ Args:
downstream/detection/mmdet/models/roi_heads/mask_heads/fcn_mask_head.py:344
↓ 3 callersMethod_init_cls_convs
Initialize classification conv layers of the head.
downstream/detection/mmdet/models/dense_heads/anchor_free_head.py:113
↓ 3 callersMethod_init_reg_convs
Initialize bbox regression conv layers of the head.
downstream/detection/mmdet/models/dense_heads/anchor_free_head.py:133
↓ 3 callersMethod_make_layer
(self, in_channels, out_channels, blocks,
downstream/segmentation/mmseg/models/backbones/fast_scnn.py:160
↓ 3 callersMethod_make_stage
(self, layer_config, in_channels, multiscale_output=True)
downstream/detection/mmdet/models/backbones/hrnet.py:505
↓ 3 callersMethod_make_stage
Make each stage.
downstream/segmentation/mmseg/models/backbones/hrnet.py:529
↓ 3 callersMethod_make_transition_layer
(self, num_channels_pre_layer, num_channels_cur_layer)
downstream/detection/mmdet/models/backbones/hrnet.py:412
↓ 3 callersMethod_make_transition_layer
Make transition layer.
downstream/segmentation/mmseg/models/backbones/hrnet.py:434
↓ 3 callersMethod_mask_forward
Mask head forward function used in both training and testing.
downstream/detection/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.
downstream/detection/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.
downstream/detection/mmdet/core/anchor/anchor_generator.py:196
↓ 3 callersMethod_split_cls_score
(self, cls_score)
downstream/detection/mmdet/models/losses/seesaw_loss.py:138
↓ 3 callersFunctionaccuracy
Calculate accuracy according to the prediction and target. Args: pred (torch.Tensor): The model prediction, shape (N, num_class, ...)
downstream/segmentation/mmseg/models/losses/accuracy.py:6
↓ 3 callersMethodanchor_center
Get anchor centers from anchors. Args: anchors (Tensor): Anchor list with shape (N, 4), "xyxy" format. Returns:
downstream/detection/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,
downstream/detection/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``,
downstream/detection/mmdet/models/dense_heads/dense_test_mixins.py:41
↓ 3 callersMethodaug_test_rpn
Augmented forward test function.
downstream/detection/mmdet/models/dense_heads/cascade_rpn_head.py:798
↓ 3 callersFunctionbbox2fields
The key correspondence from bboxes to labels, masks and segmentations.
downstream/detection/mmdet/datasets/pipelines/auto_augment.py:29
↓ 3 callersFunctionbuild_backbone
Build backbone.
downstream/segmentation/mmseg/models/builder.py:18
↓ 3 callersFunctionbuild_loss
Build loss.
downstream/segmentation/mmseg/models/builder.py:33
↓ 3 callersFunctionbuild_model
(config)
agent_transformer/models/build.py:15
↓ 3 callersFunctionbuild_transformer
Builder for Transformer.
downstream/detection/mmdet/models/utils/builder.py:9
↓ 3 callersFunctioncarl_loss
Classification-Aware Regression Loss (CARL). Args: cls_score (Tensor): Predicted classification scores. labels (Tensor): Targets
downstream/detection/mmdet/models/losses/pisa_loss.py:123
↓ 3 callersFunctioncheck_keywords_in_name
(name, keywords=())
agent_transformer/optimizer.py:86
↓ 3 callersFunctioncollect_results_cpu
(result_part, size, tmpdir=None)
downstream/detection/mmdet/apis/test.py:136
↓ 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
downstream/detection/mmdet/utils/compat_config.py:8
↓ 3 callersFunctioncompleted
Async context manager that waits for work to complete on given CUDA streams.
downstream/detection/mmdet/utils/contextmanagers.py:17
↓ 3 callersFunctionconvert_bn
(blobs, state_dict, caffe_name, torch_name, converted_names)
downstream/detection/tools/model_converters/detectron2pytorch.py:11
↓ 3 callersFunctionconvert_conv_fc
(blobs, state_dict, caffe_name, torch_name, converted_names)
downstream/detection/tools/model_converters/detectron2pytorch.py:24
↓ 3 callersMethodcrop
Crop from ``img``
downstream/segmentation/mmseg/datasets/pipelines/transforms.py:610
↓ 3 callersMethodencode_decode
Encode images with backbone and decode into a semantic segmentation map of the same size as input.
downstream/segmentation/mmseg/models/segmentors/encoder_decoder.py:71
↓ 3 callersFunctionenhance_level_to_value
Map from level to values.
downstream/detection/mmdet/datasets/pipelines/auto_augment.py:19
↓ 3 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,
downstream/detection/mmdet/utils/util_random.py:6
↓ 3 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
downstream/detection/mmdet/core/evaluation/recall.py:65
↓ 3 callersMethodevaluate
Evaluation in COCO protocol. Args: results (list[list | tuple]): Testing results of the dataset. metric (str | list[s
downstream/detection/mmdet/datasets/coco.py:592
↓ 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.
downstream/detection/mmdet/core/bbox/transforms.py:6
↓ 3 callersMethodflops
(self)
downstream/detection/mmdet/models/backbones/swin_bsl.py:417
↓ 3 callersMethodflops
(self)
downstream/detection/mmdet/models/backbones/agent_swin.py:595
↓ 3 callersMethodflops
(self)
downstream/segmentation/mmseg/models/backbones/agent_swin.py:595
↓ 3 callersMethodflops
(self)
agent_transformer/models/agent_swin.py:549
↓ 3 callersMethodforward_train
Placeholder for Forward function for training.
downstream/segmentation/mmseg/models/segmentors/base.py:48
↓ 3 callersMethodforward_train
Forward function for training. Args: img (Tensor): Input images. img_metas (list[dict]): List of image info dict wher
downstream/segmentation/mmseg/models/segmentors/encoder_decoder.py:123
↓ 3 callersFunctionfp16_clamp
(x, min=None, max=None)
downstream/detection/mmdet/core/bbox/iou_calculators/iou2d_calculator.py:14
↓ 3 callersFunctiongather_feat
Gather feature according to index. Args: feat (Tensor): Target feature map. ind (Tensor): Target coord index. mask (Tenso
downstream/detection/mmdet/models/utils/gaussian_target.py:234
↓ 3 callersFunctiongen_gaussian_target
Generate 2D gaussian heatmap. Args: heatmap (Tensor): Input heatmap, the gaussian kernel will cover on it and maintain the ma
downstream/detection/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.
downstream/detection/mmdet/datasets/custom.py:143
↓ 3 callersMethodget_ann_info
Get annotation by index. Args: idx (int): Index of data. Returns: dict: Annotation info of specified index.
downstream/segmentation/mmseg/datasets/custom.py:181
↓ 3 callersMethodget_cat_ids
Get category ids of concatenated dataset by index. Args: idx (int): Index of data. Returns: list[int]: All c
downstream/detection/mmdet/datasets/dataset_wrappers.py:50
↓ 3 callersFunctionget_config
Get a yacs CfgNode object with default values.
agent_transformer/config.py:250
↓ 3 callersFunctionget_device
Returns an available device, cpu, cuda or mlu.
downstream/detection/mmdet/utils/util_distribution.py:67
↓ 3 callersFunctionget_device
Returns an available device, cpu, cuda or mlu.
downstream/segmentation/mmseg/utils/util_distribution.py:75
↓ 3 callersMethodget_gt_seg_map_by_idx
Get one ground truth segmentation map for evaluation.
downstream/segmentation/mmseg/datasets/custom.py:254
↓ 3 callersFunctionget_local_maximum
Extract local maximum pixel with given kernel. Args: heat (Tensor): Target heatmap. kernel (int): Kernel size of max pooling. Def
downstream/detection/mmdet/models/utils/gaussian_target.py:190
↓ 3 callersFunctionget_palette
Get palette from various inputs. Args: palette (list[tuple] | str | tuple | :obj:`Color`): palette inputs. num_classes (int): the
downstream/detection/mmdet/core/visualization/palette.py:22
↓ 3 callersFunctionget_results
(filename, dataset='coco', task='bbox', metric=None,
downstream/detection/tools/analysis_tools/robustness_eval.py:156
↓ 3 callersMethodget_results
Get multi-image mask results. Args: mlvl_mask_preds (list[Tensor]): Multi-level mask prediction. Each element in
downstream/detection/mmdet/models/dense_heads/solo_head.py:439
↓ 3 callersMethodget_targets
A wrapper for computing ATSS and FCOS targets for points in multiple images. Args: cls_scores (list[Tensor]): Box iou-awa
downstream/detection/mmdet/models/dense_heads/vfnet_head.py:500
↓ 3 callersFunctionget_topk_from_heatmap
Get top k positions from heatmap. Args: scores (Tensor): Target heatmap with shape [batch, num_classes, height, width].
downstream/detection/mmdet/models/utils/gaussian_target.py:207
↓ 3 callersMethodinference
Inference with slide/whole style. Args: img (Tensor): The input image of shape (N, 3, H, W). img_meta (dict): Image i
downstream/segmentation/mmseg/models/segmentors/encoder_decoder.py:226
↓ 3 callersFunctioninit_segmentor
Initialize a segmentor from config file. Args: config (str or :obj:`mmcv.Config`): Config file path or the config object.
downstream/segmentation/mmseg/apis/inference.py:12
↓ 3 callersFunctioninverse_sigmoid
Inverse function of sigmoid. Args: x (Tensor): The tensor to do the inverse. eps (float): EPS avoid numerical
downstream/detection/mmdet/models/utils/transformer.py:388
↓ 3 callersFunctionisinstance_str
Checks whether x has any class *named* cls_name in its ancestry. Doesn't require access to the class's implementation. Useful for pa
agentsd/utils.py:4
↓ 3 callersFunctionisr_p
Importance-based Sample Reweighting (ISR_P), positive part. Args: cls_score (Tensor): Predicted classification scores. bbox_pred
downstream/detection/mmdet/models/losses/pisa_loss.py:9
↓ 3 callersFunctionlevel_to_value
Map from level to values based on max_value.
downstream/detection/mmdet/datasets/pipelines/auto_augment.py:14
↓ 3 callersMethodload_cats
(self, ids)
downstream/detection/mmdet/datasets/api_wrappers/coco_api.py:39
↓ 3 callersFunctionlog_img_scale
Log image size. Args: img_scale (tuple): Image size to be logged. shape_order (str, optional): The order of image shape.
downstream/detection/mmdet/utils/logger.py:37
↓ 3 callersMethodmake_block_plugins
make plugins for block. Args: in_channels (int): Input channels of plugin. plugins (list[dict]): List of plugins cfg
downstream/segmentation/mmseg/models/backbones/resnet.py:222
↓ 3 callersFunctionmask_matrix_nms
Matrix NMS for multi-class masks. Args: masks (Tensor): Has shape (num_instances, h, w) labels (Tensor): Labels of corresponding
downstream/detection/mmdet/core/post_processing/matrix_nms.py:5
↓ 3 callersFunctionmulti_gpu_test
Test model with multiple gpus. This method tests model with multiple gpus and collects the results under two different modes: gpu and cpu mod
downstream/detection/mmdet/apis/test.py:81
↓ 3 callersFunctionnchw_to_nlc
Flatten [N, C, H, W] shape tensor to [N, L, C] shape tensor. Args: x (Tensor): The input tensor of shape [N, C, H, W] before conversion.
downstream/detection/mmdet/models/utils/transformer.py:49
← previousnext →201–300 of 3,501, ranked by callers