MCPcopy Create free account

hub / github.com/TianheWu/CoSeR / functions

Functions1,666 in github.com/TianheWu/CoSeR

↓ 155 callersMethodget
(self, name, suffix='basicsr')
basicsr/utils/registry.py:65
↓ 78 callersMethodregister_buffer
(self, name, attr)
ldm/models/diffusion/ddim.py:75
↓ 45 callersMethodload
(self, ckpt_path)
ldm/modules/embedding_manager.py:135
↓ 41 callersMethodkeys
(self)
basicsr/utils/registry.py:80
↓ 40 callersMethodupdate
Input: pch_res: pch_size x pch_size x 3, [0,1] index_infos: (h_start, h_end, w_start, w_end)
scripts/util_image.py:667
↓ 39 callersFunctionextract_into_tensor
(a, t, x_shape)
ldm/modules/diffusionmodules/util.py:96
↓ 37 callersMethoddecode
(self, x_latent, cond, t_start, unconditional_guidance_scale=1.0, unconditional_conditioning=None,
ldm/models/diffusion/ddim.py:287
↓ 37 callersFunctioninstantiate_from_config
(config)
ldm/util.py:78
↓ 37 callersMethodrepeat
(x, k=2)
basicsr/utils/diffjpeg.py:366
↓ 35 callersFunctionget_root_logger
Get the root logger. The logger will be initialized if it has not been initialized. By default a StreamHandler will be added. If `log_file` i
basicsr/utils/logger.py:146
↓ 27 callersFunctionimfrombytes
Read an image from bytes. Args: content (bytes): Image bytes got from files or other streams. flag (str): Flags specifying the co
basicsr/utils/img_util.py:114
↓ 25 callersFunctionconv_nd
Create a 1D, 2D, or 3D convolution module.
ldm/modules/diffusionmodules/util.py:218
↓ 24 callersFunctionimg2tensor
Numpy array to tensor. Args: imgs (list[ndarray] | ndarray): Input images. bgr2rgb (bool): Whether to change bgr to rgb.
basicsr/utils/img_util.py:9
↓ 22 callersFunctionfilter2D
PyTorch version of cv2.filter2D Args: img (Tensor): (b, c, h, w) kernel (Tensor): (b, k, k)
basicsr/utils/img_process_util.py:7
↓ 22 callersMethodq_sample
(self, x_start, t, noise=None)
ldm/models/diffusion/ddpm.py:400
↓ 19 callersMethod__init__
(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, attn_resolutions, dropout=0.0, resam
ldm/modules/diffusionmodules/model.py:317
↓ 19 callersMethodbackward
(ctx, grad_output)
basicsr/archs/dfdnet_util.py:32
↓ 17 callersMethodupsample
Compute the output image given the features. Args: lqs (tensor): Input low quality (LQ) sequence with shape (n, t
basicsr/archs/basicvsrpp_arch.py:237
↓ 16 callersMethodencode
(self, x)
ldm/models/autoencoder.py:104
↓ 16 callersFunctionexists
(val)
ldm/modules/x_transformer.py:54
↓ 15 callersMethod__init__
(self, n_embed, n_layer, vocab_size=30522, max_seq_len=77, device="cuda",use_tokenizer=True,
ldm/modules/encoders/modules.py:85
↓ 15 callersFunctiondefault
(val, d)
ldm/util.py:57
↓ 15 callersMethodmode
(self)
ldm/modules/distributions/distributions.py:20
↓ 14 callersMethod__init__
(self)
basicsr/utils/diffjpeg.py:125
↓ 14 callersMethod__init__
(self, config, layer_num)
ldm/models/Qformer.py:379
↓ 14 callersFunctionbuild_loss
Build loss from options. Args: opt (dict): Configuration. It must contain: type (str): Model type.
basicsr/losses/__init__.py:19
↓ 13 callersFunctionNormalize
(in_channels, num_groups=32)
ldm/modules/diffusionmodules/model.py:76
↓ 13 callersMethod__init__
(self, in_channels, num_style_feat, upsample=True, resample_kernel=(1, 3, 3, 1))
basicsr/archs/stylegan2_arch.py:347
↓ 13 callersMethod__init__
(self, dim_in, dim_out)
ldm/modules/attention.py:48
↓ 13 callersMethodema_scope
(self, context=None)
ldm/models/diffusion/ddpm.py:295
↓ 13 callersMethodmodel_ema
(self, decay=0.999)
basicsr/models/base_model.py:75
↓ 13 callersFunctionnonlinearity
(x)
ldm/modules/diffusionmodules/model.py:71
↓ 13 callersMethodregister_buffer
(self, name, attr)
ldm/models/diffusion/plms.py:18
↓ 12 callersMethod__init__
(self, value, fn)
ldm/modules/x_transformer.py:118
↓ 12 callersMethod__init__
(self, channels, use_conv, dims=2, out_channels=None, padding=1)
ldm/modules/diffusionmodules/openaimodel.py:161
↓ 12 callersMethodapply_model
(self, x_noisy, t, cond, return_ids=False)
ldm/models/diffusion/ddpm.py:1055
↓ 12 callersFunctionaugment
Augment: horizontal flips OR rotate (0, 90, 180, 270 degrees). We use vertical flip and transpose for rotation implementation. All the images
basicsr/data/transforms.py:155
↓ 12 callersMethodclose
(self)
basicsr/utils/lmdb_util.py:196
↓ 12 callersFunctionpaired_random_crop
Paired random crop. Support Numpy array and Tensor inputs. It crops lists of lq and gt images with corresponding locations. Args: im
basicsr/data/transforms.py:26
↓ 12 callersMethodsave_network
Save networks. Args: net (nn.Module | list[nn.Module]): Network(s) to be saved. net_label (str): Network label.
basicsr/models/base_model.py:208
↓ 12 callersFunctionscandir
Scan a directory to find the interested files. Args: dir_path (str): Path of the directory. suffix (str | tuple(str), optional):
basicsr/utils/misc.py:52
↓ 11 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
basicsr/archs/swinir_arch.py:45
↓ 11 callersFunctioncallback
get the image data and update pbar.
basicsr/utils/lmdb_util.py:81
↓ 11 callersMethoddecode_first_stage
(self, z, predict_cids=False, force_not_quantize=False)
ldm/models/diffusion/ddpm.py:870
↓ 11 callersMethodencode_first_stage
(self, x)
ldm/models/diffusion/ddpm.py:990
↓ 11 callersMethodget_first_stage_encoding
(self, encoder_posterior)
ldm/models/diffusion/ddpm.py:691
↓ 11 callersMethodget_optimizer
(self, optim_type, params, lr, **kwargs)
basicsr/models/base_model.py:103
↓ 11 callersFunctionmake_layer
Make layers by stacking the same blocks. Args: basic_block (nn.module): nn.module class for basic block. num_basic_block (int): n
basicsr/archs/arch_util.py:48
↓ 11 callersFunctionnoise_like
(shape, device, repeat=False)
ldm/modules/diffusionmodules/util.py:264
↓ 11 callersFunctionnormalization
Make a standard normalization layer. :param channels: number of input channels. :return: an nn.Module for normalization.
ldm/modules/diffusionmodules/util.py:199
↓ 11 callersMethodquantize
(self, x, *args, **kwargs)
ldm/models/autoencoder.py:461
↓ 10 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
ldm/modules/swinir.py:15
↓ 10 callersFunctionbuild_network
(opt)
basicsr/archs/__init__.py:18
↓ 10 callersFunctionflow_warp
Warp an image or feature map with optical flow. Args: x (Tensor): Tensor with size (n, c, h, w). flow (Tensor): Tensor with size
basicsr/archs/arch_util.py:152
↓ 10 callersFunctionlinear
Create a linear module.
ldm/modules/diffusionmodules/util.py:231
↓ 10 callersMethodmeshgrid
(self, h, w)
ldm/models/diffusion/ddpm.py:713
↓ 10 callersFunctionrandom_add_gaussian_noise_pt
(img, sigma_range=(0, 1.0), gray_prob=0, clip=True, rounds=False)
basicsr/data/degradations.py:603
↓ 10 callersFunctionrandom_add_poisson_noise_pt
(img, scale_range=(0, 1.0), gray_prob=0, clip=True, rounds=False)
basicsr/data/degradations.py:772
↓ 10 callersMethodsave
(self, epoch, current_iter)
basicsr/models/sr_model.py:274
↓ 10 callersFunctiontensor2img
Convert torch Tensors into image numpy arrays. After clamping to [min, max], values will be normalized to [0, 1]. Args: tensor (Tens
basicsr/utils/img_util.py:38
↓ 9 callersMethod__init__
(self, in_channels, num_style_feat, upsample=True, interpolation_mode='bilinear')
basicsr/archs/stylegan2_bilinear_arch.py:218
↓ 9 callersMethoddecode_first_stage
(self, z, predict_cids=False, force_not_quantize=False)
ldm/models/diffusion/ddpm.py:2360
↓ 9 callersMethodload_network
Load network. Args: load_path (str): The path of networks to be loaded. net (nn.Module): Network. strict
basicsr/models/base_model.py:289
↓ 9 callersFunctionmake_attn
(in_channels, attn_type="vanilla")
ldm/modules/diffusionmodules/model.py:302
↓ 9 callersMethodq_sample
(self, x_start, t, noise=None)
ldm/models/diffusion/ddpm_inv.py:283
↓ 9 callersFunctionread_img_seq
Read a sequence of images from a given folder path. Args: path (list[str] | str): List of image paths or image folder path. requi
basicsr/data/data_util.py:11
↓ 9 callersFunctionzero_module
Zero out the parameters of a module and return it.
ldm/modules/attention.py:77
↓ 8 callersFunctioncheckpoint
Evaluate a function without caching intermediate activations, allowing for reduced memory at the expense of extra compute in the backward pas
ldm/modules/diffusionmodules/util.py:102
↓ 8 callersMethoddecode_first_stage
(self, z, predict_cids=False, force_not_quantize=False)
ldm/models/diffusion/ddpm_inv.py:746
↓ 8 callersFunctionzero_module
Zero out the parameters of a module and return it.
ldm/modules/diffusionmodules/util.py:174
↓ 7 callersFunctionNormalize
(in_channels)
ldm/modules/attention.py:86
↓ 7 callersMethodapply_model
(self, x_noisy, t, cond, return_ids=False, gen_mode=False)
ldm/models/diffusion/ddpm.py:2616
↓ 7 callersFunctiondefault
(val, d)
ldm/modules/attention.py:29
↓ 7 callersMethodema_scope
(self, context=None)
ldm/models/diffusion/ddpm_inv.py:181
↓ 7 callersMethodencode_first_stage
(self, x)
ldm/models/diffusion/ddpm.py:2481
↓ 7 callersFunctionexists
(val)
ldm/modules/attention.py:21
↓ 7 callersFunctionexists
(val)
ldm/modules/diffusionmodules/openaimodel.py:39
↓ 7 callersMethodflops
(self)
basicsr/archs/swinir_arch.py:560
↓ 7 callersMethodflops
(self)
ldm/modules/swinir.py:477
↓ 7 callersMethodget_first_stage_encoding
(self, encoder_posterior)
ldm/models/diffusion/ddpm.py:1867
↓ 7 callersMethodput
(self, img_byte, key, img_shape)
basicsr/utils/lmdb_util.py:185
↓ 7 callersMethodreduce_loss_dict
reduce loss dict. In distributed training, it averages the losses among different GPUs . Args: loss_dict (OrderedDict):
basicsr/models/base_model.py:367
↓ 7 callersMethodregister_schedule
(self, given_betas=None, beta_schedule="linear", timesteps=1000, linear_start=1e-4,
ldm/models/diffusion/ddpm.py:237
↓ 7 callersMethodsample
(self)
ldm/modules/distributions/distributions.py:17
↓ 7 callersMethodtranspose_for_scores
(self, x)
ldm/models/Qformer.py:161
↓ 6 callersMethod__init__
(self, txt_file, data_root, size=None, int
ldm/data/lsun.py:10
↓ 6 callersFunctionadd_JPEG_noise
(img)
ldm/modules/image_degradation/bsrgan.py:418
↓ 6 callersFunctionadd_blur
(img, sf=4)
ldm/modules/image_degradation/bsrgan.py:325
↓ 6 callersFunctioncircular_lowpass_kernel
2D sinc filter Reference: https://dsp.stackexchange.com/questions/58301/2-d-circularly-symmetric-low-pass-filter Args: cutoff (float
basicsr/data/degradations.py:439
↓ 6 callersMethoddecode
(self, quant)
ldm/models/autoencoder.py:115
↓ 6 callersFunctiondefault
(val, d)
ldm/modules/x_transformer.py:58
↓ 6 callersFunctiondefault_init_weights
Initialize network weights. Args: module_list (list[nn.Module] | nn.Module): Modules to be initialized. scale (float): Scale init
basicsr/archs/arch_util.py:18
↓ 6 callersMethodembedding_parameters
(self)
ldm/modules/embedding_manager.py:147
↓ 6 callersMethodencode_with_vision_transformer
(self, img)
ldm/modules/encoders/modules.py:254
↓ 6 callersFunctionget_dist_info
()
basicsr/utils/dist_util.py:60
↓ 6 callersMethodmodel_to_device
Model to device. It also warps models with DistributedDataParallel or DataParallel. Args: net (nn.Module)
basicsr/models/base_model.py:87
↓ 6 callersMethodprint_network
Print the str and parameter number of a network. Args: net (nn.Module)
basicsr/models/base_model.py:144
↓ 6 callersMethodsample
(self, batch_size=16, return_intermediates=False)
ldm/models/diffusion/ddpm.py:394
↓ 6 callersFunctiontrunc_normal_
r"""Fills the input Tensor with values drawn from a truncated normal distribution. From: https://github.com/rwightman/pytorch-image-models/bl
basicsr/archs/arch_util.py:311
↓ 5 callersMethod__init__
(self, in_channels, mid_channels, out_channels)
basicsr/archs/ridnet_arch.py:119
next →1–100 of 1,666, ranked by callers