MCPcopy Create free account

hub / github.com/devinxzhang/MFuser / functions

Functions1,143 in github.com/devinxzhang/MFuser

Methodget_classifier
(self)
models/backbones/eva_clip/eva_vit_model.py:546
Methodget_imnet_model
(self)
mmseg/models/uda/baseline.py:75
Methodget_input_embeddings
(self)
models/backbones/siglip/modeling_siglip.py:828
Methodget_input_embeddings
(self)
models/backbones/siglip/modeling_siglip.py:998
Methodget_input_ids
(text)
models/backbones/siglip/tokenization_utils.py:766
Methodget_intermediate_layers
( self, x: torch.Tensor, n: Union[int, Sequence] = 1, # Layers or n last layers to ta
models/backbones/dino_v2.py:302
Methodget_num_layers
(self)
models/backbones/eva_clip/hf_model.py:242
Methodget_num_layers
(self)
models/backbones/eva_clip/transformer.py:604
Methodget_num_layers
(self)
models/backbones/eva_clip/transformer.py:717
Methodget_num_layers
(self)
models/backbones/eva_clip/eva_vit_model.py:530
Functionget_palette
Get class palette (RGB) of a dataset.
mmseg/core/evaluation/class_names.py:140
Methodget_similarity
(self, inputs, img_metas, test_cfg)
mmseg/models/decode_heads/mask2former_head.py:608
Methodget_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
models/backbones/siglip/tokenization_siglip.py:162
Methodget_special_tokens_mask
Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
models/backbones/siglip/tokenization_utils.py:1007
Functionget_text_embeddings
(texts, text_encoder)
models/backbones/utils.py:174
Functionget_tokenizer
(model_name)
models/backbones/eva_clip/factory.py:72
Methodgrid_points
(self, featmap_size, stride=16, device='cuda')
mmseg/core/anchor/point_generator.py:19
Methodgrid_priors
Generate grid points of multiple feature levels. Args: featmap_sizes (list[tuple]): List of feature map sizes in
mmseg/core/anchor/point_generator.py:78
Methodinference
Inference with slide/whole style. Args: img (Tensor): The input image of shape (N, 3, H, W). img_meta (dict): Image i
mmseg/models/uda/uda_decorator.py:72
Functioninference_segmentor
Inference image(s) with the segmentor. Args: model (nn.Module): The loaded segmentor. imgs (str/ndarray or list[str/ndarray]): Ei
mmseg/apis/inference.py:84
Methodinfo
Returns a dictionary of info about the object.
mmseg/core/box/samplers/mask_sampling_result.py:49
Methodinfo
Returns a dictionary of info about the object.
mmseg/core/box/samplers/sampling_result.py:79
Methodinit_parameters
(self)
models/backbones/eva_clip/hf_model.py:247
Functioninit_segmentor
Initialize a segmentor from config file. Args: config (str or :obj:`mmcv.Config`): Config file path or the config object.
mmseg/apis/inference.py:15
Methodinit_weights
(self)
mmseg/models/backbones/mix_transformer.py:339
Methodinit_weights
(self)
mmseg/models/backbones/vit.py:297
Methodinit_weights
Initialize the transformer weights.
mmseg/models/utils/transformer.py:676
Methodinit_weights
(self)
mmseg/models/decode_heads/maskclip_head.py:46
Methodinit_weights
(self)
mmseg/models/decode_heads/mask2former_head.py:147
Methodinit_weights
(self)
mmseg/models/decode_heads/tqdm_head.py:115
Methodinit_weights
Initialize weights.
mmseg/models/plugins/tqdm_msdeformattn_pixel_decoder.py:141
Methodinit_weights
Initialize weights.
mmseg/models/plugins/msdeformattn_pixel_decoder.py:136
Methodinit_weights
Initialize weights.
mmseg/models/plugins/pixel_decoder.py:76
Methodinit_weights
Initialize weights.
mmseg/models/plugins/pixel_decoder.py:175
Methodinit_weights
(self, pretrained=None)
models/backbones/clip/models.py:254
Methodinit_weights
(self, pretrained=None)
models/backbones/clip/models.py:466
Methodinit_weights
(self, pretrained=None)
models/backbones/siglip/modeling_siglip.py:806
Methodinit_weights
(self, pretrained=None)
models/backbones/siglip/modeling_siglip.py:964
Methodinit_weights
(self)
models/backbones/eva_clip/transformer.py:765
Methodinit_weights
(self)
models/backbones/eva_clip/eva_vit_model.py:599
Methodis_cuda
(self)
mmseg/models/uda/photo_wct_batch.py:231
Methodis_fast
(self)
models/backbones/siglip/tokenization_utils.py:447
Functionis_logging
(args)
models/backbones/eva_clip/utils.py:292
Functionis_master
(args, local=False)
models/backbones/eva_clip/utils.py:299
Functionis_source_file
(x)
mmseg/utils/collect_env.py:21
Functionlecun_normal_
(tensor)
models/backbones/siglip/modeling_siglip.py:119
Functionlist_pretrained
returns list of pretrained models Returns a tuple (model_name, pretrain_tag) by default or 'name:tag' if as_str == True
models/backbones/eva_clip/pretrained.py:196
Methodlock
(self, unlocked_groups=0, freeze_bn_stats=False)
models/backbones/eva_clip/modified_resnet.py:154
Methodlock
(self, unlocked_layers:int=0, freeze_layer_norm:bool=True)
models/backbones/eva_clip/hf_model.py:220
Methodlock
(self, unlocked_groups=0, freeze_bn_stats=False)
models/backbones/eva_clip/transformer.py:571
Methodlock
(self, unlocked_groups=0, freeze_bn_stats=False)
models/backbones/eva_clip/eva_vit_model.py:533
Methodlock_image_tower
(self, unlocked_groups=0, freeze_bn_stats=False)
models/backbones/eva_clip/model.py:238
Methodlock_image_tower
(self, unlocked_groups=0, freeze_bn_stats=False)
models/backbones/eva_clip/model.py:290
Methodlock_text_tower
(self, unlocked_layers:int=0, freeze_layer_norm:bool=True)
models/backbones/eva_clip/model.py:294
Methodloss_name
Loss Name. This function must be implemented and will return the name of this loss function. This name will be used to combine differ
mmseg/models/losses/cross_entropy_loss.py:279
Methodloss_single
Loss function for outputs from a single decoder layer. Args: cls_scores (Tensor): Mask score logits from a single decoder layer
mmseg/models/decode_heads/mask2former_head.py:273
Methodloss_single
Loss function for outputs from a single decoder layer. Args: cls_scores (Tensor): Mask score logits from a single decoder layer
mmseg/models/decode_heads/maskformer_head.py:302
Methodloss_single
Loss function for outputs from a single decoder layer. Args: cls_scores (Tensor): Mask score logits from a single decoder layer
mmseg/models/decode_heads/tqdm_head.py:241
Methodlosses
Compute ``pam_cam``, ``pam``, ``cam`` loss.
mmseg/models/decode_heads/da_head.py:167
Methodmake_res_layer
Pack all blocks in a stage into a ``ResLayer``.
mmseg/models/backbones/resnest.py:307
Methodmake_res_layer
Pack all blocks in a stage into a ``ResLayer``
mmseg/models/backbones/resnext.py:141
Functionmask2bbox
Obtain tight bounding boxes of binary masks. Args: masks (Tensor): Binary mask of shape (n, h, w). Returns: Tensor: Bboxe wi
mmseg/core/mask/utils.py:68
Functionmask_cross_entropy
Calculate the CrossEntropy loss for masks. Args: pred (torch.Tensor): The prediction with shape (N, C), C is the number of cl
mmseg/models/losses/cross_entropy_loss.py:153
Methodmasks
torch.Tensor: concatenated positive and negative boxes
mmseg/core/box/samplers/mask_sampling_result.py:36
Functionmean_dice
Calculate Mean Dice (mDice) Args: results (list[ndarray] | list[str]): List of prediction segmentation maps or list of predic
mmseg/core/evaluation/metrics.py:275
Functionmean_fscore
Calculate Mean Intersection and Union (mIoU) Args: results (list[ndarray] | list[str]): List of prediction segmentation maps
mmseg/core/evaluation/metrics.py:315
Functionmean_iou
Calculate Mean Intersection and Union (mIoU) Args: results (list[ndarray] | list[str]): List of prediction segmentation maps
mmseg/core/evaluation/metrics.py:236
Functionmit_convert
(ckpt)
mmseg/models/utils/ckpt_convert.py:8
Methodmodel_input_names
(self)
models/backbones/siglip/processing_siglip.py:139
Methodname
(self)
mmseg/models/uda/photo_wct_batch.py:46
Functionnamed_apply
( fn: Callable, module: nn.Module, name="", depth_first=True, include_root=False )
models/backbones/dino_v2.py:29
Functionnchw_to_nlc
Flatten [N, C, H, W] shape tensor to [N, L, C] shape tensor. Args: x (Tensor): The input tensor of shape [N, C, H, W] before convertion.
mmseg/models/utils/shape_convert.py:21
Functionnlc_to_nchw
Convert [N, L, C] shape tensor to [N, C, H, W] shape tensor. Args: x (Tensor): The input tensor of shape [N, L, C] before convertion.
mmseg/models/utils/shape_convert.py:4
Methodno_weight_decay
(self)
mmseg/models/backbones/mix_transformer.py:382
Methodno_weight_decay
(self)
models/backbones/eva_clip/transformer.py:612
Methodno_weight_decay
(self)
models/backbones/eva_clip/transformer.py:713
Methodno_weight_decay
(self)
models/backbones/eva_clip/eva_vit_model.py:543
Methodno_weight_decay
(self)
models/backbones/eva_clip/model.py:248
Methodno_weight_decay
(self)
models/backbones/eva_clip/model.py:303
Functionnp_local_seed
(seed)
mmseg/utils/utils.py:9
Methodnum_base_priors
list[int]: The number of priors (points) at a point on the feature grid
mmseg/core/anchor/point_generator.py:63
Methodnum_levels
int: number of feature levels that the generator will be applied
mmseg/core/anchor/point_generator.py:58
Methodnum_special_tokens_to_add
Returns the number of added tokens when encoding a sequence with special tokens. <Tip> This encodes a dummy input and check
models/backbones/siglip/tokenization_utils.py:599
Functionparse
(x)
mmseg/models/utils/embed.py:16
Functionparse
(x)
models/backbones/eva_clip/utils.py:278
Methodpre_eval
Collect eval result from each iteration. Args: preds (list[torch.Tensor] | torch.Tensor): the segmentation logit
mmseg/datasets/custom.py:265
Functionprepare_img
()
models/backbones/siglip/convert_siglip_to_hf.py:236
Methodpreprocess
Preprocess an image or batch of images. Args: images (`ImageInput`): Image to preprocess. Expects a sing
models/backbones/siglip/image_processing_siglip.py:111
Functionpy_sigmoid_focal_loss
PyTorch version of `Focal Loss <https://arxiv.org/abs/1708.02002>`_. Args: pred (torch.Tensor): The prediction with shape (N, C), C is th
mmseg/models/losses/focal_loss.py:11
Methodrandom
Args: rng (None | int | numpy.random.RandomState): seed or state. kwargs (keyword arguments): - num_p
mmseg/core/box/samplers/sampling_result.py:92
Functionregister_pooler
Decorator registering pooler class
models/backbones/eva_clip/hf_model.py:37
Methodreset_classifier
(self, num_classes, global_pool='')
mmseg/models/backbones/mix_transformer.py:390
Methodreset_drop_path
(self, drop_path_rate)
mmseg/models/backbones/mix_transformer.py:357
Functionresize_rel_pos_embed
(state_dict, model, interpolation: str = 'bicubic', seq_dim=1)
models/backbones/eva_clip/utils.py:140
Methodsample
Sample pixels that have high loss or with low prediction confidence. Args: seg_logit (torch.Tensor): segmentation logits, shape (
mmseg/core/seg/sampler/ohem_pixel_sampler.py:32
Methodsample
Placeholder for sample function.
mmseg/core/seg/sampler/base_pixel_sampler.py:13
Methodsample
Directly returns the positive and negative indices of samples. Args: assign_result (:obj:`AssignResult`): Assigned results
mmseg/core/box/samplers/mask_pseudo_sampler.py:26
Methodsave_vocabulary
(self, save_directory: str, filename_prefix: Optional[str] = None)
models/backbones/siglip/tokenization_siglip.py:360
Methodset_grad_checkpointing
(self, enable=True)
models/backbones/eva_clip/modified_resnet.py:162
Methodset_grad_checkpointing
(self, enable=True)
models/backbones/eva_clip/timm_model.py:113
← previousnext →1,001–1,100 of 1,143, ranked by callers