Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LeapLabTHU/Agent-Attention
/ types & classes
Types & classes
701 in github.com/LeapLabTHU/Agent-Attention
⨍
Functions
3,501
◇
Types & classes
701
↓ 21 callers
Class
AssignResult
Stores assignments between predicted and truth boxes. Attributes: num_gts (int): the number of truth boxes considered when computing this
downstream/detection/mmdet/core/bbox/assigners/assign_result.py:7
↓ 18 callers
Class
PolygonMasks
This class represents masks in the form of polygons. Polygons is a list of three levels. The first level of the list corresponds to objects,
downstream/detection/mmdet/core/mask/structures.py:548
↓ 16 callers
Class
BitmapMasks
This class represents masks in the form of bitmaps. Args: masks (ndarray): ndarray of masks in shape (N, H, W), where N is th
downstream/detection/mmdet/core/mask/structures.py:193
↓ 10 callers
Class
ResLayer
ResLayer to build ResNet style backbone for RPF in detectoRS. The difference between this module and base class is that we pass ``rfp_inplane
downstream/detection/mmdet/models/backbones/detectors_resnet.py:120
↓ 6 callers
Class
Compose
Compose multiple transforms sequentially. Args: transforms (Sequence[dict | callable]): Sequence of transform object or confi
downstream/detection/mmdet/datasets/pipelines/compose.py:10
↓ 6 callers
Class
GELayer
Gather-and-Expansion Layer. Args: in_channels (int): Number of input channels. out_channels (int): Number of output channels.
downstream/segmentation/mmseg/models/backbones/bisenetv2.py:179
↓ 6 callers
Class
MlvlPointGenerator
Standard points generator for multi-level (Mlvl) feature maps in 2D points-based detectors. Args: strides (list[int] | list[tuple[int
downstream/detection/mmdet/core/anchor/point_generator.py:44
↓ 6 callers
Class
PatchEmbed
Image to Patch Embedding
downstream/segmentation/mmseg/models/backbones/agent_pvt.py:234
↓ 5 callers
Class
Compose
Compose multiple transforms sequentially. Args: transforms (Sequence[dict | callable]): Sequence of transform object or confi
downstream/segmentation/mmseg/datasets/pipelines/compose.py:10
↓ 5 callers
Class
Upsample
downstream/segmentation/mmseg/ops/wrappers.py:30
↓ 4 callers
Class
COCO
This class is almost the same as official pycocotools package. It implements some snake case function aliases. So that the COCO class has the
downstream/detection/mmdet/datasets/api_wrappers/coco_api.py:11
↓ 4 callers
Class
CSWinBlock
agent_transformer/models/agent_cswin.py:263
↓ 4 callers
Class
CSWinTransformer
Vision Transformer with support for patch or hybrid CNN input stage
agent_transformer/models/agent_cswin.py:392
↓ 4 callers
Class
InvertedResidual
InvertedResidual block for MobileNetV2. Args: in_channels (int): The input channels of the InvertedResidual block. out_channels (
downstream/segmentation/mmseg/models/utils/inverted_residual.py:9
↓ 4 callers
Class
LoadImage
A simple pipeline to load image.
downstream/segmentation/mmseg/apis/inference.py:43
↓ 4 callers
Class
PPM
Pooling Pyramid Module used in PSPNet. Args: pool_scales (tuple[int]): Pooling scales used in Pooling Pyramid Module.
downstream/segmentation/mmseg/models/decode_heads/psp_head.py:11
↓ 4 callers
Class
PyramidVisionTransformer
agent_transformer/models/agent_pvt.py:237
↓ 3 callers
Class
AttentionRefinementModule
Attention Refinement Module (ARM) to refine the features of each stage. Args: in_channels (int): The number of input channels. ou
downstream/segmentation/mmseg/models/backbones/bisenetv1.py:84
↓ 3 callers
Class
CSPLayer
Cross Stage Partial Layer. Args: in_channels (int): The input channels of the CSP layer. out_channels (int): The output channels
downstream/detection/mmdet/models/utils/csp_layer.py:75
↓ 3 callers
Class
ConcatDataset
A wrapper of concatenated dataset. Same as :obj:`torch.utils.data.dataset.ConcatDataset`, but concat the group flag for image aspect ratio.
downstream/detection/mmdet/datasets/dataset_wrappers.py:17
↓ 3 callers
Class
DyDCNv2
ModulatedDeformConv2d with normalization layer used in DyHead. This module cannot be configured with `conv_cfg=dict(type='DCNv2')` because Dy
downstream/detection/mmdet/models/necks/dyhead.py:17
↓ 3 callers
Class
FeatureAdaption
Feature Adaption Module. Feature Adaption Module is implemented based on DCN v1. It uses anchor shape prediction rather than feature map to
downstream/detection/mmdet/models/dense_heads/guided_anchor_head.py:16
↓ 3 callers
Class
InstanceData
Data structure for instance-level annnotations or predictions. Subclass of :class:`GeneralData`. All value in `data_fields` should have the s
downstream/detection/mmdet/core/data_structures/instance_data.py:10
↓ 3 callers
Class
Merge_Block
agent_transformer/models/agent_cswin.py:374
↓ 3 callers
Class
Mlp
agent_transformer/models/agent_pvt.py:21
↓ 3 callers
Class
NonBottleneck1d
Non-bottleneck block of ERFNet. Args: channels (int): Number of channels in Non-bottleneck block. drop_rate (float): Probability
downstream/segmentation/mmseg/models/backbones/erfnet.py:68
↓ 3 callers
Class
ONNXRuntimeDetector
Wrapper for detector's inference with ONNXRuntime.
downstream/detection/mmdet/core/export/model_wrappers.py:96
↓ 3 callers
Class
PatchEmbed
r""" Image to Patch Embedding Args: img_size (int): Image size. Default: 224. patch_size (int): Patch token size. Default: 4.
downstream/detection/mmdet/models/backbones/swin_bsl.py:426
↓ 3 callers
Class
ResLayer
ResLayer to build ResNet style backbone. Args: block (nn.Module): block used to build ResLayer. inplanes (int): inplanes of block
downstream/detection/mmdet/models/utils/res_layer.py:7
↓ 3 callers
Class
ResLayer
ResLayer to build ResNet style backbone. Args: block (nn.Module): block used to build ResLayer. inplanes (int): inplanes of block
downstream/segmentation/mmseg/models/utils/res_layer.py:7
↓ 3 callers
Class
SamplingResult
Bbox sampling result. Example: >>> # xdoctest: +IGNORE_WANT >>> from mmdet.core.bbox.samplers.sampling_result import * # NOQA
downstream/detection/mmdet/core/bbox/samplers/sampling_result.py:7
↓ 2 callers
Class
AdaptivePadding
Applies padding to input (if needed) so that input can get fully covered by filter you specified. It support two modes "same" and "corner". The
downstream/detection/mmdet/models/utils/transformer.py:62
↓ 2 callers
Class
AdaptivePadding
Applies padding to input (if needed) so that input can get fully covered by filter you specified. It support two modes "same" and "corner". The
downstream/segmentation/mmseg/models/utils/embed.py:12
↓ 2 callers
Class
AgentAttention
agent_transformer/models/agent_cswin.py:146
↓ 2 callers
Class
BiCornerPool
Bidirectional Corner Pooling Module (TopLeft, BottomRight, etc.) Args: in_channels (int): Input channels of module. out_channels
downstream/detection/mmdet/models/dense_heads/corner_head.py:21
↓ 2 callers
Class
Block
agent_transformer/models/deit.py:199
↓ 2 callers
Class
CascadeFeatureFusion
Cascade Feature Fusion Unit in ICNet. Args: low_channels (int): The number of input channels for low resolution feature map.
downstream/segmentation/mmseg/models/necks/ic_neck.py:10
↓ 2 callers
Class
ConcatDataset
A wrapper of concatenated dataset. Same as :obj:`torch.utils.data.dataset.ConcatDataset`, but support evaluation and formatting results
downstream/segmentation/mmseg/datasets/dataset_wrappers.py:17
↓ 2 callers
Class
ContextGuidedBlock
Context Guided Block for CGNet. This class consists of four components: local feature extractor, surrounding feature extractor, joint feature
downstream/segmentation/mmseg/models/backbones/cgnet.py:54
↓ 2 callers
Class
DetectionBlock
Detection block in YOLO neck. Let out_channels = n, the DetectionBlock contains: Six ConvLayers, 1 Conv2D Layer and 1 YoloLayer. The firs
downstream/detection/mmdet/models/necks/yolo_neck.py:12
↓ 2 callers
Class
DownsamplerBlock
Downsampler block of ERFNet. This module is a little different from basical ConvModule. The features from Conv and MaxPool layers are con
downstream/segmentation/mmseg/models/backbones/erfnet.py:11
↓ 2 callers
Class
HourglassModule
Hourglass Module for HourglassNet backbone. Generate module recursively and use BasicBlock as the base unit. Args: depth (int): Dept
downstream/detection/mmdet/models/backbones/hourglass.py:12
↓ 2 callers
Class
InputInjection
Downsampling module for CGNet.
downstream/segmentation/mmseg/models/backbones/cgnet.py:171
↓ 2 callers
Class
LePEAttention
agent_transformer/models/agent_cswin.py:66
↓ 2 callers
Class
LoadAnnotations
Load annotations for semantic segmentation. Args: reduce_zero_label (bool): Whether reduce all label value by 1. Usually used
downstream/segmentation/mmseg/datasets/pipelines/loading.py:91
↓ 2 callers
Class
PreActResidualConvUnit
ResidualConvUnit, pre-activate residual unit. Args: in_channels (int): number of channels in the input feature map. act_cfg (dict
downstream/segmentation/mmseg/models/decode_heads/dpt_head.py:100
↓ 2 callers
Class
RandomCycleIter
Shuffle the list and do it again after the list have traversed. The implementation logic is referred to https://github.com/wutong16/Distribut
downstream/detection/mmdet/datasets/samplers/class_aware_sampler.py:138
↓ 2 callers
Class
SELayer
Squeeze-and-Excitation Module. Args: channels (int): The input (and output) channels of the SE layer. ratio (int): Squeeze ratio
downstream/detection/mmdet/models/utils/se_layer.py:9
↓ 2 callers
Class
SelfAttentionBlock
Self-Attention Module. Args: in_channels (int): Input channels of key/query feature. channels (int): Output channels of key/query
downstream/segmentation/mmseg/models/decode_heads/isa_head.py:13
↓ 2 callers
Class
SelfAttentionBlock
Make a ANN used SelfAttentionBlock. Args: low_in_channels (int): Input channels of lower level feature, which is the key feat
downstream/segmentation/mmseg/models/decode_heads/ann_head.py:33
↓ 2 callers
Class
SubsetRandomSampler
r"""Samples elements randomly from a given list of indices, without replacement. Arguments: indices (sequence): a sequence of indices
agent_transformer/data/samplers.py:11
↓ 2 callers
Class
TaskDecomposition
Task decomposition module in task-aligned predictor of TOOD. Args: feat_channels (int): Number of feature channels in TOOD head.
downstream/detection/mmdet/models/dense_heads/tood_head.py:17
↓ 2 callers
Class
TensorRTDetector
Wrapper for detector's inference with TensorRT.
downstream/detection/mmdet/core/export/model_wrappers.py:152
↓ 2 callers
Class
TransformerEncoderLayer
Implements one encoder layer in Vision Transformer. Args: embed_dims (int): The feature dimension. num_heads (int): Parallel atte
downstream/segmentation/mmseg/models/backbones/vit.py:23
↓ 2 callers
Class
UpsamplerBlock
Upsampler block of ERFNet. Args: in_channels (int): Number of input channels. out_channels (int): Number of output channels.
downstream/segmentation/mmseg/models/backbones/erfnet.py:148
↓ 1 callers
Class
ACM
Adaptive Context Module used in APCNet. Args: pool_scale (int): Pooling scale used in Adaptive Context Module to extract regi
downstream/segmentation/mmseg/models/decode_heads/apc_head.py:12
↓ 1 callers
Class
AFNB
Asymmetric Fusion Non-local Block(AFNB) Args: low_in_channels (int): Input channels of lower level feature, which is the key
downstream/segmentation/mmseg/models/decode_heads/ann_head.py:80
↓ 1 callers
Class
APNB
Asymmetric Pyramid Non-local Block (APNB) Args: in_channels (int): Input channels of key/query feature, which is the key feat
downstream/segmentation/mmseg/models/decode_heads/ann_head.py:134
↓ 1 callers
Class
ASPP
ASPP (Atrous Spatial Pyramid Pooling) This is an implementation of the ASPP module used in DetectoRS (https://arxiv.org/pdf/2006.02334.pdf)
downstream/detection/mmdet/models/necks/rfp.py:12
↓ 1 callers
Class
ASPPModule
Atrous Spatial Pyramid Pooling (ASPP) Module. Args: dilations (tuple[int]): Dilation rate of each layer. in_channels (int): Input
downstream/segmentation/mmseg/models/decode_heads/aspp_head.py:11
↓ 1 callers
Class
AbsolutePositionEmbedding
An implementation of the absolute position embedding in PVT. Args: pos_shape (int): The shape of the absolute position embedding.
downstream/detection/mmdet/models/backbones/pvt.py:291
↓ 1 callers
Class
AdaptiveConv
AdaptiveConv used to adapt the sampling location with the anchors. Args: in_channels (int): Number of channels in the input image
downstream/detection/mmdet/models/dense_heads/cascade_rpn_head.py:20
↓ 1 callers
Class
AgentAttention
r""" Window based multi-head self attention (W-MSA) module with relative position bias. It supports both of shifted and non-shifted window. A
downstream/detection/mmdet/models/backbones/agent_swin.py:73
↓ 1 callers
Class
AgentAttention
downstream/detection/mmdet/models/backbones/agent_pvt.py:81
↓ 1 callers
Class
AgentAttention
r""" Window based multi-head self attention (W-MSA) module with relative position bias. It supports both of shifted and non-shifted window. A
downstream/segmentation/mmseg/models/backbones/agent_swin.py:73
↓ 1 callers
Class
AgentAttention
downstream/segmentation/mmseg/models/backbones/agent_pvt.py:81
↓ 1 callers
Class
AgentAttention
r""" Window based multi-head self attention (W-MSA) module with relative position bias. It supports both of shifted and non-shifted window. A
agent_transformer/models/agent_swin.py:191
↓ 1 callers
Class
AgentAttention
agent_transformer/models/agent_pvt.py:85
↓ 1 callers
Class
AgentAttention
agent_transformer/models/agent_deit.py:180
↓ 1 callers
Class
AgentBlock
agent_transformer/models/agent_deit.py:266
↓ 1 callers
Class
AgentSwinTransformer
r""" Swin Transformer A PyTorch impl of : `Swin Transformer: Hierarchical Vision Transformer using Shifted Windows` - https://arxiv
agent_transformer/models/agent_swin.py:606
↓ 1 callers
Class
Attention
downstream/detection/mmdet/models/backbones/agent_pvt.py:36
↓ 1 callers
Class
Attention
downstream/segmentation/mmseg/models/backbones/agent_pvt.py:36
↓ 1 callers
Class
Attention
agent_transformer/models/agent_pvt.py:40
↓ 1 callers
Class
Attention
agent_transformer/models/deit.py:172
↓ 1 callers
Class
AvoidOOM
Try to convert inputs to FP16 and CPU if got a PyTorch's CUDA Out of Memory error. It will do the following steps: 1. First retry after c
downstream/detection/mmdet/utils/memory.py:79
↓ 1 callers
Class
BEiTAttention
Window based multi-head self-attention (W-MSA) module with relative position bias. Args: embed_dims (int): Number of input channels.
downstream/segmentation/mmseg/models/backbones/beit.py:27
↓ 1 callers
Class
BEiTTransformerEncoderLayer
Implements one encoder layer in Vision Transformer. Args: embed_dims (int): The feature dimension. num_heads (int): Parallel atte
downstream/segmentation/mmseg/models/backbones/beit.py:155
↓ 1 callers
Class
BGALayer
Bilateral Guided Aggregation Layer to fuse the complementary information from both Detail Branch and Semantic Branch. Args: out_chann
downstream/segmentation/mmseg/models/backbones/bisenetv2.py:433
↓ 1 callers
Class
BasicConvBlock
Basic convolutional block for UNet. This module consists of several plain convolutional layers. Args: in_channels (int): Number of i
downstream/segmentation/mmseg/models/backbones/unet.py:16
↓ 1 callers
Class
BasicLayer
A basic Swin Transformer layer for one stage. Args: dim (int): Number of input channels. input_resolution (tuple[int]): Input re
downstream/detection/mmdet/models/backbones/swin_bsl.py:355
↓ 1 callers
Class
BasicLayer
A basic Swin Transformer layer for one stage. Args: dim (int): Number of input channels. input_resolution (tuple[int]): Input re
downstream/detection/mmdet/models/backbones/agent_swin.py:524
↓ 1 callers
Class
BasicLayer
A basic Swin Transformer layer for one stage. Args: dim (int): Number of input channels. input_resolution (tuple[int]): Input re
downstream/segmentation/mmseg/models/backbones/agent_swin.py:524
↓ 1 callers
Class
BasicLayer
A basic Swin Transformer layer for one stage. Args: dim (int): Number of input channels. input_resolution (tuple[int]): Input re
agent_transformer/models/agent_swin.py:483
↓ 1 callers
Class
BasicResBlock
Basic residual block. This block is a little different from the block in the ResNet backbone. The kernel size of conv1 is 1 in this block whi
downstream/detection/mmdet/models/roi_heads/bbox_heads/double_bbox_head.py:11
↓ 1 callers
Class
Block
downstream/detection/mmdet/models/backbones/agent_pvt.py:202
↓ 1 callers
Class
Block
downstream/segmentation/mmseg/models/backbones/agent_pvt.py:202
↓ 1 callers
Class
Block
agent_transformer/models/agent_pvt.py:177
↓ 1 callers
Class
Bottleneck
Bottleneck block for DilatedEncoder used in `YOLOF. <https://arxiv.org/abs/2103.09460>`. The Bottleneck contains three ConvLayers and one re
downstream/detection/mmdet/models/necks/dilated_encoder.py:10
↓ 1 callers
Class
Bottleneck
downstream/detection/mmdet/models/backbones/resnet.py:97
↓ 1 callers
Class
CAM
Channel Attention Module (CAM)
downstream/segmentation/mmseg/models/decode_heads/da_head.py:50
↓ 1 callers
Class
CEBlock
Context Embedding Block for large receptive filed in Semantic Branch. Args: in_channels (int): Number of input channels. Defa
downstream/segmentation/mmseg/models/backbones/bisenetv2.py:302
↓ 1 callers
Class
COCOPanoptic
This wrapper is for loading the panoptic style annotation file. The format is shown in the CocoPanopticDataset class. Args: annotati
downstream/detection/mmdet/datasets/coco_panoptic.py:28
↓ 1 callers
Class
CachedImageFolder
A generic data loader where the images are arranged in this way: :: root/dog/xxx.png root/dog/xxy.png root/dog/xxz.png
agent_transformer/data/cached_image_folder.py:208
↓ 1 callers
Class
CenterPrior
Center Weighting module to adjust the category-specific prior distributions. Args: force_topk (bool): When no point falls into gt_bbo
downstream/detection/mmdet/models/dense_heads/autoassign_head.py:21
↓ 1 callers
Class
ClassAwareSampler
r"""Sampler that restricts data loading to the label of the dataset. A class-aware sampling strategy to effectively tackle the non-uniform cl
downstream/detection/mmdet/datasets/samplers/class_aware_sampler.py:11
↓ 1 callers
Class
ClassBalancedDataset
A wrapper of repeated dataset with repeat factor. Suitable for training on class imbalanced datasets like LVIS. Following the sampling strate
downstream/detection/mmdet/datasets/dataset_wrappers.py:211
↓ 1 callers
Class
CocoDataset
downstream/detection/mmdet/datasets/coco.py:23
↓ 1 callers
Class
ConditionalPositionEncoding
The Conditional Position Encoding (CPE) module. The CPE is the implementation of 'Conditional Positional Encodings for Vision Transformers <h
downstream/segmentation/mmseg/models/backbones/twins.py:315
↓ 1 callers
Class
ContextPath
Context Path to provide sufficient receptive field. Args: backbone_cfg:(dict): Config of backbone of Context Path. co
downstream/segmentation/mmseg/models/backbones/bisenetv1.py:129
next →
1–100 of 701, ranked by callers