MCPcopy Create free account

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

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

↓ 2 callersFunctionnp2tmp
Save ndarray to local numpy file. Args: array (ndarray): Ndarray to save. temp_file_name (str): Numpy file name. If 'temp_file_na
downstream/segmentation/mmseg/apis/test.py:14
↓ 2 callersMethodoffset_to_pts
Change from point offset to point coordinate.
downstream/detection/mmdet/models/dense_heads/reppoints_head.py:350
↓ 2 callersMethodonnx_export
Test without augmentation.
downstream/detection/mmdet/models/roi_heads/standard_roi_head.py:295
↓ 2 callersFunctionpalette_val
Convert palette to matplotlib palette. Args: palette List[tuple]: A list of color tuples. Returns: List[tuple[float]]: A lis
downstream/detection/mmdet/core/visualization/palette.py:6
↓ 2 callersFunctionparse_require_file
(fpath)
downstream/detection/setup.py:108
↓ 2 callersFunctionparse_require_file
(fpath)
downstream/segmentation/setup.py:74
↓ 2 callersFunctionpil_loader
(path)
agent_transformer/data/cached_image_folder.py:178
↓ 2 callersFunctionpolygon_to_bitmap
Convert masks from the form of polygons to bitmaps. Args: polygons (list[ndarray]): masks in polygon representation height (int):
downstream/detection/mmdet/core/mask/structures.py:1058
↓ 2 callersMethodpre_eval
Collect eval result from each iteration. Args: preds (list[torch.Tensor] | torch.Tensor): the segmentation logit
downstream/segmentation/mmseg/datasets/custom.py:277
↓ 2 callersMethodrandom_sample
Randomly sample an img_scale when ``multiscale_mode=='range'``. Args: img_scales (list[tuple]): Images scale range for sampling.
downstream/detection/mmdet/datasets/pipelines/transforms.py:129
↓ 2 callersMethodrandom_sample
Randomly sample an img_scale when ``multiscale_mode=='range'``. Args: img_scales (list[tuple]): Images scale range for sampling.
downstream/segmentation/mmseg/datasets/pipelines/transforms.py:156
↓ 2 callersMethodrandom_sample_ratio
Randomly sample an img_scale when ``ratio_range`` is specified. A ratio will be randomly sampled from the range specified by ``ratio_
downstream/segmentation/mmseg/datasets/pipelines/transforms.py:183
↓ 2 callersMethodrefine_bboxes
Refine bboxes through stages.
downstream/detection/mmdet/models/dense_heads/cascade_rpn_head.py:672
↓ 2 callersMethodreg_pred
Predict bucketing estimation (cls_pred) and fine regression (offset pred) with side-aware features.
downstream/detection/mmdet/models/roi_heads/bbox_heads/sabl_head.py:271
↓ 2 callersFunctionreorder_cls_channel
(val, num_classes=81)
downstream/detection/tools/model_converters/upgrade_model_version.py:46
↓ 2 callersFunctionresize_pos_embed
(posemb, posemb_new, num_tokens=1, gs_new=())
agent_transformer/models/agent_deit.py:552
↓ 2 callersFunctionresize_pos_embed
(posemb, posemb_new, num_tokens=1, gs_new=())
agent_transformer/models/deit.py:475
↓ 2 callersMethodresize_pos_embed
Resize pos_embed weights. Resize pos_embed using bicubic interpolate method. Args: pos_embed (torch.Tensor): Position emb
downstream/segmentation/mmseg/models/backbones/vit.py:371
↓ 2 callersMethodresize_rel_pos_embed
Resize relative pos_embed weights. This function is modified from https://github.com/microsoft/unilm/blob/master/beit/semantic_segmen
downstream/segmentation/mmseg/models/backbones/beit.py:439
↓ 2 callersMethodrfp_forward
The forward function that also takes the RFP features as input.
downstream/detection/mmdet/models/backbones/detectors_resnet.py:73
↓ 2 callersMethodroi_rescale
Scale RoI coordinates by scale factor. Args: rois (torch.Tensor): RoI (Region of Interest), shape (n, 5) scale_factor
downstream/detection/mmdet/models/roi_heads/roi_extractors/base_roi_extractor.py:62
↓ 2 callersMethodsanitize_coordinates
Sanitizes the input coordinates so that x1 < x2, x1 != x2, x1 >= 0, and x2 <= image_size. Also converts from relative to absolute coor
downstream/detection/mmdet/models/dense_heads/yolact_head.py:910
↓ 2 callersFunctionsave_anns
(name, images, annotations)
downstream/detection/tools/misc/split_coco.py:53
↓ 2 callersFunctionsave_checkpoint_new
(config, epoch, model, max_accuracy, optimizer, lr_scheduler, logger, name=None)
agent_transformer/utils.py:193
↓ 2 callersMethodsave_result
(self, anchors, path=None)
downstream/detection/tools/analysis_tools/optimize_anchors.py:140
↓ 2 callersMethodset_data
Update a dict to `data_fields`. Args: data (dict): A dict contains annotations of image or model predictions. Def
downstream/detection/mmdet/core/data_structures/general_data.py:129
↓ 2 callersMethodset_epoch
(self, epoch)
agent_transformer/data/samplers.py:28
↓ 2 callersMethodset_new_params
(self)
agentsd/patch.py:99
↓ 2 callersFunctionset_random_seed
Set random seed. Args: seed (int): Seed to be used. deterministic (bool): Whether to set the deterministic option for
downstream/detection/mmdet/apis/train.py:52
↓ 2 callersFunctionsetup_multi_processes
Setup multi-processing environment variables.
downstream/detection/mmdet/utils/setup_env.py:10
↓ 2 callersFunctionsetup_multi_processes
Setup multi-processing environment variables.
downstream/segmentation/mmseg/utils/set_env.py:11
↓ 2 callersMethodshow_result
Draw `result` over `img`. Args: img (str or Tensor): The image to be displayed. result (Tensor): The semantic segment
downstream/segmentation/mmseg/models/segmentors/base.py:217
↓ 2 callersFunctionshow_result_pyplot
Visualize the detection results on the image. Args: model (nn.Module): The loaded detector. img (str or np.ndarray): Image filena
downstream/detection/mmdet/apis/inference.py:216
↓ 2 callersFunctionshow_result_pyplot
(img: Union[str, np.ndarray], result: np.ndarray, palette: Optio
downstream/segmentation/tools/onnx2tensorrt.py:77
↓ 2 callersFunctionshow_result_pyplot
Visualize the segmentation results on the image. Args: model (nn.Module): The loaded segmentor. img (str or np.ndarray): Image fi
downstream/segmentation/mmseg/apis/inference.py:106
↓ 2 callersMethodsimple_test_bboxes
Test det bboxes without test-time augmentation. Args: feats (tuple[torch.Tensor]): Multi-level features from the
downstream/detection/mmdet/models/dense_heads/detr_head.py:685
↓ 2 callersMethodsimple_test_mask
Simple test for mask head without augmentation.
downstream/detection/mmdet/models/roi_heads/test_mixins.py:224
↓ 2 callersFunctionskip_pipeline_steps
(config)
downstream/detection/tools/misc/browse_dataset.py:53
↓ 2 callersFunctionsmooth_l1_loss
Smooth L1 loss. Args: pred (torch.Tensor): The prediction. target (torch.Tensor): The learning target of the prediction.
downstream/detection/mmdet/models/losses/smooth_l1_loss.py:12
↓ 2 callersFunctionsplit
(x)
agentsd/merge.py:82
↓ 2 callersMethodto_ndarray
See :func:`BaseInstanceMasks.to_ndarray`.
downstream/detection/mmdet/core/mask/structures.py:503
↓ 2 callersMethodto_ndarray
Convert masks to the format of ndarray.
downstream/detection/mmdet/core/mask/structures.py:900
↓ 2 callersFunctiontotal_area_to_metrics
Calculate evaluation metrics Args: total_area_intersect (ndarray): The intersection of prediction and ground truth histogram o
downstream/segmentation/mmseg/core/evaluation/metrics.py:334
↓ 2 callersFunctionvalidate
(config, data_loader, model, logger)
agent_transformer/main.py:252
↓ 2 callersFunctionvoc_classes
()
downstream/detection/mmdet/core/evaluation/class_names.py:9
↓ 2 callersFunctionwindow_partition
Args: x: (B, H, W, C) window_size (int): window size Returns: windows: (num_windows*B, window_size, window_size, C)
downstream/detection/mmdet/models/backbones/swin_bsl.py:37
↓ 2 callersFunctionwindow_partition
Args: x: (B, H, W, C) window_size (int): window size Returns: windows: (num_windows*B, window_size, window_size, C)
downstream/detection/mmdet/models/backbones/agent_swin.py:41
↓ 2 callersFunctionwindow_partition
Args: x: (B, H, W, C) window_size (int): window size Returns: windows: (num_windows*B, window_size, window_size, C)
downstream/segmentation/mmseg/models/backbones/agent_swin.py:41
↓ 2 callersFunctionwindow_partition
Args: x: (B, H, W, C) window_size (int): window size Returns: windows: (num_windows*B, window_size, window_size, C)
agent_transformer/models/agent_swin.py:38
↓ 2 callersMethodwindow_partition
Args: x: (B, H, W, C) Returns: windows: (num_windows*B, window_size, window_size, C)
downstream/detection/mmdet/models/backbones/swin.py:272
↓ 2 callersMethodwindow_partition
Args: x: (B, H, W, C) Returns: windows: (num_windows*B, window_size, window_size, C)
downstream/segmentation/mmseg/models/backbones/swin.py:272
↓ 2 callersFunctionwindows2img
img_splits_hw: B' H W C
agent_transformer/models/agent_cswin.py:363
↓ 1 callersMethod__init__
(self, strides, ratios, scales=None, base_
downstream/detection/mmdet/core/anchor/anchor_generator.py:61
↓ 1 callersMethod__init__
(self, *args, dynamic_intervals=None, **kwargs)
downstream/detection/mmdet/core/evaluation/eval_hooks.py:26
↓ 1 callersMethod__init__
(self, annotation_file=None)
downstream/detection/mmdet/datasets/coco_panoptic.py:37
↓ 1 callersMethod__init__
(self, ann_file, label_file='', image_level_ann_file='',
downstream/detection/mmdet/datasets/openimages.py:63
↓ 1 callersMethod__init__
(self, num_max_proposals=None)
downstream/detection/mmdet/datasets/pipelines/loading.py:536
↓ 1 callersMethod__init__
(self, num_scales, in_channels, out_channels,
downstream/detection/mmdet/models/necks/yolo_neck.py:92
↓ 1 callersMethod__init__
L2 normalization layer. Args: n_dims (int): Number of dimensions to be normalized scale (float, optional): Defaults t
downstream/detection/mmdet/models/necks/ssd_neck.py:108
↓ 1 callersMethod__init__
(self, rfp_steps, rfp_backbone, aspp_out_channels,
downstream/detection/mmdet/models/necks/rfp.py:78
↓ 1 callersMethod__init__
(self, in_channels, mid_channels, dilation,
downstream/detection/mmdet/models/necks/dilated_encoder.py:24
↓ 1 callersMethod__init__
(self, depth, with_last_pool=False, ceil_mode=True,
downstream/detection/mmdet/models/backbones/ssd_vgg.py:50
↓ 1 callersMethod__init__
(self, groups=1, base_width=4, **kwargs)
downstream/detection/mmdet/models/backbones/resnext.py:143
↓ 1 callersMethod__init__
(self, depth=53, out_indices=(3, 4, 5), frozen_stages=-1,
downstream/detection/mmdet/models/backbones/darknet.py:101
↓ 1 callersMethod__init__
(self, extra, in_channels=3, conv_cfg=None,
downstream/detection/mmdet/models/backbones/hrnet.py:281
↓ 1 callersMethod__init__
Bottleneck block for ResNeXt. If style is "pytorch", the stride-two layer is the 3x3 conv layer, if it is "caffe", the stride-two lay
downstream/detection/mmdet/models/backbones/detectors_resnext.py:14
↓ 1 callersMethod__init__
(self, in_channels, out_channels, mid_channels,
downstream/detection/mmdet/models/backbones/efficientnet.py:41
↓ 1 callersMethod__init__
(self, downsample_times=5, num_stacks=2, stage_channels=(25
downstream/detection/mmdet/models/backbones/hourglass.py:131
↓ 1 callersMethod__init__
(self, *args, mask_feature_head, dynamic_conv_size=1,
downstream/detection/mmdet/models/dense_heads/solov2_head.py:170
↓ 1 callersMethod__init__
(self, in_channels, out_channels, kernel_size=3,
downstream/detection/mmdet/models/dense_heads/guided_anchor_head.py:31
↓ 1 callersMethod__init__
(self, force_topk=False, topk=9, num_classes=80,
downstream/detection/mmdet/models/dense_heads/autoassign_head.py:37
↓ 1 callersMethod__init__
(self, num_classes, in_channels, num_dcn=0,
downstream/detection/mmdet/models/dense_heads/tood_head.py:113
↓ 1 callersMethod__init__
(self, num_classes, in_channels, base_edge_list=(16, 32, 64
downstream/detection/mmdet/models/dense_heads/fovea_head.py:55
↓ 1 callersMethod__init__
(self, num_classes, in_channels, stacked_convs=4,
downstream/detection/mmdet/models/dense_heads/gfl_head.py:88
↓ 1 callersMethod__init__
(self, num_classes, in_channels, num_feat_levels=2,
downstream/detection/mmdet/models/dense_heads/corner_head.py:118
↓ 1 callersMethod__init__
(self, channels, ratio=4, conv_cfg=None, a
downstream/detection/mmdet/models/utils/se_layer.py:88
↓ 1 callersMethod__init__
(self, num_feats, temperature=10000, normalize=False,
downstream/detection/mmdet/models/utils/positional_encoding.py:36
↓ 1 callersMethod__init__
(self, in_channels, out_channels, expand_ratio=0.5,
downstream/detection/mmdet/models/utils/csp_layer.py:96
↓ 1 callersMethod__init__
(self, *args, tempearture=20, power=1.0, eps=1e-6, **kwargs)
downstream/detection/mmdet/models/utils/normed_predictor.py:21
↓ 1 callersMethod__init__
(self, block, inplanes, planes, num_blocks
downstream/detection/mmdet/models/utils/res_layer.py:26
↓ 1 callersMethod__init__
(self, in_channels, out_channels, conv_cfg=None,
downstream/detection/mmdet/models/roi_heads/bbox_heads/double_bbox_head.py:26
↓ 1 callersMethod__init__
(self, in_channels, feat_channels, out_channels,
downstream/detection/mmdet/models/plugins/pixel_decoder.py:34
↓ 1 callersMethod__init__
(self, use_sigmoid=True, beta=2.0, reduction='mean',
downstream/detection/mmdet/models/losses/gfocal_loss.py:146
↓ 1 callersMethod__init__
(self, reduction='mean', loss_weight=1.0)
downstream/detection/mmdet/models/losses/smooth_l1_loss.py:117
↓ 1 callersMethod__init__
(self, bins=10, momentum=0, use_sigmoid=True,
downstream/detection/mmdet/models/losses/ghm_loss.py:39
↓ 1 callersMethod__init__
(self, trt_file: str, cfg: Any, device_id: int)
downstream/segmentation/tools/deploy_test.py:103
↓ 1 callersMethod__init__
(self, *args, by_epoch=False, efficient_test=False,
downstream/segmentation/mmseg/core/evaluation/eval_hooks.py:28
↓ 1 callersMethod__init__
(self, split, **kwargs)
downstream/segmentation/mmseg/datasets/pascal_context.py:47
↓ 1 callersMethod__init__
(self, in_channels, out_channels, norm_layer=dict(type='LN'
downstream/segmentation/mmseg/models/necks/mla_neck.py:80
↓ 1 callersMethod__init__
(self, in_channels=(64, 256, 256), out_channels=128, conv_c
downstream/segmentation/mmseg/models/necks/ic_neck.py:103
↓ 1 callersMethod__init__
(self, img_size=224, patch_size=16, in_channels=3,
downstream/segmentation/mmseg/models/backbones/vit.py:176
↓ 1 callersMethod__init__
(self, groups=1, base_width=4, **kwargs)
downstream/segmentation/mmseg/models/backbones/resnext.py:139
↓ 1 callersMethod__init__
(self, extra, in_channels=3, conv_cfg=None,
downstream/segmentation/mmseg/models/backbones/hrnet.py:299
↓ 1 callersMethod__init__
(self, in_channels, out_channels, stride,
downstream/segmentation/mmseg/models/utils/inverted_residual.py:32
↓ 1 callersMethod__init__
(self, c1_in_channels, c1_channels, **kwargs)
downstream/segmentation/mmseg/models/decode_heads/sep_aspp_head.py:43
↓ 1 callersMethod__init__
(self, isa_channels, down_factor=(8, 8), **kwargs)
downstream/segmentation/mmseg/models/decode_heads/isa_head.py:70
↓ 1 callersMethod__init__
(self, dilations=(1, 6, 12, 18), **kwargs)
downstream/segmentation/mmseg/models/decode_heads/aspp_head.py:65
↓ 1 callersMethod__init__
(self, reduction=2, use_scale=True, mode='embedded_gaussian
downstream/segmentation/mmseg/models/decode_heads/dnl_head.py:108
↓ 1 callersMethod__init__
(self, pool_scales, in_channels, channels, conv_cfg, norm_cfg, act_cfg, align_corners, **kwar
downstream/segmentation/mmseg/models/decode_heads/psp_head.py:25
↓ 1 callersMethod__init__
(self, num_codes=32, use_se_loss=True, add_lateral=False,
downstream/segmentation/mmseg/models/decode_heads/enc_head.py:79
← previousnext →501–600 of 3,501, ranked by callers