MCPcopy Create free account

hub / github.com/csguoh/AdaptIR / functions

Functions266 in github.com/csguoh/AdaptIR

↓ 17 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
net/edt.py:160
↓ 8 callersMethod__init__
(self, args)
net/ipt.py:49
↓ 8 callersMethodupdate
Update statistics
utils/val_utils.py:20
↓ 7 callersMethodflops
(self)
net/edt.py:593
↓ 6 callersFunctionrandom_augmentation
(*args)
utils/image_utils.py:166
↓ 5 callersMethod__init__
(self, optimizer, total_iter, last_epoch=-1)
utils/schedulers.py:63
↓ 5 callersMethod_crop_patch
(self, img_1, img_2, s_hr=1)
utils/dataset_utils.py:187
↓ 5 callersFunctioncrop_image
Make dimensions divisible by d :param pil img: :param d: :return:
utils/image_io.py:40
↓ 5 callersFunctioncrop_img
(image, base=64)
utils/image_utils.py:59
↓ 5 callersMethodforward_train
(self, x,de_id=None)
net/ipt.py:98
↓ 5 callersFunctionget_image
Load an image and resize to a cpecific size. Args: path: path to image imsize: tuple or scalar with dimensions; -1 for `no resize
utils/image_io.py:251
↓ 5 callersFunctionpil_to_np
Converts image in PIL format to np.array. From W x H x C [0...255] to C x W x H [0..1]
utils/image_io.py:324
↓ 5 callersFunctiontest_SR
(net,dataset,scale)
test.py:101
↓ 4 callersMethod_add_gaussian_noise
(self, clean_patch, sigma)
utils/degradation_utils.py:21
↓ 4 callersMethodcalculate_mask
(self, x_size, index)
net/edt.py:374
↓ 4 callersFunctioncompute_psnr_ssim
(recoverd, clean,to_y=False,bd=0)
utils/val_utils.py:50
↓ 3 callersMethod__init__
(self, args)
utils/dataset_utils.py:33
↓ 3 callersMethod__init__
( self, conv, n_feats, kernel_size, bias=True, bn=False, act=nn.ReLU(True), res_scale=1)
net/common.py:41
↓ 3 callersMethod_degrade_by_type
(self, clean_patch, degrade_type)
utils/degradation_utils.py:28
↓ 3 callersFunctiontest_Derain_LowLight
(net, dataset, task="derain")
test.py:80
↓ 3 callersFunctionwindow_partition
Args: x: (B, H, W, C) window_size (int): window size index: H or W Returns: windows: (num_windows*B, window_
net/edt.py:182
↓ 3 callersMethodwith_pos_embed
(self, tensor, pos)
net/ipt.py:466
↓ 2 callersMethod_add_gaussian_noise
(self, clean_patch)
utils/dataset_utils.py:327
↓ 2 callersFunction_get_activation_fn
Return an activation function given a string
net/ipt.py:497
↓ 2 callersFunction_get_clones
(module, N)
net/ipt.py:493
↓ 2 callersMethod_get_hybrid_name
(self, hr_name)
utils/dataset_utils.py:209
↓ 2 callersMethod_init_rs_ids
(self,mode)
utils/dataset_utils.py:162
↓ 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
utils/dataset_utils.py:14
↓ 2 callersFunctionbgr2ycbcr
bgr version of rgb2ycbcr only_y: only return Y channel Input: uint8, [0, 255] float, [0, 1]
utils/common.py:176
↓ 2 callersMethodcut_h
(self, x_h_cut, h, w, h_cut, w_cut, padsize, shave, scale, batchsize)
net/ipt.py:184
↓ 2 callersMethodcut_w
(self, x_w_cut, h, w, h_cut, w_cut, padsize, shave, scale, batchsize)
net/ipt.py:217
↓ 2 callersFunctionflipx4_forward
Flip testing with X4 self ensemble, i.e., normal, flip H, flip W, flip H and W Args: model (PyTorch model) inp (Tensor): inputs de
utils/common.py:220
↓ 2 callersMethodforward_train
(self, x_inp)
net/edt.py:983
↓ 2 callersFunctionget_position_from_periods
Get the position from a period list. It will return the index of the right-closest number in the period list. For example, the cumulative_per
utils/schedulers.py:119
↓ 2 callersFunctionnp_to_pil
Converts image in np.array format to PIL image. From C x W x H [0..1] to W x H x C [0...255] :param img_np: :return:
utils/image_io.py:375
↓ 2 callersFunctionprepare_image
loads makes it divisible :param file_name: :return: the numpy representation of the image
utils/image_io.py:293
↓ 2 callersFunctionrgb2ycbcr
same as matlab rgb2ycbcr only_y: only return Y channel Input: uint8, [0, 255] float, [0, 1]
utils/val_utils.py:160
↓ 2 callersFunctionsave_image
(name, image_np, output_path="output/normal/")
utils/image_utils.py:268
↓ 2 callersMethodset_dataset
(self, task)
utils/dataset_utils.py:416
↓ 2 callersMethodset_scale
(self, task_idx)
net/ipt.py:112
↓ 2 callersFunctiontest_Denoise
(net, dataset, sigma=15)
test.py:61
↓ 2 callersFunctiontorch_to_np
Converts an image in torch.Tensor format to np.array. From 1 x C x W x H [0..1] to C x W x H [0..1] :param img_var: :return:
utils/image_io.py:406
↓ 1 callersMethod_get_gt_name
(self, rainy_name)
utils/dataset_utils.py:199
↓ 1 callersMethod_get_gt_path
(self, degraded_name)
utils/dataset_utils.py:408
↓ 1 callersMethod_get_lr_name
(self, hr_name)
utils/dataset_utils.py:203
↓ 1 callersMethod_get_max_bar_width
(self)
utils/common.py:273
↓ 1 callersMethod_get_normal_light_name
(self, low_light_name)
utils/dataset_utils.py:216
↓ 1 callersMethod_init_clean_ids
(self)
utils/dataset_utils.py:321
↓ 1 callersMethod_init_dn_ids
(self)
utils/dataset_utils.py:130
↓ 1 callersMethod_init_ids
(self)
utils/dataset_utils.py:50
↓ 1 callersMethod_init_input_ids
(self)
utils/dataset_utils.py:390
↓ 1 callersMethod_init_low_light_ids
(self)
utils/dataset_utils.py:115
↓ 1 callersMethod_init_lr_dn_idx
(self)
utils/dataset_utils.py:66
↓ 1 callersMethod_init_lr_jpeg_idx
(self)
utils/dataset_utils.py:79
↓ 1 callersMethod_init_sr_ids
(self)
utils/dataset_utils.py:447
↓ 1 callersMethod_init_sr_idx
(self)
utils/dataset_utils.py:95
↓ 1 callersMethod_merge_ids
(self)
utils/dataset_utils.py:222
↓ 1 callersFunction_scandir
(dir_path, suffix, recursive)
utils/common.py:331
↓ 1 callersFunctioncalculate_psnr
(img1, img2)
utils/common.py:97
↓ 1 callersFunctioncalculate_psnr
(img1, img2)
utils/val_utils.py:105
↓ 1 callersFunctioncalculate_ssim
(img1, img2)
utils/common.py:108
↓ 1 callersFunctioncalculate_ssim
(img1, img2)
utils/val_utils.py:116
↓ 1 callersFunctioncontributions
(in_length, out_length, scale, kernel, kernel_width, antialiasing)
utils/imresize.py:77
↓ 1 callersFunctioncrop_a_image
(img, d=10)
utils/image_io.py:29
↓ 1 callersFunctioncrop_torch_image
Make dimensions divisible by d image is [1, 3, W, H] or [3, W, H] :param pil img: :param d: :return:
utils/image_io.py:67
↓ 1 callersFunctiondata_augmentation
(image, mode)
utils/image_utils.py:133
↓ 1 callersFunctionfix_scale_and_size
(input_shape, output_shape, scale_factor)
utils/imresize.py:48
↓ 1 callersMethodforward_chop
(self, x)
net/ipt.py:115
↓ 1 callersMethodforward_chop
(self,x)
net/edt.py:1073
↓ 1 callersMethodforward_features
(self, x)
net/edt.py:854
↓ 1 callersFunctionget_image_grid
Creates a grid from a list of images by concatenating them. :param images_np: :param nrow: :return:
utils/image_io.py:114
↓ 1 callersMethodget_target_tensor
(self, input, target_is_real)
utils/loss_utils.py:20
↓ 1 callersFunctionget_timestamp
()
utils/common.py:21
↓ 1 callersMethodget_v
(self, x)
net/edt.py:289
↓ 1 callersFunctionimresize
(im, scale_factor=None, output_shape=None, kernel=None, antialiasing=True, kernel_shift_flag=False)
utils/imresize.py:6
↓ 1 callersFunctionkernel_shift
(kernel, sf)
utils/imresize.py:172
↓ 1 callersFunctionload
Load PIL image.
utils/image_io.py:245
↓ 1 callersFunctionmain
()
train.py:77
↓ 1 callersFunctionnp_to_pil
Converts image in np.array format to PIL image. From C x W x H [0..1] to W x H x C [0...255] :param img_np: :return:
utils/image_utils.py:276
↓ 1 callersFunctionnp_to_torch
Converts image in numpy.array to torch.Tensor. From C x W x H [0..1] to C x W x H [0..1] :param img_np: :return:
utils/image_io.py:394
↓ 1 callersFunctionnumeric_kernel
(im, kernel, scale_factor, output_shape, kernel_shift_flag)
utils/imresize.py:157
↓ 1 callersFunctionprepare_gray_image
(file_name)
utils/image_io.py:319
↓ 1 callersMethodreset
Reset all statistics
utils/val_utils.py:13
↓ 1 callersFunctionresize_along_dim
(im, dim, weights, field_of_view)
utils/imresize.py:137
↓ 1 callersMethodset_sigma
(self, sigma)
utils/dataset_utils.py:332
↓ 1 callersMethodsingle_degrade
(self,clean_patch,degrade_type = None)
utils/degradation_utils.py:54
↓ 1 callersMethodstart
(self)
utils/common.py:282
↓ 1 callersMethodtic
(self)
utils/val_utils.py:83
↓ 1 callersMethodtoc
(self)
utils/val_utils.py:86
↓ 1 callersFunctionwindow_reverse
Args: windows: (num_windows*B, window_size, window_size, C) window_size (int): Window size H (int): Height of image
net/edt.py:210
↓ 1 callersMethodwith_pos_embed
(self, tensor, pos)
net/ipt.py:415
Method__call__
(self, input, target_is_real)
utils/loss_utils.py:42
Method__getitem__
(self, idx)
utils/dataset_utils.py:249
Method__getitem__
(self, clean_id)
utils/dataset_utils.py:335
Method__getitem__
(self, idx)
utils/dataset_utils.py:419
Method__getitem__
(self, clean_id)
utils/dataset_utils.py:454
Method__init__
(self,args)
train.py:20
Method__init__
(self,args)
test.py:25
Method__init__
(self, args)
utils/degradation_utils.py:12
Method__init__
(self, use_lsgan=True, target_real_label=1.0, target_fake_label=0.0, tensor=torch.FloatTe
utils/loss_utils.py:7
next →1–100 of 266, ranked by callers