Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/devinxzhang/MFuser
/ functions
Functions
1,143 in github.com/devinxzhang/MFuser
⨍
Functions
1,143
◇
Types & classes
269
↓ 2 callers
Method
__init__
(self, inplanes, planes, stride=1)
models/backbones/eva_clip/modified_resnet.py:13
↓ 2 callers
Method
__wct_core
(self, cont_feat, styl_feat)
mmseg/models/uda/photo_wct_batch.py:172
↓ 2 callers
Method
_add_eos_if_not_present
Do not add eos again if user already added it.
models/backbones/siglip/tokenization_siglip.py:191
↓ 2 callers
Function
_build_text_tower
( embed_dim: int, text_cfg: CLIPTextCfg, quick_gelu: bool = False, cast_dtype:
models/backbones/eva_clip/model.py:177
↓ 2 callers
Function
_build_vision_tower
( embed_dim: int, vision_cfg: CLIPVisionCfg, quick_gelu: bool = False, cast_dt
models/backbones/eva_clip/model.py:94
↓ 2 callers
Method
_convert_id_to_token
(self, index: int)
models/backbones/siglip/tokenization_utils.py:1075
↓ 2 callers
Method
_convert_token_to_id_with_added_voc
(self, token)
models/backbones/siglip/tokenization_utils.py:733
↓ 2 callers
Method
_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
models/backbones/siglip/modeling_siglip.py:252
↓ 2 callers
Method
_freeze_stages
Freeze stages param and norm stats.
mmseg/models/backbones/resnet.py:638
↓ 2 callers
Function
_is_control
Checks whether `char` is a control character.
models/backbones/siglip/tokenization_utils.py:355
↓ 2 callers
Function
_is_punctuation
Checks whether `char` is a punctuation character.
models/backbones/siglip/tokenization_utils.py:367
↓ 2 callers
Function
_is_whitespace
Checks whether `char` is a whitespace character.
models/backbones/siglip/tokenization_utils.py:343
↓ 2 callers
Method
_make_causal_mask
Make causal mask used for bi-directional self-attention.
models/backbones/siglip/modeling_siglip.py:222
↓ 2 callers
Method
_meshgrid
(self, x, y, row_major=True)
mmseg/core/anchor/point_generator.py:11
↓ 2 callers
Method
_meshgrid
(self, x, y, row_major=True)
mmseg/core/anchor/point_generator.py:68
↓ 2 callers
Function
_rescan_model_configs
()
models/backbones/eva_clip/factory.py:29
↓ 2 callers
Method
_update_total_vocab_size
Update the size of the full vocabulary with the added tokens. Counts the `keys` and not the `values` because otherwise if there is a
models/backbones/siglip/tokenization_utils.py:505
↓ 2 callers
Function
accuracy
Calculate accuracy according to the prediction and target. Args: pred (torch.Tensor): The model prediction, shape (N, num_class, ...)
mmseg/models/losses/accuracy.py:6
↓ 2 callers
Method
after_extract_feat
(self, x)
models/segmentors/mfuser_eva_clip.py:90
↓ 2 callers
Method
after_extract_feat
(self, x)
models/segmentors/mfuser_clip.py:92
↓ 2 callers
Method
after_extract_feat
(self, x)
models/segmentors/mfuser_siglip.py:92
↓ 2 callers
Function
basic_clean
(text)
models/backbones/eva_clip/tokenizer.py:60
↓ 2 callers
Function
broadcat
(tensors, dim = -1)
models/backbones/eva_clip/rope.py:7
↓ 2 callers
Function
build_attention
Builder for attention.
mmseg/models/plugins/transformerlayers.py:44
↓ 2 callers
Function
build_feedforward_network
Builder for feed-forward network (FFN).
mmseg/models/plugins/transformerlayers.py:49
↓ 2 callers
Function
build_model_from_openai_state_dict
( state_dict: dict, quick_gelu=True, cast_dtype=torch.float16, )
models/backbones/eva_clip/model.py:371
↓ 2 callers
Function
build_sampler
Builder of box sampler.
mmseg/core/box/builder.py:8
↓ 2 callers
Function
build_transformer_layer
Builder for transformer layer.
mmseg/models/plugins/transformerlayers.py:54
↓ 2 callers
Function
bytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
models/backbones/utils.py:20
↓ 2 callers
Function
bytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
models/backbones/eva_clip/tokenizer.py:26
↓ 2 callers
Function
calc_grad_magnitude
(grads, norm_type=2.0)
mmseg/models/uda/dacs.py:34
↓ 2 callers
Function
collect_env
Collect the information of the running environments.
mmseg/utils/collect_env.py:13
↓ 2 callers
Method
contrast
Contrast distortion.
mmseg/datasets/pipelines/transforms.py:823
↓ 2 callers
Method
convert_ids_to_tokens
(self, ids: int, skip_special_tokens: bool = False)
models/backbones/siglip/tokenization_utils.py:1038
↓ 2 callers
Method
convert_tokens_to_string
(self, tokens: List[str])
models/backbones/siglip/tokenization_utils.py:1078
↓ 2 callers
Function
create_model
( model_name: str, pretrained: Optional[str] = None, precision: str = 'fp32',
models/backbones/eva_clip/factory.py:214
↓ 2 callers
Method
decode
This method forwards all its arguments to SiglipTokenizer's [`~PreTrainedTokenizer.decode`]. Please refer to the docstring of this me
models/backbones/siglip/processing_siglip.py:123
↓ 2 callers
Function
download_pretrained_from_hf
( model_id: str, filename: str = 'open_clip_pytorch_model.bin', revision=None,
models/backbones/eva_clip/pretrained.py:293
↓ 2 callers
Function
download_pretrained_from_url
( url: str, cache_dir: Union[str, None] = None, )
models/backbones/eva_clip/pretrained.py:239
↓ 2 callers
Function
drop_add_residual_stochastic_depth
( x: Tensor, residual_func: Callable[[Tensor], Tensor], sample_drop_ratio: float = 0.0, )
models/backbones/dino_layers/block.py:117
↓ 2 callers
Function
drop_add_residual_stochastic_depth_list
( x_list: List[Tensor], residual_func: Callable[[Tensor, Any], Tensor], sample_drop_ratio: float =
models/backbones/dino_layers/block.py:188
↓ 2 callers
Method
encode
(self, text)
models/backbones/utils.py:121
↓ 2 callers
Method
encode_decode
(self, img, img_metas)
models/segmentors/mfuser_eva_clip.py:131
↓ 2 callers
Method
encode_decode
(self, img, img_metas)
models/segmentors/mfuser_clip.py:131
↓ 2 callers
Method
encode_decode
(self, img, img_metas)
models/segmentors/mfuser_siglip.py:131
↓ 2 callers
Method
extract_feat
Extract features from images.
mmseg/models/segmentors/encoder_decoder.py:71
↓ 2 callers
Method
extract_feat
(self, img)
models/segmentors/mfuser_eva_clip.py:86
↓ 2 callers
Method
extract_feat
(self, img)
models/segmentors/mfuser_clip.py:88
↓ 2 callers
Method
extract_feat
(self, img)
models/segmentors/mfuser_siglip.py:88
↓ 2 callers
Method
feat_dist_gram
(self, G1, G2, mask=None)
mmseg/models/uda/stylization.py:125
↓ 2 callers
Method
forward
Forward function for `FFN`. The function would add x to the output tensor if residue is None.
mmseg/models/utils/transformer.py:318
↓ 2 callers
Method
forward
Placeholder of forward function.
mmseg/models/decode_heads/decode_head.py:167
↓ 2 callers
Method
forward_features
(self, x, return_all_features=False)
models/backbones/eva_clip/eva_vit_model.py:553
↓ 2 callers
Method
forward_head
Forward for head part which is called after every decoder layer. Args: decoder_out (Tensor): in shape (num_queries, batch_size, c
mmseg/models/decode_heads/mask2former_head.py:406
↓ 2 callers
Method
forward_head
Forward for head part which is called after every decoder layer. Args: decoder_out (Tensor): in shape (num_queries, batch_size, c
mmseg/models/decode_heads/tqdm_head.py:374
↓ 2 callers
Method
forward_test
Args: imgs (List[Tensor]): the outer list indicates test-time augmentations and inner Tensor should have a shape
mmseg/models/segmentors/base.py:66
↓ 2 callers
Function
get_attn_bias_and_cat
this will perform the index select, cat the tensors, and provide the attn_bias from cache
models/backbones/dino_layers/block.py:164
↓ 2 callers
Method
get_cast_dtype
(self)
models/backbones/eva_clip/transformer.py:512
↓ 2 callers
Method
get_crop_bbox
Randomly get a crop bounding box.
mmseg/datasets/pipelines/transforms.py:516
↓ 2 callers
Method
get_imnet_model
(self)
mmseg/models/uda/dacs.py:83
↓ 2 callers
Method
get_imnet_model
(self)
mmseg/models/uda/stylization.py:75
↓ 2 callers
Method
get_pad_shape
(self, input_shape)
mmseg/models/utils/embed.py:71
↓ 2 callers
Method
get_pad_shape
Calculate the padding size of input. Args: input_shape (:obj:`torch.Size`): arrange as (H, W). Returns: Tupl
mmseg/models/plugins/transformerlayers.py:112
↓ 2 callers
Function
get_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
models/backbones/utils.py:41
↓ 2 callers
Function
get_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
models/backbones/eva_clip/tokenizer.py:48
↓ 2 callers
Function
get_pretrained_tag
(pretrained_model)
models/backbones/eva_clip/factory.py:154
↓ 2 callers
Function
get_pretrained_url
(model: str, tag: str)
models/backbones/eva_clip/pretrained.py:234
↓ 2 callers
Function
get_uncertain_point_coords_with_randomness
Get ``num_points`` most uncertain points with random points during train. Sample points in [0, 1] x [0, 1] coordinate space based on their
mmseg/models/utils/point_sample.py:32
↓ 2 callers
Method
get_vocab
(self)
models/backbones/siglip/tokenization_siglip.py:156
↓ 2 callers
Function
has_hf_hub
(necessary=False)
models/backbones/eva_clip/pretrained.py:285
↓ 2 callers
Function
inverse_sigmoid
Inverse function of sigmoid. Args: x (Tensor): The tensor to do the inverse. eps (float): EPS avoid numerical
mmseg/models/utils/transformer.py:235
↓ 2 callers
Function
list_pretrained_tags_by_model
return all pretrain tags for the specified model architecture
models/backbones/eva_clip/pretrained.py:213
↓ 2 callers
Function
load_clip_text_state_dict
(checkpoint_path: str, map_location: str='cpu', is_openai: bool=False, skip_list:list=[])
models/backbones/eva_clip/factory.py:146
↓ 2 callers
Function
load_clip_visual_state_dict
(checkpoint_path: str, map_location: str='cpu', is_openai: bool=False, skip_list:list=[])
models/backbones/eva_clip/factory.py:133
↓ 2 callers
Method
load_text_embeddings
(self)
mmseg/models/decode_heads/maskclip_head.py:55
↓ 2 callers
Method
load_visual_projs
(self)
mmseg/models/decode_heads/maskclip_head.py:60
↓ 2 callers
Function
make_2tuple
(x)
models/backbones/dino_layers/patch_embed.py:16
↓ 2 callers
Function
make_divisible
Make divisible function. This function rounds the channel number to the nearest value that can be divisible by the divisor. It is taken from
mmseg/models/utils/make_divisible.py:4
↓ 2 callers
Method
masked_feat_dist
(self, f1, f2, mask=None)
mmseg/models/uda/dacs.py:146
↓ 2 callers
Function
multi_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
mmseg/apis/test.py:107
↓ 2 callers
Method
norm1
nn.Module: normalization layer after the first convolution layer
mmseg/models/backbones/resnet.py:254
↓ 2 callers
Function
norm_cdf
(x)
models/backbones/siglip/modeling_siglip.py:53
↓ 2 callers
Function
patch_device
(module)
models/backbones/eva_clip/openai.py:97
↓ 2 callers
Function
patch_float
(module)
models/backbones/eva_clip/openai.py:121
↓ 2 callers
Method
random_sample
Randomly sample an img_scale when ``multiscale_mode=='range'``. Args: img_scales (list[tuple]): Images scale range for sampling.
mmseg/datasets/pipelines/transforms.py:91
↓ 2 callers
Method
random_sample_ratio
Randomly sample an img_scale when ``ratio_range`` is specified. A ratio will be randomly sampled from the range specified by ``ratio_
mmseg/datasets/pipelines/transforms.py:118
↓ 2 callers
Method
remove_punctuation
(self, text: str)
models/backbones/siglip/tokenization_siglip.py:269
↓ 2 callers
Method
reset_classifier
(self, num_classes, global_pool='')
models/backbones/eva_clip/eva_vit_model.py:549
↓ 2 callers
Method
resize_pos_embed
Resize pos_embed weights. Resize pos_embed using bicubic interpolate method. Args: pos_embed (torch.Tensor): Position emb
mmseg/models/backbones/vit.py:386
↓ 2 callers
Method
set_grad_checkpointing
(self, enable=True)
models/backbones/eva_clip/model.py:243
↓ 2 callers
Method
show_result
Draw `result` over `img`. Args: img (str or Tensor): The image to be displayed. result (Tensor): The semantic segment
mmseg/models/segmentors/base.py:201
↓ 2 callers
Function
single_gpu_test
Test with single GPU. Args: model (nn.Module): Model to be tested. data_loader (utils.data.Dataloader): Pytorch data loader.
mmseg/apis/test.py:34
↓ 2 callers
Method
stem
(self, x)
models/backbones/eva_clip/modified_resnet.py:166
↓ 2 callers
Function
strong_transform
(param, data=None, target=None)
mmseg/models/utils/dacs_transforms.py:9
↓ 2 callers
Function
tokenize
Returns the tokenized representation of given input string(s) Parameters ---------- texts : Union[str, List[str]] An input s
models/backbones/eva_clip/tokenizer.py:156
↓ 2 callers
Function
total_area_to_metrics
Calculate evaluation metrics Args: total_area_intersect (ndarray): The intersection of prediction and ground truth histogram o
mmseg/core/evaluation/metrics.py:437
↓ 2 callers
Function
variance_scaling_
(tensor, scale=1.0, mode="fan_in", distribution="normal")
models/backbones/siglip/modeling_siglip.py:94
↓ 2 callers
Function
whitespace_clean
(text)
models/backbones/eva_clip/tokenizer.py:66
↓ 1 callers
Function
InfiniteSampler
(n)
mmseg/models/uda/sampler.py:5
↓ 1 callers
Method
__compute_label_info
(self, cont_seg, styl_seg)
mmseg/models/uda/photo_wct_batch.py:106
← previous
next →
101–200 of 1,143, ranked by callers