Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alinlab/SelfPatch
/ types & classes
Types & classes
81 in github.com/alinlab/SelfPatch
⨍
Functions
386
◇
Types & classes
81
↓ 6 callers
Class
GELayer
Gather-and-Expansion Layer. Args: in_channels (int): Number of input channels. out_channels (int): Number of output channels.
segmentation/backbones/bisenetv2.py:179
↓ 4 callers
Class
DINOHead
selfpatch_vision_transformer.py:445
↓ 4 callers
Class
PatchEmbed
Image to Patch Embedding
selfpatch_vision_transformer.py:244
↓ 3 callers
Class
DropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
selfpatch_vision_transformer.py:41
↓ 3 callers
Class
Mlp
selfpatch_vision_transformer.py:52
↓ 3 callers
Class
VisionTransformer
Vision Transformer
selfpatch_vision_transformer.py:262
↓ 2 callers
Class
AttentionRefinementModule
Attention Refinement Module (ARM) to refine the features of each stage. Args: in_channels (int): The number of input channels. ou
segmentation/backbones/bisenetv1.py:84
↓ 2 callers
Class
ContextGuidedBlock
Context Guided Block for CGNet. This class consists of four components: local feature extractor, surrounding feature extractor, joint feature
segmentation/backbones/cgnet.py:54
↓ 2 callers
Class
InputInjection
Downsampling module for CGNet.
segmentation/backbones/cgnet.py:171
↓ 2 callers
Class
MultiCropWrapper
main_selfpatch.py:136
↓ 2 callers
Class
SelfPatchHead
selfpatch_vision_transformer.py:362
↓ 2 callers
Class
SmoothedValue
Track a series of values and provide access to smoothed values over a window or the global series average.
utils.py:204
↓ 1 callers
Class
Attention
selfpatch_vision_transformer.py:196
↓ 1 callers
Class
Attention
detection/backbone/vit_SelfPatch.py:68
↓ 1 callers
Class
BGALayer
Bilateral Guided Aggregation Layer to fuse the complementary information from both Detail Branch and Semantic Branch. Args: out_chann
segmentation/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
segmentation/backbones/unet.py:16
↓ 1 callers
Class
Block
selfpatch_vision_transformer.py:223
↓ 1 callers
Class
Block
detection/backbone/vit_SelfPatch.py:95
↓ 1 callers
Class
CEBlock
Context Embedding Block for large receptive filed in Semantic Branch. Args: in_channels (int): Number of input channels. Defa
segmentation/backbones/bisenetv2.py:302
↓ 1 callers
Class
ContextPath
Context Path to provide sufficient receptive field. Args: backbone_cfg:(dict): Config of backbone of Context Path. co
segmentation/backbones/bisenetv1.py:129
↓ 1 callers
Class
DINOLoss
main_selfpatch.py:400
↓ 1 callers
Class
DataAugmentationDINO
main_selfpatch.py:487
↓ 1 callers
Class
DetailBranch
Detail Branch with wide channels and shallow layers to capture low-level details and generate high-resolution feature representation. Args:
segmentation/backbones/bisenetv2.py:12
↓ 1 callers
Class
DropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
detection/backbone/vit_SelfPatch.py:38
↓ 1 callers
Class
EfficientMultiheadAttention
An implementation of Efficient Multi-head Attention of Segformer. This module is modified from MultiheadAttention which is a module from mmcv
segmentation/backbones/mit.py:91
↓ 1 callers
Class
FeatureFusionModule
Feature Fusion Module to fuse low level output feature of Spatial Path and high level output feature of Context Path. Args: in_channe
segmentation/backbones/bisenetv1.py:213
↓ 1 callers
Class
FeatureFusionModule
Feature fusion module. Args: higher_in_channels (int): Number of input channels of the higher-resolution branch. lowe
segmentation/backbones/fast_scnn.py:195
↓ 1 callers
Class
GlobalContextExtractor
Global Context Extractor for CGNet. This class is employed to refine the joint feature of both local feature and surrounding context. Ar
segmentation/backbones/cgnet.py:14
↓ 1 callers
Class
GlobalFeatureExtractor
Global feature extractor module. Args: in_channels (int): Number of input channels of the GFE module. Default: 64 blo
segmentation/backbones/fast_scnn.py:83
↓ 1 callers
Class
HRModule
High-Resolution Module for HRNet. In this module, every branch has 4 BasicBlocks/Bottlenecks. Fusion/Exchange is in this module.
segmentation/backbones/hrnet.py:14
↓ 1 callers
Class
LayerScale_Block_CA
selfpatch_vision_transformer.py:115
↓ 1 callers
Class
LearningToDownsample
Learning to downsample module. Args: in_channels (int): Number of input channels. dw_channels (tuple[int]): Number of output chan
segmentation/backbones/fast_scnn.py:13
↓ 1 callers
Class
MixFFN
An implementation of MixFFN of Segformer. The differences between MixFFN & FFN: 1. Use 1X1 Conv to replace Linear layer. 2. Intro
segmentation/backbones/mit.py:18
↓ 1 callers
Class
ONNXRuntimeSegmentor
segmentation/tools/deploy_test.py:22
↓ 1 callers
Class
PatchEmbed
Image to Patch Embedding
detection/backbone/vit_SelfPatch.py:116
↓ 1 callers
Class
Patch_Attention
selfpatch_vision_transformer.py:141
↓ 1 callers
Class
RSoftmax
Radix Softmax module in ``SplitAttentionConv2d``. Args: radix (int): Radix of input. groups (int): Groups of input.
segmentation/backbones/resnest.py:16
↓ 1 callers
Class
SemanticBranch
Semantic Branch which is lightweight with narrow channels and deep layers to obtain high-level semantic context. Args: semantic_chann
segmentation/backbones/bisenetv2.py:364
↓ 1 callers
Class
ShiftWindowMSA
Shifted Window Multihead Self-Attention Module. Args: embed_dims (int): Number of input channels. num_heads (int): Number of atte
segmentation/backbones/swin.py:125
↓ 1 callers
Class
SpatialPath
Spatial Path to preserve the spatial size of the original input image and encode affluent spatial information. Args: in_channels(int)
segmentation/backbones/bisenetv1.py:11
↓ 1 callers
Class
SplitAttentionConv2d
Split-Attention Conv2d in ResNeSt. Args: in_channels (int): Same as nn.Conv2d. out_channels (int): Same as nn.Conv2d. ker
segmentation/backbones/resnest.py:40
↓ 1 callers
Class
StemBlock
Stem Block at the beginning of Semantic Branch. Args: in_channels (int): Number of input channels. Default: 3. out_ch
segmentation/backbones/bisenetv2.py:102
↓ 1 callers
Class
SwinBlock
Args: embed_dims (int): The feature dimension. num_heads (int): Parallel attention heads. feedforward_channels (int): The
segmentation/backbones/swin.py:285
↓ 1 callers
Class
SwinBlockSequence
Implements one stage in Swin Transformer. Args: embed_dims (int): The feature dimension. num_heads (int): Parallel attention head
segmentation/backbones/swin.py:377
↓ 1 callers
Class
TensorRTSegmentor
segmentation/tools/deploy_test.py:101
↓ 1 callers
Class
TransformerEncoderLayer
Implements one encoder layer in Segformer. Args: embed_dims (int): The feature dimension. num_heads (int): Parallel attention hea
segmentation/backbones/mit.py:174
↓ 1 callers
Class
TransformerEncoderLayer
Implements one encoder layer in Vision Transformer. Args: embed_dims (int): The feature dimension. num_heads (int): Parallel atte
segmentation/backbones/vit_SelfPatch.py:20
↓ 1 callers
Class
WindowMSA
Window based multi-head self-attention (W-MSA) module with relative position bias. Args: embed_dims (int): Number of input channels.
segmentation/backbones/swin.py:20
Class
BasicBlock
Basic block for ResNet.
segmentation/backbones/resnet.py:14
Class
BiSeNetV1
BiSeNetV1 backbone. This backbone is the implementation of `BiSeNet: Bilateral Segmentation Network for Real-time Semantic Segmentation <
segmentation/backbones/bisenetv1.py:266
Class
BiSeNetV2
BiSeNetV2: Bilateral Network with Guided Aggregation for Real-time Semantic Segmentation. This backbone is the implementation of `BiSeNet
segmentation/backbones/bisenetv2.py:545
Class
Bottleneck
Bottleneck block for ResNeSt. Args: inplane (int): Input planes of this block. planes (int): Middle planes of this block.
segmentation/backbones/resnest.py:147
Class
Bottleneck
Bottleneck block for ResNeXt. If style is "pytorch", the stride-two layer is the 3x3 conv layer, if it is "caffe", the stride-two layer is th
segmentation/backbones/resnext.py:12
Class
Bottleneck
Bottleneck block for ResNet. If style is "pytorch", the stride-two layer is the 3x3 conv layer, if it is "caffe", the stride-two layer is the
segmentation/backbones/resnet.py:99
Class
CGNet
CGNet backbone. This backbone is the implementation of `A Light-weight Context Guided Network for Semantic Segmentation <https://arxiv.org/ab
segmentation/backbones/cgnet.py:187
Class
Class_Attention
selfpatch_vision_transformer.py:72
Class
DeconvModule
Deconvolution upsample module in decoder for UNet (2X upsample). This module uses deconvolution to upsample feature map in the decoder of UNe
segmentation/backbones/unet.py:90
Class
FastSCNN
Fast-SCNN Backbone. This backbone is the implementation of `Fast-SCNN: Fast Semantic Segmentation Network <https://arxiv.org/abs/1902.04502>`
segmentation/backbones/fast_scnn.py:272
Class
GaussianBlur
Apply Gaussian Blur to the PIL image.
utils.py:36
Class
HRNet
HRNet backbone. This backbone is the implementation of `High-Resolution Representations for Labeling Pixels and Regions <https://arxiv.org/ab
segmentation/backbones/hrnet.py:218
Class
InterpConv
Interpolation upsample module in decoder for UNet. This module uses interpolation to upsample feature map in the decoder of UNet. It consists
segmentation/backbones/unet.py:151
Class
LARS
Almost copy-paste from https://github.com/facebookresearch/barlowtwins/blob/main/main.py
utils.py:533
Class
MMsegHandler
segmentation/tools/torchserve/mmseg_handler.py:14
Class
MetricLogger
utils.py:293
Class
MixVisionTransformer
The backbone of Segformer. This backbone is the implementation of `SegFormer: Simple and Efficient Design for Semantic Segmentation with
segmentation/backbones/mit.py:246
Class
Mlp
detection/backbone/vit_SelfPatch.py:49
Class
MobileNetV2
MobileNetV2 backbone. This backbone is the implementation of `MobileNetV2: Inverted Residuals and Linear Bottlenecks <https://arxiv.org/a
segmentation/backbones/mobilenet_v2.py:14
Class
MobileNetV3
MobileNetV3 backbone. This backbone is the improved implementation of `Searching for MobileNetV3 <https://ieeexplore.ieee.org/document/900883
segmentation/backbones/mobilenet_v3.py:15
Class
MultiCropWrapper
Perform forward pass separately on each resolution input. The inputs corresponding to a single resolution are clubbed and single forward
utils.py:574
Class
PCA
Class to compute and apply PCA.
utils.py:634
Class
Patch_Block
selfpatch_vision_transformer.py:175
Class
ResNeSt
ResNeSt backbone. This backbone is the implementation of `ResNeSt: Split-Attention Networks <https://arxiv.org/abs/2004.08955>`_. Args:
segmentation/backbones/resnest.py:271
Class
ResNeXt
ResNeXt backbone. This backbone is the implementation of `Aggregated Residual Transformations for Deep Neural Networks <https://arxiv.org
segmentation/backbones/resnext.py:88
Class
ResNet
ResNet backbone. This backbone is the improved implementation of `Deep Residual Learning for Image Recognition <https://arxiv.org/abs/1512.03
segmentation/backbones/resnet.py:311
Class
ResNetV1c
ResNetV1c variant described in [1]_. Compared with default ResNet(ResNetV1b), ResNetV1c replaces the 7x7 conv in the input stem with three 3x
segmentation/backbones/resnet.py:689
Class
ResNetV1d
ResNetV1d variant described in [1]_. Compared with default ResNet(ResNetV1b), ResNetV1d replaces the 7x7 conv in the input stem with three 3x
segmentation/backbones/resnet.py:704
Class
SelfPatch_ViT
Based on timm and DeiT code bases https://github.com/rwightman/pytorch-image-models/tree/master/timm https://github.com/facebookresearch/
detection/backbone/vit_SelfPatch.py:135
Class
SelfPatch_ViT
Vision Transformer. This backbone is the implementation of `An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <h
segmentation/backbones/vit_SelfPatch.py:98
Class
Solarization
Apply Solarization to the PIL image.
utils.py:57
Class
SwinTransformer
Swin Transformer backbone. This backbone is the implementation of `Swin Transformer: Hierarchical Vision Transformer using Shifted Window
segmentation/backbones/swin.py:463
Class
UNet
UNet backbone. This backbone is the implementation of `U-Net: Convolutional Networks for Biomedical Image Segmentation <https://arxiv.org/abs
segmentation/backbones/unet.py:225