MCPcopy Create free account

hub / github.com/VCIP-RGBD/DFormer / functions

Functions937 in github.com/VCIP-RGBD/DFormer

Methodforward_train
Forward function for training. Args: inputs (list[Tensor]): List of multi-level img features. prev_output (Tensor): Th
mmseg/models/decode_heads/point_head.py:165
Methodforward_train
Forward function for training. Args: inputs (list[Tensor]): List of multi-level img features. prev_output (Tensor): Th
mmseg/models/decode_heads/cascade_decode_head.py:19
Methodforward_train
Forward function for training. Args: inputs (list[Tensor]): List of multi-level img features. img_metas (list[dict]):
models/decoders/decode_head.py:185
Methodgaussian
(self, theta_x: torch.Tensor, phi_x: torch.Tensor)
models/decoders/nl_head.py:140
Methodgeometric_progression
(a, r, n)
mmseg/models/backbones/beit.py:395
Functionget_ade_colors
()
utils/visualize.py:50
Methodget_class_colors
(*args)
utils/dataloader/RGBXDataset.py:259
Functionget_classes
Get class names of a dataset.
mmseg/core/evaluation/class_names.py:882
Functionget_colors
(class_num)
utils/visualize.py:42
Functionget_device
Returns an available device, cpu, cuda or mlu.
mmseg/utils/util_distribution.py:74
Functionget_logger_old
(log_dir=None, log_file=None, formatter=LogFormatter)
utils/engine/logger.py:84
Methodget_lr
(self, cur_iter)
utils/lr_policy.py:18
Methodget_lr
(self, cur_iter)
utils/lr_policy.py:29
Methodget_lr
(self, epoch)
utils/lr_policy.py:43
Methodget_lr
(self, cur_epoch)
utils/lr_policy.py:56
Functionget_palette
Get class palette (RGB) of a dataset.
mmseg/core/evaluation/class_names.py:899
Functionhist_info
(n_cl, pred, gt)
utils/metric.py:8
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:69
Functioninit_random_seed
Initialize random seed. If the seed is not set, the seed will be automatically randomized, and then broadcast to all processes to prevent som
mmseg/apis/train.py:19
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:12
Methodinit_weights
(self)
mmseg/models/necks/multilevel_neck.py:46
Methodinit_weights
(self)
mmseg/models/backbones/mit.py:418
Methodinit_weights
(self)
mmseg/models/backbones/vit.py:289
Methodinit_weights
(self)
mmseg/models/backbones/beit.py:114
Methodinit_weights
(self)
mmseg/models/backbones/beit.py:476
Methodinit_weights
(self)
mmseg/models/backbones/scnet.py:293
Methodinit_weights
(self)
mmseg/models/backbones/swin.py:77
Methodinit_weights
(self)
mmseg/models/backbones/swin.py:657
Methodinit_weights
Initialize relative position bias with zeros.
mmseg/models/backbones/mae.py:22
Methodinit_weights
(self)
mmseg/models/backbones/mae.py:167
Methodinit_weights
(self)
mmseg/models/backbones/twins.py:473
Methodinit_weights
(self)
mmseg/models/decode_heads/segmenter_mask_head.py:97
Methodinit_weights
Use xavier initialization for all weight parameter and set classification head bias as a specific value when use focal loss.
mmseg/models/decode_heads/knet_head.py:250
Methodinit_weights
(self, pretrained)
models/encoders/DFormer.py:287
Methodinit_weights
Initialize the weights in backbone. Args: pretrained (str, optional): Path to pre-trained weights. Defaults to No
models/encoders/DFormerv2.py:571
Functionisaid_classes
iSAID class names for external use.
mmseg/core/evaluation/class_names.py:405
Functionisaid_palette
iSAID palette for external use.
mmseg/core/evaluation/class_names.py:832
Methodlegacy_forward
multi head attention forward in mmcv version < 1.3.17.
mmseg/models/backbones/mit.py:180
Functionload_pretrain
(model, filename, strict=False, revise_keys=[(r"^module\.", "")])
utils/load_utils.py:63
Functionload_restore_model
(model, model_file)
utils/pyt_utils.py:133
Methodlocal_step
(self, x, bases, coef)
models/decoders/ham_head.py:121
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/tversky_loss.py:112
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/dice_loss.py:113
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/lovasz_loss.py:311
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:270
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/focal_loss.py:297
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
models/losses/tversky_loss.py:112
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
models/losses/dice_loss.py:113
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
models/losses/lovasz_loss.py:311
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
models/losses/cross_entropy_loss.py:270
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
models/losses/focal_loss.py:297
Methodlosses
(self, seg_logit, seg_label)
mmseg/models/decode_heads/knet_head.py:409
Methodlosses
Compute Detail Aggregation Loss.
mmseg/models/decode_heads/stdc_head.py:35
Methodlosses
Compute segmentation and semantic encoding loss.
mmseg/models/decode_heads/enc_head.py:168
Functionlovasz_hinge
Binary Lovasz hinge loss. Args: logits (torch.Tensor): [B, H, W], logits at each pixel (between -infty and +infty). l
mmseg/models/losses/lovasz_loss.py:84
Functionlovasz_hinge
Binary Lovasz hinge loss. Args: logits (torch.Tensor): [B, H, W], logits at each pixel (between -infty and +infty). l
models/losses/lovasz_loss.py:84
Functionlovasz_softmax
Multi-class Lovasz-Softmax loss. Args: probs (torch.Tensor): [B, C, H, W], class probabilities at each prediction (between 0
mmseg/models/losses/lovasz_loss.py:171
Functionlovasz_softmax
Multi-class Lovasz-Softmax loss. Args: probs (torch.Tensor): [B, C, H, W], class probabilities at each prediction (between 0
models/losses/lovasz_loss.py:171
Functionloveda_classes
LoveDA class names for external use.
mmseg/core/evaluation/class_names.py:390
Functionloveda_palette
LoveDA palette for external use.
mmseg/core/evaluation/class_names.py:817
Methodmake_res_layer
Pack all blocks in a stage into a ``ResLayer``.
mmseg/models/backbones/resnest.py:293
Methodmake_res_layer
Pack all blocks in a stage into a ``ResLayer``
mmseg/models/backbones/resnext.py:127
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:151
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
models/losses/cross_entropy_loss.py:151
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:154
Functionmean_fscore
Calculate Mean F-Score (mFscore) Args: results (list[ndarray] | list[str]): List of prediction segmentation maps or list of p
mmseg/core/evaluation/metrics.py:191
Functionmean_iou
Calculate Mean Intersection and Union (mIoU) Args: results (list[ndarray] | list[str]): List of prediction segmentation maps
mmseg/core/evaluation/metrics.py:118
Methodmid_run
(self, model_mid, log_file, log_file_link)
utils/engine/evaluator.py:117
Functionnchw2nlc2nchw
Flatten [N, C, H, W] shape tensor `x` to [N, L, C] shape tensor. Use the reshaped tensor as the input of `module`, and the convert the output of
mmseg/models/utils/shape_convert.py:32
Functionnlc2nchw2nlc
Convert [N, L, C] shape tensor `x` to [N, C, H, W] shape tensor. Use the reshaped tensor as the input of `module`, and convert the output of `
mmseg/models/utils/shape_convert.py:69
Methodno_weight_decay
(self)
models/encoders/DFormerv2.py:613
Methodno_weight_decay_keywords
(self)
models/encoders/DFormerv2.py:617
Functionpad_image_size_to_multiples_of
(img, multiple, pad_value)
utils/transforms.py:78
Functionparse_devices
(input_devices)
utils/pyt_utils.py:202
Functionpotsdam_classes
Potsdam class names for external use.
mmseg/core/evaluation/class_names.py:395
Functionpotsdam_palette
Potsdam palette for external use.
mmseg/core/evaluation/class_names.py:822
Functionpre_eval_to_metrics
Convert pre-eval results to metrics. Args: pre_eval_results (list[tuple[torch.Tensor]]): per image eval results for computing
mmseg/core/evaluation/metrics.py:272
Functionprint_iou
(iou, freq_IoU, mean_pixel_acc, pixel_acc, class_names=None, show_no_back=False, no_print=False)
utils/visualize.py:62
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:13
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
models/losses/focal_loss.py:13
Functionrandom_crop
(img, gt, size)
utils/transforms.py:173
Functionrandom_gaussian_blur
(img)
utils/transforms.py:157
Functionrandom_mirror
(img, gt)
utils/transforms.py:136
Functionrandom_rotation
(img, gt)
utils/transforms.py:147
Functionrandom_scale
(img, gt, scales)
utils/transforms.py:105
Functionrandom_scale_rgbx
(img, gt, modal_x, scales)
utils/transforms.py:115
Functionrandom_scale_with_length
(img, gt, length)
utils/transforms.py:126
Functionreduce_tensor
(tensor, dst=0, op=dist.ReduceOp.SUM, world_size=1)
utils/pyt_utils.py:116
Methodrescale
(param, layer_id)
mmseg/models/backbones/mae.py:160
Methodreset_parameters
(self)
models/encoders/DFormerv2.py:357
Functionresize_ensure_shortest_edge
(img, edge_length, interpolation_mode=cv2.INTER_LINEAR)
utils/transforms.py:91
Methodrun
There are four evaluation modes: 1.only eval a .pth model: -e *.pth 2.only eval a certain epoch: -e epoch 3.eval all epochs in
utils/engine/dist_test.py:54
Methodsample
Placeholder for sample function.
mmseg/core/seg/sampler/base_pixel_sampler.py:12
Functionseed_worker
(worker_id)
utils/dataloader/dataloader.py:71
Functionset_random_seed
Set random seed. Args: seed (int): Seed to be used. deterministic (bool): Whether to set the deterministic option for
mmseg/apis/train.py:50
Functionsetup_multi_processes
Setup multi-processing environment variables.
mmseg/utils/set_env.py:11
Functionshow_img
(colors, background, img, clean, gt, *pds)
utils/visualize.py:22
Functionshow_prediction
(colors, background, img, pred, gt)
utils/visualize.py:15
Functionshow_result_pyplot
Visualize the segmentation results on the image. Args: model (nn.Module): The loaded segmentor. img (str or np.ndarray): Image fi
mmseg/apis/inference.py:105
Functionsigmoid_focal_loss
r"""A wrapper of cuda version `Focal Loss <https://arxiv.org/abs/1708.02002>`_. Args: pred (torch.Tensor): The prediction with shape (
mmseg/models/losses/focal_loss.py:71
← previousnext →801–900 of 937, ranked by callers