MCPcopy Create free account

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

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

↓ 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/segmentation/mmseg/models/utils/shape_convert.py:19
↓ 3 callersMethodnorm1
nn.Module: normalization layer after the first convolution layer
downstream/detection/mmdet/models/backbones/resnet.py:249
↓ 3 callersFunctionparse_shape
(shape)
downstream/detection/tools/deployment/onnx2tensorrt.py:208
↓ 3 callersFunctionprint_coco_results
(results)
downstream/detection/tools/analysis_tools/robustness_eval.py:9
↓ 3 callersFunctionrandom_negative
Randomly negate value based on random_negative_prob.
downstream/detection/mmdet/datasets/pipelines/auto_augment.py:24
↓ 3 callersFunctionreduce_tensor
(tensor)
agent_transformer/utils.py:242
↓ 3 callersFunctionreduce_tensor
(tensor)
agent_transformer/utils_ema.py:268
↓ 3 callersMethodresize
See :func:`BaseInstanceMasks.resize`.
downstream/detection/mmdet/core/mask/structures.py:278
↓ 3 callersFunctionsave_checkpoint_ema_new
(config, epoch, model, model_ema, max_accuracy, max_accuracy_e, optimizer, lr_scheduler, logger, name=None)
agent_transformer/utils_ema.py:214
↓ 3 callersFunctionscale_boxes
Expand an array of boxes by a given scale. Args: bboxes (Tensor): Shape (m, 4) scale (float): The scale factor of bboxes Ret
downstream/detection/mmdet/core/bbox/assigners/center_region_assigner.py:10
↓ 3 callersMethodset_meta_info
Add meta information. Args: meta_info (dict): A dict contains the meta information of image. such as `img_shape`,
downstream/detection/mmdet/core/data_structures/general_data.py:97
↓ 3 callersMethodsimple_test_bboxes
Test only det bboxes without augmentation. Args: x (tuple[Tensor]): Feature maps of all scale level. img_metas (list[
downstream/detection/mmdet/models/roi_heads/test_mixins.py:51
↓ 3 callersFunctionsingle_gpu_test
Test with single GPU by progressive mode. Args: model (nn.Module): Model to be tested. data_loader (utils.data.Dataloader): Pytor
downstream/segmentation/mmseg/apis/test.py:34
↓ 3 callersMethodsingle_level_grid_priors
Generate grid anchors of a single level. Note: This function is usually called by method ``self.grid_priors``. Args:
downstream/detection/mmdet/core/anchor/anchor_generator.py:241
↓ 3 callersMethodtrain
Convert the model into training mode will keeping the normalization layer freezed.
downstream/detection/mmdet/models/backbones/hrnet.py:581
↓ 3 callersFunctionun_gz
(src, dst)
downstream/segmentation/tools/convert_datasets/stare.py:15
↓ 2 callersMethod__init__
(self, dataset, input_shape, logger, devic
downstream/detection/tools/analysis_tools/optimize_anchors.py:80
↓ 2 callersMethod__init__
(self, momentum=0.0002, interval=1, skip_buffers=False,
downstream/detection/mmdet/core/hook/ema.py:32
↓ 2 callersMethod__init__
(self, engine_file, class_names, device_id, output_names=None)
downstream/detection/mmdet/core/export/model_wrappers.py:155
↓ 2 callersMethod__init__
(self, in_channels, out_channels, num_blocks=6,
downstream/detection/mmdet/models/necks/dyhead.py:148
↓ 2 callersMethod__init__
(self, block, inplanes, planes, num_blocks
downstream/detection/mmdet/models/backbones/detectors_resnet.py:146
↓ 2 callersMethod__init__
(self, scales=4, base_width=26, style='pytorch',
downstream/detection/mmdet/models/backbones/res2net.py:303
↓ 2 callersMethod__init__
(self, in_channels, out_channels, kernel_size,
downstream/detection/mmdet/models/backbones/trident_resnet.py:33
↓ 2 callersMethod__init__
(self, in_channels, out_channels, kernel_size=1,
downstream/detection/mmdet/models/backbones/csp_darknet.py:30
↓ 2 callersMethod__init__
(self, in_channels, out_channels, kernel_size=3,
downstream/detection/mmdet/models/dense_heads/cascade_rpn_head.py:42
↓ 2 callersMethod__init__
( self, num_classes, in_channels, feat_channels=256, stacked_convs=4,
downstream/detection/mmdet/models/dense_heads/solo_head.py:50
↓ 2 callersMethod__init__
(self, num_shared_convs=0, num_shared_fcs=0, num_cls_convs=
downstream/detection/mmdet/models/roi_heads/bbox_heads/convfc_bbox_head.py:22
↓ 2 callersMethod__init__
(self, img_size=224, patch_size=16, in_channels=3,
downstream/segmentation/mmseg/models/backbones/beit.py:269
↓ 2 callersMethod__init__
(self, in_channels=3, embed_dims=768, conv_type='Conv2d',
downstream/segmentation/mmseg/models/utils/embed.py:111
↓ 2 callersMethod__init__
( self, in_channels=256, feat_channels=64, out_channels=None,
downstream/segmentation/mmseg/models/decode_heads/knet_head.py:37
↓ 2 callersMethod__init__
(self, ocr_channels, scale=1, **kwargs)
downstream/segmentation/mmseg/models/decode_heads/ocr_head.py:98
↓ 2 callersMethod__init__
(self, in_channels, channels)
downstream/segmentation/mmseg/models/decode_heads/da_head.py:21
↓ 2 callersMethod__init__
(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, drop=0., attn_drop=0., drop_path=0., act
agent_transformer/models/agent_deit.py:268
↓ 2 callersMethod__init__
(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, drop=0., attn_drop=0., drop_path=0., act
agent_transformer/models/deit.py:201
↓ 2 callersMethod__nice__
str: a "nice" summary string describing this module
downstream/detection/mmdet/utils/util_mixins.py:76
↓ 2 callersMethod_assign
Assign gt to priors using SimOTA. Args: pred_scores (Tensor): Classification scores of one image, a 2D-Tensor with
downstream/detection/mmdet/core/bbox/assigners/sim_ota_assigner.py:95
↓ 2 callersMethod_bbox_decode
(self, priors, bbox_preds)
downstream/detection/mmdet/models/dense_heads/yolox_head.py:301
↓ 2 callersMethod_build_stacked_convs
Initialize conv layers of a single level head.
downstream/detection/mmdet/models/dense_heads/yolox_head.py:145
↓ 2 callersFunction_calc_dynamic_intervals
(start_interval, dynamic_interval_list)
downstream/detection/mmdet/core/evaluation/eval_hooks.py:12
↓ 2 callersFunction_cfg
(url='', **kwargs)
agent_transformer/models/agent_cswin.py:27
↓ 2 callersMethod_check_head
Check whether the `num_classes` in head matches the length of `CLASSES` in `dataset`. Args: runner (obj:`EpochBasedRunner
downstream/detection/mmdet/datasets/utils.py:120
↓ 2 callersMethod_crop_image_and_paste
Crop image with a given center and size, then paste the cropped image to a blank image with two centers align. This function is equiv
downstream/detection/mmdet/datasets/pipelines/transforms.py:1701
↓ 2 callersMethod_decide_interval
(self, runner)
downstream/detection/mmdet/core/evaluation/eval_hooks.py:35
↓ 2 callersMethod_decide_interval
(self, runner)
downstream/detection/mmdet/core/evaluation/eval_hooks.py:84
↓ 2 callersMethod_filter_boxes
Check whether the center of each box is in the patch. Args: patch (list[int]): The cropped area, [left, top, right, bottom].
downstream/detection/mmdet/datasets/pipelines/transforms.py:1685
↓ 2 callersMethod_forward_feature
Forward function for feature maps before classifying each pixel with ``self.cls_seg`` fc. Args: inputs (list[Tensor]): Li
downstream/segmentation/mmseg/models/decode_heads/psp_head.py:95
↓ 2 callersMethod_freeze_stages
Freeze stages param and norm stats.
downstream/segmentation/mmseg/models/backbones/hrnet.py:570
↓ 2 callersMethod_freeze_stages
Freeze stages param and norm stats.
downstream/segmentation/mmseg/models/backbones/resnet.py:640
↓ 2 callersMethod_fuse_glbctx
Fuse global context feats with roi feats.
downstream/detection/mmdet/models/roi_heads/scnet_roi_head.py:73
↓ 2 callersFunction_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
downstream/detection/mmdet/core/visualization/image.py:40
↓ 2 callersMethod_get_bboxes_single
Transform outputs of a single image into bbox predictions. Args: cls_score_list (list[Tensor]): Box scores from all scale
downstream/detection/mmdet/models/dense_heads/paa_head.py:537
↓ 2 callersMethod_get_bboxes_single
Transform outputs for a single batch item into bbox predictions. Args: tl_heat (Tensor): Top-left corner heatmap for current leve
downstream/detection/mmdet/models/dense_heads/corner_head.py:704
↓ 2 callersMethod_get_border
Get final border for the target size. This function generates a ``final_border`` according to image's shape. The area between ``final
downstream/detection/mmdet/datasets/pipelines/transforms.py:1666
↓ 2 callersMethod_get_coarse_point_feats
Sample from fine grained features. Args: prev_output (list[Tensor]): Prediction of previous decode head. points (Tens
downstream/segmentation/mmseg/models/decode_heads/point_head.py:155
↓ 2 callersMethod_get_eval_results
Get model evaluation results.
downstream/detection/mmdet/core/hook/wandblogger_hook.py:307
↓ 2 callersMethod_get_fine_grained_point_feats
Sample fine grained feats from each level feature map and concatenate them together. Args: x (tuple[Tensor]): Feature map
downstream/detection/mmdet/models/roi_heads/point_rend_roi_head.py:66
↓ 2 callersMethod_get_fine_grained_point_feats
Sample from fine grained features. Args: x (list[Tensor]): Feature pyramid from by neck or backbone. points (Tensor):
downstream/segmentation/mmseg/models/decode_heads/point_head.py:131
↓ 2 callersMethod_get_lr
(self, t)
agent_transformer/lr_scheduler.py:82
↓ 2 callersMethod_get_wandb_bboxes
Get list of structured dict for logging bounding boxes to W&B. Args: bboxes (list): List of bounding box coordinates in
downstream/detection/mmdet/core/hook/wandblogger_hook.py:459
↓ 2 callersMethod_get_wandb_masks
Get list of structured dict for logging masks to W&B. Args: masks (list): List of masks. labels (int): List of label
downstream/detection/mmdet/core/hook/wandblogger_hook.py:511
↓ 2 callersMethod_init_pred_table
Initialize the W&B Tables for model evaluation.
downstream/detection/mmdet/core/hook/wandblogger_hook.py:319
↓ 2 callersFunction_interpolate_as
Interpolate the `source` (4D) to the shape of the `target`.
downstream/detection/mmdet/models/utils/misc.py:55
↓ 2 callersMethod_load_bboxes
Private function to load bounding box annotations. Args: results (dict): Result dict from :obj:`mmdet.CustomDataset`. Re
downstream/detection/mmdet/datasets/pipelines/loading.py:245
↓ 2 callersMethod_load_labels
Private function to load label annotations. Args: results (dict): Result dict from :obj:`mmdet.CustomDataset`. Returns:
downstream/detection/mmdet/datasets/pipelines/loading.py:277
↓ 2 callersMethod_log_ckpt_as_artifact
Log model checkpoint as W&B Artifact. Args: model_path (str): Path of the checkpoint to log. aliases (list): List of
downstream/detection/mmdet/core/hook/wandblogger_hook.py:294
↓ 2 callersMethod_log_eval_table
Log the W&B Tables for model evaluation. The table will be logged multiple times creating new version. Use this to compare models at
downstream/detection/mmdet/core/hook/wandblogger_hook.py:574
↓ 2 callersMethod_log_predictions
(self, results)
downstream/detection/mmdet/core/hook/wandblogger_hook.py:399
↓ 2 callersMethod_mask_point_forward_test
Mask refining process with point head in testing. Args: x (tuple[Tensor]): Feature maps of all scale level. rois (Ten
downstream/detection/mmdet/models/roi_heads/point_rend_roi_head.py:104
↓ 2 callersMethod_meshgrid
(self, x, y, row_major=True)
downstream/detection/mmdet/core/anchor/point_generator.py:12
↓ 2 callersMethod_meshgrid
(self, x, y, row_major=True)
downstream/detection/mmdet/core/anchor/point_generator.py:70
↓ 2 callersMethod_mosaic_combine
Calculate global coordinate of mosaic image and local coordinate of cropped sub-image. Args: loc (str): Index for the sub
downstream/segmentation/mmseg/datasets/pipelines/transforms.py:1266
↓ 2 callersMethod_parse_losses
Parse the raw outputs (losses) of the network. Args: losses (dict): Raw output of the network, which usually contain
downstream/detection/mmdet/models/detectors/base.py:176
↓ 2 callersMethod_parse_losses
Parse the raw outputs (losses) of the network. Args: losses (dict): Raw output of the network, which usually contain
downstream/segmentation/mmseg/models/segmentors/base.py:171
↓ 2 callersMethod_random_scale
Randomly sample an img_scale according to ``ratio_range`` and ``multiscale_mode``. If ``ratio_range`` is specified, a ratio will be s
downstream/detection/mmdet/datasets/pipelines/transforms.py:182
↓ 2 callersFunction_retrieve_data_cfg
(_data_cfg, skip_type, show_origin)
downstream/segmentation/tools/browse_dataset.py:124
↓ 2 callersMethod_save_image_gts_results
Display or save image with groung truths and predictions from a model. Args: dataset (Dataset): A PyTorch dataset.
downstream/detection/tools/analysis_tools/analyze_results.py:93
↓ 2 callersMethod_segm2json
Convert instance segmentation results to COCO json style.
downstream/detection/mmdet/datasets/coco.py:256
↓ 2 callersMethod_swap_ema_parameters
Swap the parameter of model with parameter in ema_buffer.
downstream/detection/mmdet/core/hook/ema.py:94
↓ 2 callersFunction_update_input_img
(img_list, img_meta_list, update_ori_shape=False)
downstream/segmentation/tools/pytorch2onnx.py:102
↓ 2 callersFunctionadaptive_avg_pool2d
Handle empty batch dimension to adaptive_avg_pool2d. Args: input (tensor): 4D tensor. output_size (int, tuple[int,int]): the targ
downstream/detection/mmdet/models/utils/brick_wrappers.py:15
↓ 2 callersFunctionaddAnnItem
(annotation_id, image_id, category_id, bbox, difficult_flag)
downstream/detection/tools/dataset_converters/pascal_voc.py:106
↓ 2 callersMethodadd_gt_
Add ground truth as assigned results. Args: gt_labels (torch.Tensor): Labels of gt boxes
downstream/detection/mmdet/core/bbox/assigners/assign_result.py:192
↓ 2 callersMethodalbu_builder
Import a module from albumentations. It inherits some of :func:`build_from_cfg` logic. Args: cfg (dict): Config dict. It
downstream/detection/mmdet/datasets/pipelines/transforms.py:1413
↓ 2 callersMethodanchor_offset
Get offset for deformable conv based on anchor shape NOTE: currently support deformable kernel_size=3 and dilation=1 Args:
downstream/detection/mmdet/models/dense_heads/cascade_rpn_head.py:328
↓ 2 callersFunctionautolabel
Attach a text label above each bar in *rects*, displaying its height.
downstream/detection/tools/analysis_tools/coco_error_analysis.py:54
↓ 2 callersFunctionbbox_flip
Flip bboxes horizontally or vertically. Args: bboxes (Tensor): Shape (..., 4*k) img_shape (tuple): Image shape. direction
downstream/detection/mmdet/core/bbox/transforms.py:22
↓ 2 callersMethodbbox_pred_split
Split batch bbox prediction back to each image.
downstream/detection/mmdet/models/roi_heads/bbox_heads/sabl_head.py:301
↓ 2 callersFunctionbbox_rescale
Rescale bounding box w.r.t. scale_factor. Args: bboxes (Tensor): Shape (n, 4) for bboxes or (n, 5) for rois scale_factor (float):
downstream/detection/mmdet/core/bbox/transforms.py:213
↓ 2 callersFunctionbuild_dataset
(is_train, config)
agent_transformer/data/build.py:65
↓ 2 callersFunctionbuild_ddp
Build DistributedDataParallel module by device type. If device is cuda, return a MMDistributedDataParallel model; if device is mlu, return a
downstream/detection/mmdet/utils/util_distribution.py:34
↓ 2 callersFunctionbuild_ddp
Build DistributedDataParallel module by device type. If device is cuda, return a MMDistributedDataParallel module; if device is mlu, return a
downstream/segmentation/mmseg/utils/util_distribution.py:40
↓ 2 callersFunctionbuild_dp
build DataParallel module by device type. if device is cuda, return a MMDataParallel model; if device is mlu, return a MLUDataParallel model.
downstream/detection/mmdet/utils/util_distribution.py:10
↓ 2 callersFunctionbuild_dp
build DataParallel module by device type. if device is cuda, return a MMDataParallel module; if device is mlu, return a MLUDataParallel modul
downstream/segmentation/mmseg/utils/util_distribution.py:14
↓ 2 callersFunctionbuild_head
Build head.
downstream/segmentation/mmseg/models/builder.py:28
↓ 2 callersFunctionbuild_loader
(config)
agent_transformer/data/build.py:15
↓ 2 callersFunctionbuild_model_from_cfg
Build a model from config and load the given checkpoint. Args: config_path (str): the OpenMMLab config for the model we want to
downstream/detection/mmdet/core/export/pytorch2onnx.py:65
↓ 2 callersFunctionbuild_optimizer
Build optimizer, set weight decay of normalization to 0 by default.
agent_transformer/optimizer.py:4
↓ 2 callersFunctionbuild_scheduler
(config, optimizer, n_iter_per_epoch)
agent_transformer/lr_scheduler.py:14
↓ 2 callersMethodcalc_reweight_factor
Compute reweight_factor for regression and classification loss.
downstream/detection/mmdet/models/dense_heads/ddod_head.py:275
↓ 2 callersFunctioncast_tensor_type
(x, scale=1., dtype=None)
downstream/detection/mmdet/core/bbox/iou_calculators/iou2d_calculator.py:7
← previousnext →301–400 of 3,501, ranked by callers