MCPcopy Create free account

hub / github.com/TianheWu/CoSeR / functions

Functions1,666 in github.com/TianheWu/CoSeR

↓ 3 callersMethodget_weighting
(self, h, w, Ly, Lx, device)
ldm/models/diffusion/ddpm.py:1910
↓ 3 callersMethodget_weighting
(self, h, w, Ly, Lx, device)
ldm/models/diffusion/ddpm.py:3634
↓ 3 callersMethodget_weighting
(self, h, w, Ly, Lx, device)
ldm/models/diffusion/ddpm_inv.py:625
↓ 3 callersMethodinit_from_ckpt
(self, path, ignore_keys=list(), only_model=False)
ldm/models/diffusion/ddpm.py:309
↓ 3 callersFunctionlog_txt_as_img
(wh, xc, size=10)
ldm/util.py:17
↓ 3 callersFunctionmake_resample_kernel
Make resampling kernel for UpFirDn. Args: k (list[int]): A list indicating the 1D resample kernel magnitude. Returns: Tensor
basicsr/archs/stylegan2_arch.py:26
↓ 3 callersFunctionmesh_grid
Generate the mesh grid, centering at zero. Args: kernel_size (int): Returns: xy (ndarray): with the shape (kernel_size, kern
basicsr/data/degradations.py:32
↓ 3 callersMethodmixing_noise
(self, batch, prob)
basicsr/models/stylegan2_model.py:179
↓ 3 callersFunctionmkdir_and_rename
mkdirs. If path exists, rename it with timestamp and create a new one. Args: path (str): Folder path.
basicsr/utils/misc.py:24
↓ 3 callersMethodpreload
(self)
basicsr/data/prefetch_dataloader.py:102
↓ 3 callersMethodq_mean_variance
Get the distribution q(x_t | x_0). :param x_start: the [N x C x ...] tensor of noiseless inputs. :param t: the number of diff
ldm/models/diffusion/ddpm.py:328
↓ 3 callersMethodq_sample
(self, x_start, t, noise=None, ddim_num_steps=200)
ldm/models/diffusion/ddim.py:114
↓ 3 callersMethodq_sample_respace
(self, x_start, t, sqrt_alphas_cumprod, sqrt_one_minus_alphas_cumprod, noise=None)
ldm/models/diffusion/ddpm.py:405
↓ 3 callersMethodrestore
Restore the parameters stored with the `store` method. Useful to validate the model with EMA parameters without affecting the
ldm/modules/ema.py:66
↓ 3 callersMethodsample
(self, S, batch_size, shape, conditioning=None,
ldm/models/diffusion/ddim.py:121
↓ 3 callersMethodsample_log
(self,cond,struct_cond,batch_size,ddim, ddim_steps,**kwargs)
ldm/models/diffusion/ddpm.py:3264
↓ 3 callersMethodshared_step
(self, batch)
ldm/models/diffusion/ddpm.py:482
↓ 3 callersMethodshared_step
(self, batch)
ldm/models/diffusion/ddpm_inv.py:346
↓ 3 callersFunctionsigma_matrix2
Calculate the rotated sigma matrix (two dimensional matrix). Args: sig_x (float): sig_y (float): theta (float): Radian me
basicsr/data/degradations.py:16
↓ 3 callersFunctionssim
(img1, img2)
scripts/util_image.py:17
↓ 3 callersFunctionssim
(img1, img2)
ldm/modules/image_degradation/utils_image.py:669
↓ 3 callersMethodstore
Save the current parameters for restoring later. Args: parameters: Iterable of `torch.nn.Parameter`; the parameters to be
ldm/modules/ema.py:57
↓ 3 callersMethodtest
(self)
basicsr/models/sr_model.py:121
↓ 3 callersMethodto_rgb
(self, x)
ldm/models/autoencoder.py:263
↓ 3 callersFunctionupfirdn2d
(input, kernel, up=1, down=1, pad=(0, 0))
basicsr/ops/upfirdn2d/upfirdn2d.py:153
↓ 3 callersMethodvalidation
Validation function. Args: dataloader (torch.utils.data.DataLoader): Validation dataloader. current_iter (int): Curre
basicsr/models/base_model.py:36
↓ 2 callersMethod__init__
(self, batch_frequency, max_images, clamp=True, increase_log_steps=True, rescale=True, disabl
main.py:299
↓ 2 callersMethod__init__
(self, scale, num_feat)
basicsr/archs/arch_util.py:138
↓ 2 callersMethod__init__
(self, channel)
basicsr/archs/dfdnet_util.py:43
↓ 2 callersMethod__init__
(self, num_feat, num_grow_ch=32)
basicsr/archs/rrdbnet_arch.py:52
↓ 2 callersMethod__init__
(self, in_channels, out_channels, depth_multiplier, act_type='prelu', with_idt=False)
basicsr/archs/ecbsr_arch.py:170
↓ 2 callersMethod__init__
(self, adapt_official_weights=False)
basicsr/archs/tof_arch.py:111
↓ 2 callersMethod__init__
(self, loader)
basicsr/data/prefetch_dataloader.py:68
↓ 2 callersMethod__init__
(self, opt)
basicsr/data/video_test_dataset.py:46
↓ 2 callersMethod__len__
(self)
basicsr/data/realesrgan_dataset.py:244
↓ 2 callersMethod_do_register
(self, name, obj, suffix=None)
basicsr/utils/registry.py:38
↓ 2 callersMethod_get_denoise_row_from_list
(self, samples, desc='', force_no_decoder_quantization=False)
ldm/models/diffusion/ddpm.py:679
↓ 2 callersMethod_get_denoise_row_from_list
(self, samples, desc='', force_no_decoder_quantization=False)
ldm/models/diffusion/ddpm.py:1855
↓ 2 callersMethod_get_denoise_row_from_list
(self, samples, desc='', force_no_decoder_quantization=False)
ldm/models/diffusion/ddpm_inv.py:570
↓ 2 callersMethod_get_rows_from_list
(self, samples)
ldm/models/diffusion/ddpm.py:515
↓ 2 callersMethod_get_rows_from_list
(self, samples)
ldm/models/diffusion/ddpm_inv.py:379
↓ 2 callersFunction_totensor
(img, bgr2rgb, float32)
basicsr/utils/img_util.py:22
↓ 2 callersMethod_update_best_metric_result
(self, dataset_name, metric, val, current_iter)
basicsr/models/base_model.py:65
↓ 2 callersMethod_validation_step
(self, batch, batch_idx, suffix="")
ldm/models/autoencoder.py:178
↓ 2 callersFunctionadaptive_instance_normalization
Adaptive instance normalization. Adjust the reference features to have the similar color and illuminations as those in the degradate features.
ldm/models/diffusion/ddpm.py:87
↓ 2 callersFunctionadd_Gaussian_noise
(img, noise_level1=2, noise_level2=25)
ldm/modules/image_degradation/bsrgan_light.py:373
↓ 2 callersFunctionadd_Poisson_noise
(img)
ldm/modules/image_degradation/bsrgan.py:404
↓ 2 callersFunctionadd_jpg_compression
Add JPG compression artifacts. Args: img (Numpy array): Input image, shape (h, w, c), range [0, 1], float32. quality (float): JPG
basicsr/data/degradations.py:899
↓ 2 callersFunctionadd_resize
(img, sf=4)
ldm/modules/image_degradation/bsrgan.py:339
↓ 2 callersFunctionadd_speckle_noise
(img, noise_level1=2, noise_level2=25)
ldm/modules/image_degradation/bsrgan.py:386
↓ 2 callersFunctionalways
(val)
ldm/modules/x_transformer.py:64
↓ 2 callersMethodapply_model
(self, x_noisy, t, cond, return_ids=False)
ldm/models/diffusion/ddpm_inv.py:932
↓ 2 callersFunctionbgr2rgb
(im)
scripts/util_image.py:212
↓ 2 callersFunctionbicubic_degradation
Args: x: HxWxC image, [0, 1] sf: down-scale factor Return: bicubicly downsampled LR image
ldm/modules/image_degradation/bsrgan_light.py:228
↓ 2 callersFunctionbicubic_degradation
Args: x: HxWxC image, [0, 1] sf: down-scale factor Return: bicubicly downsampled LR image
ldm/modules/image_degradation/bsrgan.py:228
↓ 2 callersFunctionbuild_model
Build model from options. Args: opt (dict): Configuration. It must contain: model_type (str): Model type.
basicsr/models/__init__.py:18
↓ 2 callersFunctioncal_pca_components
(input, n_components=3)
ldm/models/diffusion/ddpm.py:56
↓ 2 callersFunctioncalc_mean_std
Calculate mean and std for adaptive_instance_normalization. Args: feat (Tensor): 4D tensor. eps (float): A small value added to
scripts/wavelet_color_fix.py:44
↓ 2 callersFunctioncalc_mean_std
Calculate mean and std for adaptive_instance_normalization. Args: feat (Tensor): 4D tensor. eps (float): A small value added to t
basicsr/archs/dfdnet_util.py:57
↓ 2 callersFunctioncalc_mean_std
Calculate mean and std for adaptive_instance_normalization. Args: feat (Tensor): 4D tensor. eps (float): A small value added to th
ldm/modules/diffusionmodules/model.py:21
↓ 2 callersFunctioncalc_mean_std
Calculate mean and std for adaptive_instance_normalization. Args: feat (Tensor): 4D tensor. eps (float): A small value added to th
ldm/models/diffusion/ddpm.py:72
↓ 2 callersMethodcalculate_mask
(self, x_size)
basicsr/archs/swinir_arch.py:262
↓ 2 callersMethodcalculate_mask
(self, x_size)
ldm/modules/swinir.py:212
↓ 2 callersFunctioncalculate_weights_indices
Calculate weights and indices, used for imresize function. Args: in_length (int): Input length. out_length (int): Output length.
basicsr/utils/matlab_functions.py:16
↓ 2 callersFunctionconvfft
Convolution with FFT Input: im: h1 x w1 x c numpy array weight: h2 x w2 numpy array Output: out: h1 x w1 x c nump
scripts/util_image.py:537
↓ 2 callersFunctioncount_flops_attn
A counter for the `thop` package to count the operations in an attention operation. Meant to be used like: macs, params = thop.pr
ldm/modules/diffusionmodules/openaimodel.py:518
↓ 2 callersFunctioncubic
cubic function used for calculate_weights_indices.
basicsr/utils/matlab_functions.py:6
↓ 2 callersFunctioncubic
(x)
ldm/modules/image_degradation/utils_image.py:700
↓ 2 callersMethoddelta_border
:param h: height :param w: width :return: normalized distance to image border, wtith min distance = 0 at border and
ldm/models/diffusion/ddpm.py:720
↓ 2 callersMethoddelta_border
:param h: height :param w: width :return: normalized distance to image border, wtith min distance = 0 at border and
ldm/models/diffusion/ddpm.py:1896
↓ 2 callersMethoddelta_border
:param h: height :param w: width :return: normalized distance to image border, wtith min distance = 0 at border and
ldm/models/diffusion/ddpm.py:3620
↓ 2 callersMethoddelta_border
:param h: height :param w: width :return: normalized distance to image border, wtith min distance = 0 at border and
ldm/models/diffusion/ddpm_inv.py:611
↓ 2 callersFunctiondict2str
dict to string for printing options. Args: opt (dict): Option dict. indent_level (int): Indent level. Default: 1. Return:
basicsr/utils/options.py:54
↓ 2 callersMethoddiscriminate
This is a conditional (on the input) discriminator In Batch Normalization, the fake and real images are recommended to be in
basicsr/models/hifacegan_model.py:74
↓ 2 callersMethoddist_validation
(self, dataloader, current_iter, tb_logger, save_img)
basicsr/models/sr_model.py:180
↓ 2 callersFunctionduf_downsample
Downsamping with Gaussian kernel used in the DUF official code. Args: x (Tensor): Frames to be downsampled, with shape (b, t, c, h, w).
basicsr/data/data_util.py:332
↓ 2 callersMethodencode
Encode input_tensor into feature maps, can be overridden in derived classes Default: nearest downsampling of 2**5 = 32 times
basicsr/archs/hifacegan_arch.py:61
↓ 2 callersMethodencode_first_stage
(self, x)
ldm/models/diffusion/ddpm_inv.py:866
↓ 2 callersFunctionestimate_aggd_param
Estimate AGGD (Asymmetric Generalized Gaussian Distribution) parameters. Args: block (ndarray): 2D Image block. Returns: tup
basicsr/metrics/niqe.py:13
↓ 2 callersMethodextract_starts
(self, length)
scripts/util_image.py:635
↓ 2 callersMethodextract_starts
(self, length)
scripts/util_image.py:709
↓ 2 callersMethodfind_in_interval
(self, n)
ldm/lr_scheduler.py:52
↓ 2 callersMethodforward
(self, x)
basicsr/archs/hifacegan_arch.py:71
↓ 2 callersMethodforward
Args: pred (Tensor): of shape (N, C, H, W). Predicted tensor. target (Tensor): of shape (N, C, H, W). Ground truth te
basicsr/losses/basic_loss.py:45
↓ 2 callersMethodforward
Args: input (Tensor): The input for the loss module, i.e., the network prediction. target_is_real (bo
basicsr/losses/gan_loss.py:89
↓ 2 callersMethodgather
(self)
scripts/util_image.py:682
↓ 2 callersFunctiongenerate_frame_indices
Generate an index list for reading `num_frames` frames from a sequence of images. Args: crt_idx (int): Current center index.
basicsr/data/data_util.py:43
↓ 2 callersFunctiongenerate_gaussian_noise_pt
Add Gaussian noise (PyTorch version). Args: img (Tensor): Shape (b, c, h, w), range[0, 1], float32. scale (float | Tensor): Noise
basicsr/data/degradations.py:510
↓ 2 callersFunctiongenerate_poisson_noise
Generate poisson noise. Reference: https://github.com/scikit-image/scikit-image/blob/main/skimage/util/noise.py#L37-L219 Args: img (
basicsr/data/degradations.py:617
↓ 2 callersFunctiongenerate_poisson_noise_pt
Generate a batch of poisson noise (PyTorch version) Args: img (Tensor): Input image, shape (b, c, h, w), range [0, 1], float32. s
basicsr/data/degradations.py:667
↓ 2 callersMethodget_avg_time
(self)
basicsr/utils/logger.py:41
↓ 2 callersMethodget_conditioning
(self, batch, k=None)
ldm/models/diffusion/classifier.py:133
↓ 2 callersFunctionget_env_info
Get environment information. Currently, only log the software version.
basicsr/utils/logger.py:188
↓ 2 callersMethodget_extended_attention_mask
Makes broadcastable attention and causal masks so that future and masked tokens are ignored. Arguments: attention_mask (
ldm/models/Qformer.py:713
↓ 2 callersMethodget_first_stage_encoding
(self, encoder_posterior)
ldm/models/diffusion/ddpm_inv.py:582
↓ 2 callersMethodget_input
(self, batch, k)
ldm/models/diffusion/classifier.py:124
↓ 2 callersMethodget_input
(self, batch, k, return_first_stage_outputs=False, force_c_encode=False, cond_key=None, retu
ldm/models/diffusion/ddpm.py:803
↓ 2 callersMethodget_input
Degradation pipeline, modified from Real-ESRGAN: https://github.com/xinntao/Real-ESRGAN
ldm/models/diffusion/ddpm.py:2045
↓ 2 callersMethodget_input
(self, batch, k, return_first_stage_outputs=False, force_c_encode=False, cond_key=None, retu
ldm/models/diffusion/ddpm_inv.py:694
↓ 2 callersMethodget_input_synthesis
(self, batch, val=False, test_gt=False)
ldm/models/autoencoder.py:668
← previousnext →201–300 of 1,666, ranked by callers