MCPcopy Create free account

hub / github.com/294coder/Dif-PAN / functions

Functions295 in github.com/294coder/Dif-PAN

↓ 23 callersFunctionextract
(a, t, x_shape)
diffusion/diffusion_ddpm_pan.py:73
↓ 19 callersMethodmarginal_lambda
Compute lambda_t = log(alpha_t) - log(sigma_t) of a given continuous-time label t in [0, T].
solver/dpm_solver.py:151
↓ 19 callersMethodmarginal_std
Compute sigma_t of a given continuous-time label t in [0, T].
solver/dpm_solver.py:145
↓ 18 callersMethodlog
(self, msg: str, level=logging.INFO)
utils/logger.py:128
↓ 16 callersMethodmarginal_log_mean_coeff
Compute log(alpha_t) of a given continuous-time label t in [0, T].
solver/dpm_solver.py:126
↓ 15 callersMethodmodel_fn
Convert the model to the noise prediction model or the data prediction model.
solver/dpm_solver.py:452
↓ 13 callersMethod__init__
(self, dim, dim_out, groups=32, dropout=0)
models/sr3_dwt.py:289
↓ 13 callersMethod__init__
(self, dim, dim_out, groups=32, dropout=0)
models/sr3.py:277
↓ 11 callersMethodprint
(self, msg: str, level=logging.INFO)
utils/logger.py:65
↓ 9 callersMethod__init__
( self, in_channel=6, out_channel=3, inner_channel=32, norm_groups=32,
models/unet_model_google.py:212
↓ 8 callersFunctionexist
(b)
utils/misc.py:11
↓ 6 callersMethod__init__
( self, win_size=11, win_sigma=1.5, data_range=1, size_average=True, channel=3 )
utils/loss_utils.py:119
↓ 6 callersFunctionexists
(x)
models/unet_model_google.py:11
↓ 6 callersMethodinterpolate
(self, x1, x2, t=None, lam=0.5)
diffusion/diffusion_ddpm_pan.py:510
↓ 5 callersMethodget_time_steps
Compute the intermediate time steps for sampling. Args: skip_type: A `str`. The type for the spacing of the time steps. We suppor
solver/dpm_solver.py:461
↓ 5 callersMethodinverse_lambda
Compute the continuous-time label t in [0, T] of a given half-logSNR lambda_t.
solver/dpm_solver.py:159
↓ 4 callersFunctionexists
(x)
models/sr3_dwt.py:676
↓ 4 callersFunctionexists
(x)
models/sr3.py:672
↓ 4 callersMethodmarginal_alpha
Compute alpha_t of a given continuous-time label t in [0, T].
solver/dpm_solver.py:139
↓ 4 callersFunctionnoise_pred_fn
(x, t_continuous, cond=None)
solver/dpm_solver.py:290
↓ 4 callersMethodpredict_start_from_noise
(self, x_t, t, noise)
diffusion/diffusion_ddpm_pan.py:298
↓ 4 callersMethodset_new_noise_schedule
set new schedule, include but not limited betas, alphas, betas_cumprod, alphas_cumprod and register them into a buffer. Args:
diffusion/diffusion_ddpm_pan.py:199
↓ 3 callersMethod__init__
(self, dim)
models/pansharpen_model.py:32
↓ 3 callersFunctionconv3x3
(dim, dim2)
models/pansharpen_model.py:22
↓ 3 callersFunctioncreate_window
(window_size, channel, sigma=1.5)
utils/loss_utils.py:21
↓ 3 callersFunctiondefault
(val, d)
diffusion/diffusion_ddpm_pan.py:67
↓ 3 callersFunctiondefault
(val, d)
models/sr3_dwt.py:680
↓ 3 callersFunctiondefault
(val, d)
models/sr3.py:676
↓ 3 callersMethoddpm_solver_first_update
DPM-Solver-1 (equivalent to DDIM) from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
solver/dpm_solver.py:555
↓ 3 callersFunctionexpand_dims
Expand the tensor `v` to the dim `dims`. Args: `v`: a PyTorch tensor with shape [N]. `dim`: a `int`. Returns: a
solver/dpm_solver.py:1303
↓ 3 callersFunctionlog
(t, eps=1e-15)
diffusion/diffusion_ddpm_pan.py:114
↓ 3 callersFunctionmake_beta_schedule
( schedule, n_timestep, linear_start=1e-4, linear_end=2e-2, cosine_s=8e-3 )
diffusion/diffusion_ddpm_pan.py:26
↓ 3 callersFunctionmodel_load
model load parameters Args: path (str): checkpoint path model (nn.Module): model instance strict (bool, optional): strict
utils/misc.py:89
↓ 3 callersMethodp_mean_variance
( self, x, t, clip_denoised: bool, condition_x=None, self_cond
diffusion/diffusion_ddpm_pan.py:346
↓ 3 callersMethodp_sample
( self, x, t, clip_denoised=True, repeat_noise=False, conditio
diffusion/diffusion_ddpm_pan.py:418
↓ 3 callersMethodpredict_start_from_v
(self, x_t, t, v)
diffusion/diffusion_ddpm_pan.py:310
↓ 3 callersMethodprint_str
(self, acc_d=None)
utils/metric.py:95
↓ 3 callersMethodsample
Compute the sample at time `t_end` by DPM-Solver, given the initial `x` at time `t_start`. =========================================
solver/dpm_solver.py:1055
↓ 3 callersMethodsinglestep_dpm_solver_second_update
Singlestep solver DPM-Solver-2 from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
solver/dpm_solver.py:602
↓ 3 callersMethodstep
(self, *args, **kwargs)
utils/lr_scheduler.py:117
↓ 2 callersMethod_average_acc
(d_ave, n)
utils/metric.py:63
↓ 2 callersMethod_forward_imple
( self, x, time=None, cond: Union[list[torch.Tensor, list], torch.Tensor] = No
models/unet_model_google.py:325
↓ 2 callersMethod_get_high_pass
(data, k_size)
dataset/pan_dataset.py:179
↓ 2 callersMethod_set_upsample_saved_fm
(self, saved=True)
models/unet_model_google.py:389
↓ 2 callersFunction_ssim
(img1, img2, window, window_size, channel, size_average=True)
utils/loss_utils.py:30
↓ 2 callersMethod_sum_acc
(d_ave, d_now, n, n2=1)
utils/metric.py:54
↓ 2 callersFunction_warmup_beta
(linear_start, linear_end, n_timestep, warmup_frac)
diffusion/diffusion_ddpm_pan.py:17
↓ 2 callersFunctionapprox_standard_normal_cdf
(x)
diffusion/diffusion_ddpm_pan.py:108
↓ 2 callersMethodattn_op
(self, q, k, v)
models/sr3_dwt.py:472
↓ 2 callersMethodattn_op
(self, q, k, v)
models/sr3.py:461
↓ 2 callersMethoddata_prediction_fn
Return the data prediction model (with corrector).
solver/dpm_solver.py:441
↓ 2 callersMethodddim_sample
( self, x, t, repeat_noise=False, clip_denoised=False, conditi
diffusion/diffusion_ddpm_pan.py:595
↓ 2 callersFunctiondefault
(val, d)
models/unet_model_google.py:15
↓ 2 callersFunctionexists
(x)
diffusion/diffusion_ddpm_pan.py:63
↓ 2 callersMethodget_divided
(self, d, full_resolution=False)
dataset/pan_dataset.py:163
↓ 2 callersFunctionget_lr_from_optimizer
(optimizer)
utils/lr_scheduler.py:109
↓ 2 callersFunctionget_model_input_time
Convert the continuous-time `t_continuous` (in [epsilon, T]) to the model input time. For discrete-time DPMs, we convert `t_continuou
solver/dpm_solver.py:279
↓ 2 callersFunctioninterpolate_fn
A piecewise linear function y = f(x), using xp and yp as keypoints. We implement f(x) in a differentiable way (i.e. applicable for autograd).
solver/dpm_solver.py:1261
↓ 2 callersFunctionlist_tensor2_list_list
a list of tensor like [ta, tb, tc, td, tf, te] -> [[ta, tb, tc], [td, tf, te]] when n is 3 and mode is 'time'; [[ta, td], [tb, td], [tc, te]]
utils/misc.py:136
↓ 2 callersFunctionmeanflat
(x)
diffusion/diffusion_ddpm_pan.py:104
↓ 2 callersFunctionmodel_wrapper
Create a wrapper function for the noise prediction model. DPM-Solver needs to solve the continuous-time diffusion ODEs. For DPMs trained on discr
solver/dpm_solver.py:178
↓ 2 callersMethodmultistep_dpm_solver_update
Multistep DPM-Solver with the order `order` from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The init
solver/dpm_solver.py:940
↓ 2 callersFunctionnoise_like
(shape, device, repeat=False)
diffusion/diffusion_ddpm_pan.py:79
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
solver/dpm_solver.py:435
↓ 2 callersMethodp_losses
(self, x_start, noise=None, cond=None)
diffusion/diffusion_ddpm_pan.py:692
↓ 2 callersMethodp_sample_loop
(self, x_in, continous=False, get_interm_fm=False)
diffusion/diffusion_ddpm_pan.py:445
↓ 2 callersFunctionpath_legal_checker
(path, is_file=True)
utils/misc.py:193
↓ 2 callersMethodq_posterior
(self, x_start, x_t, t)
diffusion/diffusion_ddpm_pan.py:316
↓ 2 callersMethodq_sample
(self, x_start, t, noise=None)
diffusion/diffusion_ddpm_pan.py:668
↓ 2 callersMethodsinglestep_dpm_solver_third_update
Singlestep solver DPM-Solver-3 from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
solver/dpm_solver.py:683
↓ 2 callersFunctionto_numpy
(*args)
utils/misc.py:55
↓ 1 callersFunctionRandomEraseChannel
(n_channel=8)
dataset/pan_dataset.py:18
↓ 1 callersFunction_regardless_keys_unmatch_shape_unmatch
(model, state_dict)
utils/misc.py:125
↓ 1 callersMethod_split_parts
(self, file, normalize=False, load_all=True)
dataset/hisr.py:102
↓ 1 callersFunctionanalysis_accu
(img_base, img_out, ratio, flag_cut_bounds=True, dim_cut=1, choices=4)
utils/_metric_legacy.py:299
↓ 1 callersMethodaug_trans
(self, *data)
dataset/pan_dataset.py:191
↓ 1 callersMethodaug_trans
(self, *data)
dataset/hisr.py:129
↓ 1 callersFunctionbase2fourier_features
(inputs, freq_start=7, freq_stop=8, step=1)
models/sr3_dwt.py:14
↓ 1 callersFunctionbase2fourier_features
(inputs, freq_start=7, freq_stop=8, step=1)
models/sr3.py:14
↓ 1 callersFunctioncond_grad_fn
Compute the gradient of the classifier, i.e. nabla_{x} log p_t(cond | x_t).
solver/dpm_solver.py:308
↓ 1 callersFunctioncreate_window
(window_size, sigma, channel)
utils/_metric_legacy.py:416
↓ 1 callersMethodddim_sample_loop
(self, x_in, section_counts="ddim300", eta=0.0)
diffusion/diffusion_ddpm_pan.py:624
↓ 1 callersMethoddenoise_to_zero_fn
Denoise at the final step, which is equivalent to solve the ODE from lambda_s to infty by first-order discretization.
solver/dpm_solver.py:549
↓ 1 callersFunctiondict_to_str
(d)
utils/misc.py:45
↓ 1 callersFunctiondiscretized_gaussian_log_likelihood
(x, *, means, log_scales, thres=0.999)
diffusion/diffusion_ddpm_pan.py:118
↓ 1 callersMethoddpm_solver_adaptive
The adaptive step size solver based on singlestep DPM-Solver. Args: x: A pytorch tensor. The initial value at time `t_T`
solver/dpm_solver.py:964
↓ 1 callersMethoddynamic_thresholding_fn
The dynamic thresholding method.
diffusion/diffusion_ddpm_pan.py:328
↓ 1 callersFunctionelementwise_charbonnier_loss
Apply element-wise weight and reduce loss between a pair of input and target.
utils/loss_utils.py:161
↓ 1 callersFunctionengine_google
train and valid function Args: train_dataset_path (str): _description_ valid_dataset_path (str): _description_ batch_size
diffusion_engine.py:52
↓ 1 callersFunctionexpand_dims
Expand the tensor `v` to the dim `dims`. Args: `v`: a PyTorch tensor with shape [N]. `dim`: a `int`. Returns: a P
diffusion/diffusion_ddpm_pan.py:781
↓ 1 callersFunctionfunc
( k, v)
utils/misc.py:47
↓ 1 callersFunctiongaussian
(window_size, sigma)
utils/loss_utils.py:11
↓ 1 callersFunctiongaussian
(window_size, sigma)
utils/_metric_legacy.py:411
↓ 1 callersFunctiongenerate_id
(length: int = 8)
utils/logger.py:17
↓ 1 callersMethodget_lr
(self)
utils/lr_scheduler.py:15
↓ 1 callersMethodget_lr
(self)
utils/lr_scheduler.py:58
↓ 1 callersMethodget_orders_and_timesteps_for_singlestep_solver
Get the order of each step for sampling by the singlestep DPM-Solver. We combine both DPM-Solver-1,2,3 to use all the function evalu
solver/dpm_solver.py:490
↓ 1 callersFunctiongrad_clip
do a gradient clipping Args: params (tensor): model params mode (str, optional): 'value' or 'norm'. Defaults to 'value'.
utils/misc.py:25
↓ 1 callersMethodgroup_high_pass
(self, k_size)
dataset/pan_dataset.py:187
↓ 1 callersFunctionhook_model
(model: nn.Module, hook, hook_module: nn.Module, saved_list)
utils/model_hook.py:15
next →1–100 of 295, ranked by callers