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
↓ 75 callers
Method
to
Change the device of the data inplace. Example: >>> self = SamplingResult.random() >>> print(f'self = {self.to(None)}
mmseg/core/box/samplers/sampling_result.py:55
↓ 51 callers
Function
_pcfg
(url='', hf_hub='', filename='', mean=None, std=None)
models/backbones/eva_clip/pretrained.py:18
↓ 43 callers
Method
split
Will look for the words added to the trie within `text`. Output is the original string splitted along the boundaries of the words fou
models/backbones/siglip/tokenization_utils.py:106
↓ 38 callers
Method
update
Updates the Trie with new tokens provided as arguments. Args: *args: Variable number of words to be added to the Trie.
models/backbones/siglip/tokenization_utils.py:65
↓ 29 callers
Method
info
(self)
mmseg/models/utils/assigner.py:23
↓ 27 callers
Function
resize
(input, size=None, scale_factor=None, mode='nearest', align_corner
mmseg/ops/wrappers.py:9
↓ 17 callers
Function
add_prefix
Add prefix for dict. Args: inputs (dict): The input dict with str keys. prefix (str): The prefix to add. Returns: d
mmseg/core/utils/misc.py:24
↓ 16 callers
Method
get_model
(self)
mmseg/models/uda/uda_decorator.py:34
↓ 12 callers
Method
_transform_inputs
Transform inputs for decoder. Args: inputs (list[Tensor]): List of multi-level img features. Returns: Tensor
mmseg/models/decode_heads/decode_head.py:139
↓ 12 callers
Method
norm2
nn.Module: normalization layer after the second convolution layer
mmseg/models/backbones/resnet.py:66
↓ 11 callers
Method
__init__
(self, in_features, hidden_features=None, out_features=None
mmseg/models/backbones/mix_transformer.py:22
↓ 11 callers
Method
cls_seg
Classify each pixel.
mmseg/models/decode_heads/decode_head.py:213
↓ 11 callers
Method
norm1
nn.Module: the normalization layer named "norm1"
mmseg/models/backbones/resnet.py:585
↓ 10 callers
Method
__init__
(self, embed_dims=256, feedforward_channels=1024, num_fcs=2
mmseg/models/plugins/transformerlayers.py:586
↓ 10 callers
Method
__init__
( self, dim, num_heads=8, qkv_bias=True, scaled_co
models/backbones/eva_clip/transformer.py:155
↓ 10 callers
Function
build_loss
Build loss.
mmseg/models/builder.py:56
↓ 10 callers
Function
subplotimg
(ax, img, title, range_in_title=False, palette=Cit
mmseg/models/utils/visualization.py:78
↓ 9 callers
Method
__init__
(self, embed_dims=256, feedforward_channels=1024, num_fcs=2
mmseg/models/utils/transformer.py:282
↓ 9 callers
Method
__init__
(self, hidden_act, hidden_size, intermediate_size)
models/backbones/siglip/modeling_siglip.py:677
↓ 9 callers
Method
_parse_losses
Parse the raw outputs (losses) of the network. Args: losses (dict): Raw output of the network, which usually contain
mmseg/models/segmentors/base.py:166
↓ 9 callers
Method
convert
Multiple with alpha and add beat with clip.
mmseg/datasets/pipelines/transforms.py:808
↓ 8 callers
Method
__init__
(self, drop_prob=None)
models/backbones/clip/models.py:32
↓ 8 callers
Method
add
Passes over every char (utf-8 char) on word and recursively adds it to the internal `data` trie representation. The special key `""`
models/backbones/siglip/tokenization_utils.py:75
↓ 8 callers
Method
backward
(ctx, grad_output)
models/backbones/eva_clip/utils.py:319
↓ 8 callers
Function
build_segmentor
Build segmentor.
mmseg/models/builder.py:82
↓ 8 callers
Function
build_transformer_layer_sequence
Builder for transformer encoder and transformer decoder.
mmseg/models/plugins/transformerlayers.py:59
↓ 8 callers
Function
to_tensor
Convert objects of various python types to :obj:`torch.Tensor`. Supported types are: :class:`numpy.ndarray`, :class:`torch.Tensor`, :class:`S
mmseg/datasets/pipelines/formating.py:13
↓ 7 callers
Method
__init__
( self, in_features, hidden_features=None, out_features=None, act_
models/backbones/eva_clip/eva_vit_model.py:52
↓ 7 callers
Method
convert_tokens_to_ids
Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the vocabulary. Args:
models/backbones/siglip/tokenization_utils.py:711
↓ 7 callers
Function
get_module
Get `nn.ModuleDict` to fit the `MMDistributedDataParallel` interface. Args: module (MMDistributedDataParallel | nn.ModuleDict): The input
mmseg/models/uda/uda_decorator.py:8
↓ 7 callers
Function
resize
(input, size=None, scale_factor=None, mode='nearest', align_corner
mmseg/models/utils/wrappers.py:8
↓ 7 callers
Function
weight_reduce_loss
Apply element-wise weight and reduce loss. Args: loss (Tensor): Element-wise loss. weight (Tensor): Element-wise weights.
mmseg/models/losses/utils.py:48
↓ 6 callers
Function
build_positional_encoding
Builder for Position Encoding.
mmseg/models/plugins/transformerlayers.py:39
↓ 6 callers
Method
forward_plugin
Forward function for plugins.
mmseg/models/backbones/resnet.py:246
↓ 6 callers
Function
get_root_logger
Get the root logger. The logger will be initialized if it has not been initialized. By default a StreamHandler will be added. If `log_file` i
mmseg/utils/logger.py:8
↓ 6 callers
Function
multi_apply
Apply function to a list of arguments. Note: This function applies the ``func`` to multiple inputs and map the multiple outputs o
mmseg/core/utils/misc.py:2
↓ 5 callers
Function
_ntuple
(n)
models/backbones/eva_clip/utils.py:277
↓ 5 callers
Function
build_dataset
Build datasets.
mmseg/datasets/builder.py:66
↓ 5 callers
Method
build_project
Build projection layer for key/query/value/out.
mmseg/models/utils/self_attention_block.py:101
↓ 5 callers
Method
get_ema_model
(self)
mmseg/models/uda/dacs.py:80
↓ 5 callers
Function
get_pretrained_cfg
(model: str, tag: str)
models/backbones/eva_clip/pretrained.py:227
↓ 5 callers
Method
init_weights
(self)
mmseg/models/utils/transformer.py:491
↓ 5 callers
Function
load_state_dict
(checkpoint_path: str, map_location: str='cpu', model_key: str='model|module|state_dict', is_openai: bool=Fals
models/backbones/eva_clip/factory.py:79
↓ 5 callers
Function
rotate_half
(x)
models/backbones/eva_clip/rope.py:23
↓ 5 callers
Method
single_level_grid_priors
Generate grid Points of a single level. Note: This function is usually called by method ``self.grid_priors``. Args:
mmseg/core/anchor/point_generator.py:116
↓ 4 callers
Method
__feature_wct
(self, cont_feat, styl_feat, cont_seg, styl_seg)
mmseg/models/uda/photo_wct_batch.py:120
↓ 4 callers
Method
__init__
(self, depth, in_channels=3, stem_channels=64,
mmseg/models/backbones/resnet.py:394
↓ 4 callers
Function
_clean_tag
(tag: str)
models/backbones/eva_clip/pretrained.py:191
↓ 4 callers
Method
_make_layer
(self, planes, blocks, stride=1)
models/backbones/eva_clip/modified_resnet.py:132
↓ 4 callers
Function
build_layer
(in_channels, out_channels, type, **kwargs)
mmseg/models/decode_heads/daformer_head.py:81
↓ 4 callers
Function
download_pretrained
( cfg: Dict, force_hf_hub: bool = False, cache_dir: Union[str, None] = None, )
models/backbones/eva_clip/pretrained.py:304
↓ 4 callers
Method
encode
(self, text)
models/backbones/eva_clip/tokenizer.py:139
↓ 4 callers
Function
eval_metrics
Calculate evaluation metrics Args: results (list[ndarray] | list[str]): List of prediction segmentation maps or list of predic
mmseg/core/evaluation/metrics.py:360
↓ 4 callers
Method
from_pretrained
(cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs)
models/backbones/siglip/configuration_siglip.py:114
↓ 4 callers
Method
get_gram_matrix
(self, f)
mmseg/models/uda/stylization.py:118
↓ 4 callers
Method
init_weights
(self, pretrained=None)
models/backbones/clip/models.py:395
↓ 4 callers
Function
load_checkpoint
(model, checkpoint_path, model_key="model|module|state_dict", strict=True, device='cpu')
models/backbones/eva_clip/factory.py:107
↓ 4 callers
Method
norm3
nn.Module: normalization layer after the third convolution layer
mmseg/models/backbones/resnet.py:264
↓ 4 callers
Function
np2tmp
Save ndarray to local numpy file. Args: array (ndarray): Ndarray to save. temp_file_name (str): Numpy file name. If 'temp_file_na
mmseg/apis/test.py:13
↓ 4 callers
Method
pre_pipeline
Prepare results dict for pipeline.
mmseg/datasets/custom.py:181
↓ 4 callers
Method
prepare_tokens_with_masks
(self, x, masks=None)
models/backbones/dino_v2.py:215
↓ 4 callers
Method
sample
Sample positive and negative bboxes. This is a simple implementation of bbox sampling given candidates, assigning results and ground
mmseg/core/box/samplers/base_sampler.py:34
↓ 4 callers
Method
tokenize
Converts a string into a sequence of tokens, using the tokenizer. Split in words for word-based vocabulary or sub-words for sub-word
models/backbones/siglip/tokenization_utils.py:622
↓ 3 callers
Method
__init__
(self, groups=1, base_width=4, radix=2, re
mmseg/models/backbones/resnest.py:293
↓ 3 callers
Method
__init__
(self, **kwargs)
mmseg/models/backbones/vit.py:462
↓ 3 callers
Method
assign
Assign boxes to either a ground truth boxes or a negative boxes.
mmseg/models/utils/assigner.py:35
↓ 3 callers
Method
attention
(self, x: torch.Tensor)
models/backbones/clip/models.py:59
↓ 3 callers
Function
build_assigner
Build Assigner.
mmseg/models/builder.py:30
↓ 3 callers
Function
build_dataloader
Build PyTorch DataLoader. In distributed training, each GPU/process has a dataloader. In non-distributed training, there is only one dataload
mmseg/datasets/builder.py:93
↓ 3 callers
Function
build_match_cost
Build Match Cost.
mmseg/models/builder.py:25
↓ 3 callers
Method
crop
Crop from ``img``
mmseg/datasets/pipelines/transforms.py:527
↓ 3 callers
Function
denorm
(img, mean, std)
mmseg/models/utils/dacs_transforms.py:38
↓ 3 callers
Function
digit_version
(version_str)
mmseg/__init__.py:9
↓ 3 callers
Function
drop_path
(x, drop_prob: float = 0.0, training: bool = False)
models/backbones/dino_layers/drop_path.py:14
↓ 3 callers
Method
encode_decode
Encode images with backbone and decode into a semantic segmentation map of the same size as input.
mmseg/models/segmentors/encoder_decoder.py:78
↓ 3 callers
Method
evaluate
Evaluate the dataset. Args: results (list[tuple[torch.Tensor]] | list[str]): per image pre_eval results or predi
mmseg/datasets/custom.py:358
↓ 3 callers
Method
extract_feat
Extract features from images.
mmseg/models/uda/uda_decorator.py:37
↓ 3 callers
Method
forward_test
Forward function for testing, only ``pam_cam`` is used.
mmseg/models/decode_heads/da_head.py:163
↓ 3 callers
Method
forward_train
Forward function for training. Args: img (Tensor): Input images. img_metas (list[dict]): List of image info dict wher
mmseg/models/segmentors/encoder_decoder.py:139
↓ 3 callers
Function
freeze_batch_norm_2d
Converts all `BatchNorm2d` and `SyncBatchNorm` layers of provided module into `FrozenBatchNorm2d`. If `module` is itself an instance of eithe
models/backbones/eva_clip/utils.py:237
↓ 3 callers
Method
get_ann_info
Get annotation by index. Args: idx (int): Index of data. Returns: dict: Annotation info of specified index.
mmseg/datasets/custom.py:169
↓ 3 callers
Function
get_cast_dtype
(precision: str)
models/backbones/eva_clip/model.py:85
↓ 3 callers
Function
get_model_config
(model_name)
models/backbones/eva_clip/factory.py:65
↓ 3 callers
Function
image_transform
( image_size: int, is_train: bool, mean: Optional[Tuple[float, ...]] = None, s
models/backbones/eva_clip/transform.py:60
↓ 3 callers
Method
inference
Inference with slide/whole style. Args: img (Tensor): The input image of shape (N, 3, H, W). img_meta (dict): Image i
mmseg/models/segmentors/encoder_decoder.py:243
↓ 3 callers
Method
inference
Inference with slide/whole style. Args: img (Tensor): The input image of shape (N, 3, H, W). img_meta (dict): Image i
models/segmentors/mfuser_eva_clip.py:211
↓ 3 callers
Method
inference
Inference with slide/whole style. Args: img (Tensor): The input image of shape (N, 3, H, W). img_meta (dict): Image i
models/segmentors/mfuser_clip.py:211
↓ 3 callers
Method
inference
Inference with slide/whole style. Args: img (Tensor): The input image of shape (N, 3, H, W). img_meta (dict): Image i
models/segmentors/mfuser_siglip.py:211
↓ 3 callers
Function
intersect_and_union
Calculate intersection and Union. Args: pred_label (ndarray | str): Prediction segmentation map or predict result filename.
mmseg/core/evaluation/metrics.py:27
↓ 3 callers
Method
lock
lock modules Args: unlocked_groups (int): leave last n layer groups unlocked (default: 0)
models/backbones/eva_clip/timm_model.py:80
↓ 3 callers
Method
make_block_plugins
make plugins for block. Args: in_channels (int): Input channels of plugin. plugins (list[dict]): List of plugins cfg
mmseg/models/backbones/resnet.py:223
↓ 3 callers
Method
prepare_tokens_with_masks
(self, x: torch.Tensor)
models/backbones/clip/models.py:286
↓ 3 callers
Function
reduce_mean
Obtain the mean of tensor on different GPUs.
mmseg/core/utils/dist_utils.py:66
↓ 3 callers
Method
scatter
Scatter function. Args: inputs (Tensor): Input Tensor. kwargs (dict): Args for ``mmcv.parallel.scatte
mmseg/core/ddp_wrapper.py:91
↓ 2 callers
Method
__init__
(self, in_channels=3, embed_dims=768, conv_type='Conv2d',
mmseg/models/utils/embed.py:124
↓ 2 callers
Method
__init__
(self, isa_channels, down_factor=(8, 8), **kwargs)
mmseg/models/decode_heads/isa_head.py:173
↓ 2 callers
Method
__init__
(self, in_channels, channels)
mmseg/models/decode_heads/da_head.py:23
↓ 2 callers
Method
__init__
(self, msg)
mmseg/models/uda/photo_wct_batch.py:50
↓ 2 callers
Method
__init__
(self, text_config=None, vision_config=None, **kwargs)
models/backbones/siglip/configuration_siglip.py:272
↓ 2 callers
Method
__init__
(self, *args)
models/backbones/siglip/tokenization_utils.py:59
next →
1–100 of 1,143, ranked by callers