MCPcopy Create free account

hub / github.com/IceClear/CLIP-IQA / functions

Functions1,214 in github.com/IceClear/CLIP-IQA

↓ 2 callersFunction_transform
(n_px)
mmedit/models/components/clip/clip.py:76
↓ 2 callersFunctionbuild_index_block
Build an conv block for IndexBlock. Args: in_channels (int): The input channels of the block. out_channels (int): The output chan
mmedit/models/backbones/encoder_decoders/encoders/indexnet_encoder.py:16
↓ 2 callersFunctionbuild_optimizers
Build multiple optimizers from configs. If `cfgs` contains several dicts for optimizers, then a dict for each constructed optimizers will be
mmedit/core/optimizer/builder.py:5
↓ 2 callersFunctionbytes_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 y
mmedit/models/components/clip/simple_tokenizer.py:16
↓ 2 callersMethodcalculate_loss_with_type
Calculate multiple types of losses. Args: loss_type (str): Type of the loss. fake_res (torch.Tensor): Direct results
mmedit/models/inpaintors/two_stage.py:188
↓ 2 callersMethodcalculate_loss_with_type
Calculate multiple types of losses. Args: loss_type (str): Type of the loss. fake_res (torch.Tensor): Direct results
mmedit/models/inpaintors/deepfillv1.py:124
↓ 2 callersFunctioncharbonnier_loss
Charbonnier loss. Args: pred (Tensor): Prediction Tensor with shape (n, c, h, w). target ([type]): Target Tensor with shape (n, c
mmedit/models/losses/pixelwise_loss.py:41
↓ 2 callersFunctiondtype_limits
Return intensity limits, i.e. (min, max) tuple, of the image's dtype. This function is adopted from skimage: https://github.com/scikit-image/
mmedit/datasets/pipelines/utils.py:35
↓ 2 callersFunctionestimate_aggd_param
Estimate AGGD (Asymmetric Generalized Gaussian Distribution) parameters. Args: block (ndarray): 2D Image block. Returns: tup
mmedit/core/evaluation/metrics.py:385
↓ 2 callersMethodevaluate
Evaluation function. Args: output (Tensor): Model output. target (Tensor): GT Tensor. Returns: d
mmedit/models/video_interpolators/basic_interpolator.py:114
↓ 2 callersFunctionextract_around_bbox
Extract patches around the given bbox. Args: bbox (np.ndarray | torch.Tensor): Bboxes to be modified. Bbox can be in batch or
mmedit/models/common/model_utils.py:121
↓ 2 callersMethodforward
Forward function. Args: img_a (Tensor): Input image from domain A. img_b (Tensor): Input image from domain B.
mmedit/models/synthesizers/pix2pix.py:210
↓ 2 callersMethodforward
Forward function. Args: img_a (Tensor): Input image from domain A. img_b (Tensor): Input image from domain B.
mmedit/models/synthesizers/cycle_gan.py:300
↓ 2 callersMethodforward
Forward Function. Args: pred (Tensor): of shape (N, C, H, W). Predicted tensor. target (Tensor): of shape (N, C, H, W
mmedit/models/losses/pixelwise_loss.py:79
↓ 2 callersMethodforward_dummy
Forward of networks. Args: lq (Tensor): LQ image. lq_up (Tensor): Upsampled LQ image. ref (Tensor): Refer
mmedit/models/restorers/ttsr.py:82
↓ 2 callersMethodforward_inception
(self, x)
mmedit/core/evaluation/inceptions.py:49
↓ 2 callersMethodforward_test
Abstract method for testing forward. All subclass should overwrite it.
mmedit/models/base.py:39
↓ 2 callersMethodforward_test
Forward function for testing. Args: masked_img (torch.Tensor): Tensor with shape of (n, 3, h, w). mask (torch.Tensor)
mmedit/models/inpaintors/one_stage.py:245
↓ 2 callersMethodforward_test
Testing forward function. This is a basic function, interpolate a frame between the given two frames. Args: inpu
mmedit/models/video_interpolators/basic_interpolator.py:146
↓ 2 callersMethodforward_test
Testing forward function. Args: lq (Tensor): LQ image. gt (Tensor): GT image. meta (list[dict]): Meta dat
mmedit/models/restorers/dic.py:185
↓ 2 callersMethodforward_test
Testing forward function. Args: lq (Tensor): LQ Tensor with shape (n, c, h, w). gt (Tensor): GT Tensor with shape (n,
mmedit/models/restorers/basic_restorer.py:154
↓ 2 callersMethodforward_train_d
Forward function in discriminator training step. In this function, we modify the default implementation with only one discriminator.
mmedit/models/inpaintors/deepfillv1.py:31
↓ 2 callersMethodforward_train_d
Forward function in discriminator training step. In this function, we compute the prediction for each data batch (real or fake). Mean
mmedit/models/inpaintors/one_stage.py:148
↓ 2 callersFunctiongauss_gradient
Gaussian gradient. From https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/ submissions/8060/versions/2/previews/gaussgradient/g
mmedit/core/evaluation/metric_utils.py:62
↓ 2 callersFunctiongaussian
Gaussian function. Args: x (array_like): The independent variable. sigma (float): Standard deviation of the gaussian function.
mmedit/core/evaluation/metric_utils.py:6
↓ 2 callersMethodgenerator_loss
Forward function in generator training step. In this function, we mainly compute the loss items for generator with the given (fake_re
mmedit/models/inpaintors/gl_inpaintor.py:97
↓ 2 callersMethodget_1d_gaussian_kernel
Get the Gaussian filter coefficients in one dimension (x or y direction). Args: kernel_size (int): Kernel filter size in
mmedit/models/losses/gan_loss.py:205
↓ 2 callersFunctionget_git_hash
()
setup.py:19
↓ 2 callersMethodget_lr
(self, regular_lr, optimizer_name)
mmedit/core/scheduler/lr_updater.py:151
↓ 2 callersMethodget_module
Get an inner module from model. Since we will wrapper DDP for some model, we have to judge whether the module can be indexed directly
mmedit/models/inpaintors/deepfillv1.py:13
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
mmedit/models/components/clip/simple_tokenizer.py:38
↓ 2 callersMethodget_target_label
Get target label. Args: input (Tensor): Input tensor. target_is_real (bool): Whether the target is real or fake.
mmedit/models/losses/gan_loss.py:62
↓ 2 callersMethodimg2tensor
(self, img)
mmedit/core/evaluation/inceptions.py:41
↓ 2 callersFunctioninference_with_session
(sess, io_binding, output_names, input_tensor)
mmedit/core/export/wrappers.py:13
↓ 2 callersMethodinit_weights
Init weights for models. Args: pretrained (str, optional): Path for pretrained weights. If given None, pretrained
mmedit/models/restorers/dic.py:248
↓ 2 callersMethodinit_weights
(self)
mmedit/models/common/gca_module.py:80
↓ 2 callersMethodload_annotations
Load unpaired image paths of one domain. Args: dataroot (str): Path to the folder root for unpaired images of one
mmedit/datasets/generation_unpaired_dataset.py:38
↓ 2 callersFunctionload_clip_to_cpu
(backbone_name)
mmedit/models/backbones/sr_backbones/coopclipiqa.py:23
↓ 2 callersFunctionmake_coord
Make coordinates at grid centers. Args: shape (tuple): shape of image. ranges (tuple): range of coordinate value. Default: None.
mmedit/datasets/pipelines/utils.py:131
↓ 2 callersFunctionmkdir
(path)
tools/copy_spaq_img.py:22
↓ 2 callersFunctionmse_loss
MSE loss. Args: pred (Tensor): Prediction Tensor with shape (n, c, h, w). target ([type]): Target Tensor with shape (n, c, h, w).
mmedit/models/losses/pixelwise_loss.py:27
↓ 2 callersFunctionmulti_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
mmedit/apis/test.py:61
↓ 2 callersFunctionnoise_process
(img, std)
mmedit/apis/restoration_inference.py:139
↓ 2 callersMethodnorm1
nn.Module: normalization layer after the second convolution layer
mmedit/models/backbones/encoder_decoders/encoders/resnet.py:350
↓ 2 callersFunctionparse_require_file
(fpath)
setup.py:118
↓ 2 callersFunctionpatch_device
(module)
mmedit/models/components/clip/clip.py:144
↓ 2 callersFunctionpatch_float
(module)
mmedit/models/components/clip/clip.py:168
↓ 2 callersMethodquery
Query current image batch using a history of generated images. Args: images (Tensor): Current image batch without history informa
mmedit/models/common/generation_model_utils.py:80
↓ 2 callersMethodquery_rgb
Query RGB value of GT. Adapted from 'https://github.com/yinboc/liif.git' 'liif/models/liif.py' Copyright (c) 2020, Yinbo Chen
mmedit/models/backbones/sr_backbones/liif_net.py:78
↓ 2 callersFunctionrandom_bivariate_gaussian_kernel
Randomly generate bivariate isotropic or anisotropic Gaussian kernels. In the isotropic mode, only `sigma_x_range` is used. `sigma_y_range` and
mmedit/datasets/pipelines/blur_kernels.py:209
↓ 2 callersFunctionrandom_bivariate_generalized_gaussian_kernel
Randomly generate bivariate generalized Gaussian kernels. In the isotropic mode, only `sigma_x_range` is used. `sigma_y_range` and `rotation_
mmedit/datasets/pipelines/blur_kernels.py:264
↓ 2 callersFunctionrandom_bivariate_plateau_kernel
Randomly generate bivariate plateau kernels. In the isotropic mode, only `sigma_x_range` is used. `sigma_y_range` and `rotation_range` is ign
mmedit/datasets/pipelines/blur_kernels.py:332
↓ 2 callersFunctionrandom_choose_unknown
Randomly choose an unknown start (top-left) point for a given crop_size. Args: unknown (np.ndarray): The binary unknown mask. cro
mmedit/datasets/pipelines/utils.py:93
↓ 2 callersFunctionrandom_irregular_mask
Generate random irregular masks. This is a modified version of free-form mask implemented in 'brush_stroke_mask'. We prefer to use `uint
mmedit/core/mask.py:210
↓ 2 callersFunctionread_image
Read image from file. Args: filepath (str): File path. Returns: image (np.array): Image.
mmedit/apis/video_interpolation_inference.py:19
↓ 2 callersFunctionresize_fn
Resize the given image to a given size. Args: img (ndarray | torch.Tensor): The input image. size (int | tuple[int]): Target size
mmedit/datasets/pipelines/random_down_sampling.py:94
↓ 2 callersFunctionresize_process
224 288 384
mmedit/apis/restoration_inference.py:109
↓ 2 callersFunctionset_random_seed
Set random seed. Args: seed (int): Seed to be used. deterministic (bool): Whether to set the deterministic option for
mmedit/apis/train.py:52
↓ 2 callersMethodsetup
Perform necessary pre-processing steps. Args: img_a (Tensor): Input image from domain A. img_b (Tensor): Input image
mmedit/models/synthesizers/pix2pix.py:96
↓ 2 callersMethodsetup
Perform necessary pre-processing steps. Args: img_a (Tensor): Input image from domain A. img_b (Tensor): Input image
mmedit/models/synthesizers/cycle_gan.py:152
↓ 2 callersFunctionsingle_gpu_test
Test model with a single gpu. This method tests model with a single gpu and displays test progress bar. Args: model (nn.Module): Mod
mmedit/apis/test.py:13
↓ 2 callersMethodspatial_ensemble
Apply spatial ensemble. Args: imgs (torch.Tensor): The images to be processed by the model. Its size should be ei
mmedit/models/common/ensemble.py:55
↓ 2 callersMethodstem
(x)
mmedit/models/components/clip/model.py:141
↓ 2 callersMethodtrain
(self, mode=True)
mmedit/models/backbones/encoder_decoders/encoders/pconv_encoder.py:92
↓ 1 callersMethod__init__
(self, target_lr=0, start=0, interval=1, **kwargs)
mmedit/core/scheduler/lr_updater.py:22
↓ 1 callersMethod__init__
(self, dataloader, interval=1, **eval_kwargs)
mmedit/core/evaluation/eval_hooks.py:22
↓ 1 callersMethod__init__
(self, in_channels)
mmedit/models/components/discriminators/light_cnn.py:75
↓ 1 callersMethod__init__
(self, out_size, style_channels, num_mlps=8,
mmedit/models/components/stylegan2/generator_discriminator.py:82
↓ 1 callersMethod__init__
(self, in_channels=256, dilation_rates=(1, 2, 4, 8), act_cf
mmedit/models/backbones/encoder_decoders/necks/aot_neck.py:71
↓ 1 callersMethod__init__
(self, block, layers, in_channels, kernel_
mmedit/models/backbones/encoder_decoders/decoders/resnet_dec.py:105
↓ 1 callersMethod__init__
(self, in_channels, out_channels, kernel_size=5,
mmedit/models/backbones/encoder_decoders/decoders/indexnet_decoder.py:27
↓ 1 callersMethod__init__
(self, kernel_size, stride=None, padding=0)
mmedit/models/backbones/encoder_decoders/decoders/plain_decoder.py:115
↓ 1 callersMethod__init__
(self, mid_channels=64, num_blocks=30, keyframe_stride=5,
mmedit/models/backbones/sr_backbones/iconvsr.py:41
↓ 1 callersMethod__init__
(self, in_channels=3, mid_channels=64, out_channels=3,
mmedit/models/backbones/sr_backbones/tdan_net.py:81
↓ 1 callersMethod__init__
(self, mid_channels=64, num_blocks=7, max_residue_magnitude
mmedit/models/backbones/sr_backbones/basicvsr_pp.py:45
↓ 1 callersMethod__init__
(self, in_channels, out_channels, mid_channels=64,
mmedit/models/backbones/sr_backbones/edsr.py:63
↓ 1 callersMethod__init__
(self, in_size, out_size, img_channels=3,
mmedit/models/backbones/sr_backbones/glean_styleganv2.py:90
↓ 1 callersMethod__init__
(self, generator, pixel_loss, att_klloss=None,
mmedit/models/restorers/clipiqa.py:32
↓ 1 callersMethod__init__
(self, in_channels, out_channels=256, mid_channels=256,
mmedit/models/common/aspp.py:59
↓ 1 callersMethod__init__
(self)
mmedit/models/losses/feature_loss.py:17
↓ 1 callersMethod_apply_gaussian_noise
(self, imgs)
mmedit/datasets/pipelines/random_degradations.py:262
↓ 1 callersMethod_apply_poisson_noise
(self, imgs)
mmedit/datasets/pipelines/random_degradations.py:285
↓ 1 callersMethod_apply_random_blur
(self, imgs)
mmedit/datasets/pipelines/random_degradations.py:106
↓ 1 callersMethod_apply_random_compression
(self, imgs)
mmedit/datasets/pipelines/random_degradations.py:365
↓ 1 callersMethod_apply_random_compression
(self, imgs)
mmedit/datasets/pipelines/random_degradations.py:426
↓ 1 callersMethod_apply_random_noise
(self, imgs)
mmedit/datasets/pipelines/random_degradations.py:312
↓ 1 callersMethod_binarize
(self, img)
mmedit/datasets/pipelines/augmentation.py:718
↓ 1 callersMethod_build_degradations
(self, degradations)
mmedit/datasets/pipelines/random_degradations.py:522
↓ 1 callersFunction_concat_dataset
Concat datasets with different ann_file but the same type. Args: cfg (dict): The config of dataset. default_args (dict, optional)
mmedit/datasets/builder.py:29
↓ 1 callersMethod_crop
(self, data)
mmedit/datasets/pipelines/crop.py:37
↓ 1 callersMethod_crop
(self, data, x_offset, y_offset, crop_w, crop_h)
mmedit/datasets/pipelines/crop.py:267
↓ 1 callersFunction_dist_train
Distributed training function. Args: model (nn.Module): The model to be trained. dataset (:obj:`Dataset`): Train dataset.
mmedit/apis/train.py:116
↓ 1 callersFunction_download
(url: str, root: str)
mmedit/models/components/clip/clip.py:40
↓ 1 callersMethod_freeze_stages
Freeze stages param and norm stats.
mmedit/models/backbones/encoder_decoders/encoders/resnet.py:432
↓ 1 callersMethod_generate_one_heatmap
Generate One Heatmap. Args: landmark (Tuple[float]): Location of a landmark. results: heatmap (np.ndarray):
mmedit/datasets/pipelines/generate_assistant.py:56
↓ 1 callersMethod_get_file_list
(fg_dirs, alpha_dirs)
mmedit/datasets/pipelines/matting_aug.py:288
↓ 1 callersMethod_get_inverse_affine_matrix
Helper method to compute inverse matrix for affine transformation. As it is explained in PIL.Image.rotate, we need compute INVERSE of
mmedit/datasets/pipelines/augmentation.py:460
↓ 1 callersMethod_get_mask_from_file
(self, path)
mmedit/datasets/pipelines/loading.py:380
↓ 1 callersMethod_get_random_mask_from_set
(self)
mmedit/datasets/pipelines/loading.py:364
↓ 1 callersMethod_init_conv_weights
Initialize conv weights as described in PGGAN.
mmedit/models/components/stylegan2/modules.py:212
← previousnext →101–200 of 1,214, ranked by callers