MCPcopy Create free account

hub / github.com/TianheWu/CoSeR / functions

Functions1,666 in github.com/TianheWu/CoSeR

↓ 5 callersMethod__init__
(self, unet_config, timesteps=1000, beta_schedule="linear",
ldm/models/diffusion/ddpm.py:166
↓ 5 callersMethodact
(self, x)
basicsr/archs/hifacegan_util.py:109
↓ 5 callersFunctionbgr2ycbcr
Convert a BGR image to YCbCr image. The bgr version of rgb2ycbcr. It implements the ITU-R BT.601 conversion for standard-definition telev
basicsr/utils/color_util.py:38
↓ 5 callersMethoddownsample
(self, x)
basicsr/archs/hifacegan_arch.py:208
↓ 5 callersMethodfeed_data
(self, data)
basicsr/models/sr_model.py:87
↓ 5 callersMethodforward
(self, x)
ldm/modules/diffusionmodules/util.py:210
↓ 5 callersMethodget_bare_model
Get bare model, especially under wrapping with DistributedDataParallel or DataParallel.
basicsr/models/base_model.py:135
↓ 5 callersMethodget_input
(self, batch, k)
ldm/models/diffusion/ddpm.py:474
↓ 5 callersMethodget_input
(self, batch, k)
ldm/models/diffusion/ddpm_inv.py:338
↓ 5 callersMethodget_learned_conditioning
(self, c)
ldm/models/diffusion/ddpm_inv.py:591
↓ 5 callersMethodget_loss
(self, pred, target, mean=True)
ldm/models/diffusion/ddpm.py:422
↓ 5 callersFunctionimwrite
Write image to file. Args: img (ndarray): Image array to be written. file_path (str): Image file path. params (None or li
basicsr/utils/img_util.py:135
↓ 5 callersMethodnormalize
(self, img)
basicsr/archs/tof_arch.py:131
↓ 5 callersFunctionreorder_image
Reorder images to 'HWC' order. If the input_order is (h, w), return (h, w, 1); If the input_order is (c, h, w), return (h, w, c); If the
basicsr/metrics/metric_util.py:6
↓ 5 callersMethodsample_log
(self,cond,batch_size,ddim, ddim_steps,**kwargs)
ldm/models/diffusion/ddpm_inv.py:1284
↓ 5 callersMethodsave_training_state
Save training states during training, which will be used for resuming. Args: epoch (int): Current epoch. curr
basicsr/models/base_model.py:318
↓ 5 callersMethodsetup_schedulers
Set up schedulers.
basicsr/models/base_model.py:122
↓ 5 callersMethodstart
(self)
basicsr/utils/logger.py:20
↓ 5 callersFunctionto_y_channel
Change to Y channel of YCbCr. Args: img (ndarray): Images with range [0, 255]. Returns: (ndarray): Images with range [0, 255
basicsr/metrics/metric_util.py:32
↓ 4 callersMethod__init__
Build pretrained InceptionV3. Args: output_blocks (list[int]): Indices of blocks to return features of. Possible
basicsr/archs/inception.py:32
↓ 4 callersMethod__init__
(self, loss_weight=1.0, reduction='mean')
basicsr/losses/basic_loss.py:37
↓ 4 callersMethod__init__
Imagenet Superresolution Dataloader Performs following ops in order: 1. crops a crop of size s from image either as random o
ldm/data/imagenet.py:273
↓ 4 callersMethod__init__
(self, ddconfig, lossconfig, n_embed, embe
ldm/models/autoencoder.py:23
↓ 4 callersFunction_convert_input_type_range
Convert the type and range of the input image. It converts the input image to np.float32 type and range of [0, 1]. It is mainly used for pre-
basicsr/utils/color_util.py:129
↓ 4 callersFunction_convert_output_type_range
Convert the type and range of the image according to dst_type. It converts the image to desired type and range. If `dst_type` is np.uint8, im
basicsr/utils/color_util.py:156
↓ 4 callersMethod_gram_mat
Calculate Gram matrix. Args: x (torch.Tensor): Tensor with shape of (n, c, h, w). Returns: torch.Tensor: Gra
basicsr/losses/basic_loss.py:240
↓ 4 callersFunction_ntuple
(n)
basicsr/archs/arch_util.py:338
↓ 4 callersFunctionadaptive_instance_normalization
Adaptive instance normalization. Adjust the reference features to have the similar color and illuminations as those in the degradate feature
scripts/wavelet_color_fix.py:59
↓ 4 callersFunctionadd_Gaussian_noise
(img, noise_level1=2, noise_level2=25)
ldm/modules/image_degradation/bsrgan.py:369
↓ 4 callersFunctionadd_JPEG_noise
(img)
ldm/modules/image_degradation/bsrgan_light.py:422
↓ 4 callersFunctionadopt_weight
(weight, global_step, threshold=0, value=0.)
ldm/modules/losses/vqperceptual.py:20
↓ 4 callersFunctioncalculate_metric
Calculate metric from data and options. Args: opt (dict): Configuration. It must contain: type (str): Model type.
basicsr/metrics/__init__.py:10
↓ 4 callersFunctioncalculate_weights_indices
(in_length, out_length, scale, kernel, kernel_width, antialiasing)
ldm/modules/image_degradation/utils_image.py:708
↓ 4 callersMethodcompute_top_k
(self, logits, labels, k, reduction="mean")
ldm/models/diffusion/classifier.py:150
↓ 4 callersMethodema_scope
(self, context=None)
ldm/models/autoencoder.py:72
↓ 4 callersMethodencode
(self, input_tensor)
basicsr/archs/hifacegan_arch.py:163
↓ 4 callersMethodforward_features
(self, x)
basicsr/archs/swinir_arch.py:876
↓ 4 callersMethodforward_features
(self, x)
ldm/modules/swinir.py:777
↓ 4 callersMethodget_current_visuals
(self)
basicsr/models/sr_model.py:266
↓ 4 callersMethodget_fold_unfold
:param x: img of size (bs, c, h, w) :return: n img crops of size (n, bs, c, kernel_size[0], kernel_size[1])
ldm/models/diffusion/ddpm.py:750
↓ 4 callersMethodget_fold_unfold
:param x: img of size (bs, c, h, w) :return: n img crops of size (n, bs, c, kernel_size[0], kernel_size[1])
ldm/models/diffusion/ddpm_inv.py:641
↓ 4 callersMethodget_last_layer
(self)
ldm/models/autoencoder.py:238
↓ 4 callersMethodget_last_layer
(self)
ldm/models/autoencoder.py:422
↓ 4 callersMethodget_last_layer
(self)
ldm/models/autoencoder.py:884
↓ 4 callersMethodget_learned_conditioning
(self, c)
ldm/models/diffusion/ddpm.py:700
↓ 4 callersMethodinit_weights
Initialize weights for PixelShufflePack.
basicsr/archs/arch_util.py:88
↓ 4 callersMethodmake_schedule
(self, ddim_num_steps, ddim_discretize="uniform", ddim_eta=0., verbose=True)
ldm/models/diffusion/ddim.py:81
↓ 4 callersMethodmake_zero_conv
(self, channels)
ldm/modules/diffusionmodules/openaimodel.py:1614
↓ 4 callersFunctionmean_flat
Take the mean over all non-batch dimensions.
ldm/modules/diffusionmodules/util.py:192
↓ 4 callersFunctionnormal_kl
source: https://github.com/openai/guided-diffusion/blob/27c20a8fab9cb472df5d6bdd6c8d11c8f430b924/guided_diffusion/losses.py#L12 Compute the K
ldm/modules/distributions/distributions.py:65
↓ 4 callersMethodpredict_start_from_noise
(self, x_t, t, noise)
ldm/models/diffusion/ddpm.py:340
↓ 4 callersMethodpredict_start_from_z_and_v
(self, x, v, t)
ldm/models/diffusion/ddpm.py:416
↓ 4 callersMethodq_posterior
(self, x_start, x_t, t)
ldm/models/diffusion/ddpm.py:346
↓ 4 callersFunctionrandom_bivariate_Gaussian
Randomly generate bivariate isotropic or anisotropic Gaussian kernels. In the isotropic mode, only `sigma_x_range` is used. `sigma_y_range` and `
basicsr/data/degradations.py:176
↓ 4 callersFunctionrandom_bivariate_generalized_Gaussian
Randomly generate bivariate generalized Gaussian kernels. In the isotropic mode, only `sigma_x_range` is used. `sigma_y_range` and `rotation_rang
basicsr/data/degradations.py:224
↓ 4 callersFunctionrandom_bivariate_plateau
Randomly generate bivariate plateau kernels. In the isotropic mode, only `sigma_x_range` is used. `sigma_y_range` and `rotation_range` is ignored
basicsr/data/degradations.py:280
↓ 4 callersFunctionrandom_mixed_kernels
Randomly generate mixed kernels. Args: kernel_list (tuple): a list name of kernel types, support ['iso', 'aniso', 'skew', 'ge
basicsr/data/degradations.py:336
↓ 4 callersFunctionrgb2ycbcr
same as matlab rgb2ycbcr Input: im: uint8 [0,255] or float [0,1] only_y: only return Y channel
scripts/util_image.py:163
↓ 4 callersFunctionrgb2ycbcr
Convert a RGB image to YCbCr image. This function produces the same results as Matlab's `rgb2ycbcr` function. It implements the ITU-R BT.601
basicsr/utils/color_util.py:5
↓ 4 callersFunctionrgb2ycbcrTorch
same as matlab rgb2ycbcr Input: im: float [0,1], N x 3 x H x W only_y: only return Y channel
scripts/util_image.py:189
↓ 4 callersFunctionrgb2ycbcr_pt
Convert RGB images to YCbCr images (PyTorch version). It implements the ITU-R BT.601 conversion for standard-definition television. See more deta
basicsr/utils/color_util.py:186
↓ 4 callersMethodsample_log
(self,cond,batch_size,ddim, ddim_steps,**kwargs)
ldm/models/diffusion/ddpm.py:1403
↓ 4 callersMethodshared_step
(self, batch, t=None)
ldm/models/diffusion/classifier.py:179
↓ 4 callersFunctiontest
(img_path, img_path2, crop_border, test_y_channel=False)
basicsr/metrics/test_metrics/test_psnr_ssim.py:9
↓ 4 callersFunctiontimestep_embedding
Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may be
ldm/modules/diffusionmodules/util.py:151
↓ 4 callersMethodto_rgb
(self, x)
ldm/models/autoencoder.py:913
↓ 4 callersFunctionwavelet_reconstruction
Apply wavelet decomposition, so that the content will have the same color as the style.
scripts/wavelet_color_fix.py:108
↓ 3 callersMethod__init__
(self, in_channels, out_channels, kernel_size,
basicsr/ops/dcn/deform_conv.py:193
↓ 3 callersMethod__init__
(self, num_feat=64, num_block=15, keyframe_stride=5,
basicsr/archs/basicvsr_arch.py:133
↓ 3 callersMethod__init__
(self, config_text, norm_nc, label_nc)
basicsr/archs/hifacegan_util.py:14
↓ 3 callersMethod__init__
(self, num_in_ch=3, num_out_ch=3, num_feat=64,
basicsr/archs/edvr_arch.py:271
↓ 3 callersMethod__init__
(self, scale=4, num_layer=52, adapt_official_weights=False)
basicsr/archs/duf_arch.py:204
↓ 3 callersMethod__init__
(self, num_in_ch=3, num_feat=64, use_vae=False,
basicsr/archs/hifacegan_arch.py:151
↓ 3 callersMethod__init__
(self, num_feat, squeeze_factor=16, res_scale=1)
basicsr/archs/rcan_arch.py:36
↓ 3 callersMethod__init__
(self, unet_config, timesteps=1000, beta_schedule="linear",
ldm/models/diffusion/ddpm_inv.py:48
↓ 3 callersMethod_initialize_best_metric_results
Initialize the best metric results dict for recording the best metric value and iteration.
basicsr/models/base_model.py:50
↓ 3 callersMethod_log_validation_metric_values
(self, current_iter, dataset_name, tb_logger)
basicsr/models/sr_model.py:251
↓ 3 callersFunctionadd_blur
(img, sf=4)
ldm/modules/image_degradation/bsrgan_light.py:325
↓ 3 callersFunctionbuild_dataloader
Build dataloader. Args: dataset (torch.utils.data.Dataset): Dataset. dataset_opt (dict): Dataset options. It contains the followi
basicsr/data/__init__.py:40
↓ 3 callersFunctionbuild_dataset
Build dataset from options. Args: dataset_opt (dict): Configuration for dataset. It must contain: name (str): Dataset name.
basicsr/data/__init__.py:25
↓ 3 callersFunctioncalculate_psnr_pt
Calculate PSNR (Peak Signal-to-Noise Ratio) (PyTorch version). Reference: https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio Args:
basicsr/metrics/psnr_ssim.py:52
↓ 3 callersFunctioncalculate_ssim_pt
Calculate SSIM (structural similarity) (PyTorch version). ``Paper: Image quality assessment: From error visibility to structural similarity``
basicsr/metrics/psnr_ssim.py:132
↓ 3 callersMethodcopy_to
(self, model)
ldm/modules/ema.py:47
↓ 3 callersFunctioncount_params
(model, verbose=False)
ldm/util.py:71
↓ 3 callersFunctiondequantize_flow
Recover from quantized flow. Args: dx (ndarray): Quantized dx. dy (ndarray): Quantized dy. max_val (float): Maximum value
basicsr/utils/flow_util.py:102
↓ 3 callersFunctionexists
(x)
ldm/util.py:53
↓ 3 callersFunctionfspecial
python code from: https://github.com/ronaldosena/imagens-medicas-2/blob/40171a6c259edec7827a6693a93955de2bd39e76/Aulas/aula_2_-_uniform_filte
ldm/modules/image_degradation/bsrgan_light.py:210
↓ 3 callersFunctionfspecial
python code from: https://github.com/ronaldosena/imagens-medicas-2/blob/40171a6c259edec7827a6693a93955de2bd39e76/Aulas/aula_2_-_uniform_filte
ldm/modules/image_degradation/bsrgan.py:210
↓ 3 callersFunctionfused_leaky_relu
(input, bias, negative_slope=0.2, scale=2**0.5)
basicsr/ops/fused_act/fused_act.py:94
↓ 3 callersFunctiongenerate_gaussian_noise
Generate Gaussian noise. Args: img (Numpy array): Input image, shape (h, w, c), range [0, 1], float32. sigma (float): Noise scale
basicsr/data/degradations.py:469
↓ 3 callersMethodget_fold_unfold
:param x: img of size (bs, c, h, w) :return: n img crops of size (n, bs, c, kernel_size[0], kernel_size[1])
ldm/models/diffusion/ddpm.py:1926
↓ 3 callersMethodget_input
(self, batch, k)
ldm/models/autoencoder.py:132
↓ 3 callersMethodget_input
(self, batch, k)
ldm/models/autoencoder.py:367
↓ 3 callersMethodget_input
(self, batch)
ldm/models/autoencoder.py:649
↓ 3 callersMethodget_loss
(self, pred, target, mean=True)
ldm/models/diffusion/ddpm_inv.py:288
↓ 3 callersFunctionget_out_channel
(layer)
basicsr/archs/hifacegan_util.py:219
↓ 3 callersFunctionget_out_channel
(layer)
ldm/modules/spade.py:20
↓ 3 callersFunctionget_time_str
()
basicsr/utils/misc.py:20
↓ 3 callersMethodget_v
(self, x, noise, t)
ldm/models/diffusion/ddpm.py:410
↓ 3 callersMethodget_weighting
(self, h, w, Ly, Lx, device)
ldm/models/diffusion/ddpm.py:734
← previousnext →101–200 of 1,666, ranked by callers