MCPcopy Create free account

hub / github.com/Lornatang/SRGAN-PyTorch / functions

Functions128 in github.com/Lornatang/SRGAN-PyTorch

↓ 15 callersMethodupdate
(self, val, n=1)
utils.py:215
↓ 6 callersMethodnext
(self)
dataset.py:201
↓ 6 callersFunctionrgb_to_ycbcr_torch
Implementation of rgb2ycbcr function in Matlab under PyTorch References from:`https://en.wikipedia.org/wiki/YCbCr#ITU-R_BT.601_conversion` A
imgproc.py:410
↓ 5 callersMethod__init__
( self, in_channels: int = 3, out_channels: int = 3, channels:
model.py:107
↓ 5 callersFunctionimage_to_tensor
Convert the image data type to the Tensor (NCWH) data type supported by PyTorch Args: image (np.ndarray): The image data read by ``OpenCV
imgproc.py:131
↓ 5 callersFunctionload_pretrained_state_dict
Load pre-trained model weights Args: model (nn.Module): model compile_state (bool): model compilation state, `False` means not co
utils.py:100
↓ 5 callersFunctionmake_directory
(dir_path: str)
utils.py:171
↓ 4 callersMethod__init__
(self, dataloader: DataLoader)
dataset.py:197
↓ 4 callersMethodreset
(self)
utils.py:209
↓ 3 callersFunction_check_tensor_shape
Check if the dimensions of the two tensors are the same Args: raw_tensor (np.ndarray or Tensor): tensor flow of images to be compared, RG
image_quality_assessment.py:52
↓ 3 callersFunction_padding_torch
( tensor: Tensor, dim: int, pad_pre: int, pad_post: int, padding_type:
image_quality_assessment.py:188
↓ 3 callersFunctionbuild_iqa_model
( crop_border: int, only_test_y_channel: bool, device: torch.device, )
utils.py:36
↓ 3 callersMethoddisplay
(self, batch)
utils.py:258
↓ 3 callersFunctionload_resume_state_dict
Restore training model weights Args: model (nn.Module): model ema_model (nn.Module): EMA model optimizer (nn.optim): opti
utils.py:122
↓ 3 callersFunctionload_state_dict
Load model weights and parameters Args: model (nn.Module): model compile_mode (bool): Enable model compilation mode, `False` mean
utils.py:50
↓ 3 callersMethodpreload
(self)
dataset.py:231
↓ 3 callersFunctionsave_checkpoint
( state_dict: dict, file_name: str, samples_dir: str, results_dir: str,
utils.py:176
↓ 3 callersFunctiontest
( g_model: nn.Module, test_data_prefetcher: CUDAPrefetcher, psnr_model: nn.Module,
test.py:60
↓ 2 callersMethod__init__
Args: crop_border (int, optional): how many pixels to crop border. Default: 0 only_test_y_channel (bool, optional):
image_quality_assessment.py:690
↓ 2 callersFunction_calculate_weights_indices
Implementation of `calculate_weights_indices` function in Matlab under Python language. Args: in_length (int): Input length. out_
imgproc.py:54
↓ 2 callersFunction_cubic
Implementation of `cubic` function in Matlab under Python language. Args: x: Element vector. Returns: Bicubic interpolation
imgproc.py:36
↓ 2 callersFunction_mse_torch
PyTorch implements the MSE (Mean Squared Error, mean square error) function Args: raw_tensor (Tensor): tensor flow of images to be compar
image_quality_assessment.py:520
↓ 2 callersFunction_reshape_tensor_torch
Reshape the tensor to the shape of (B, C, K, H, W) or (B, C, H, K, W) for 1D convolution. Args: tensor (Tensor): Tensor to be reshaped.
image_quality_assessment.py:274
↓ 2 callersFunction_resize_1d_torch
Resize the given tensor to the given size. Args: tensor (Tensor): Tensor to be resized. dim (int): Dimension to be resized.
image_quality_assessment.py:303
↓ 2 callersFunctionrandom_crop_torch
Randomly intercept two images in the specified area Args: gt_images (ndarray | Tensor | list[ndarray] | list[Tensor]): ground truth image
imgproc.py:655
↓ 2 callersFunctionrandom_horizontally_flip_torch
Randomly flip the image up and down Args: gt_images (ndarray): ground truth images read by the PyTorch library lr_images (ndarray
imgproc.py:807
↓ 2 callersFunctionrandom_rotate_torch
Randomly rotate the image Args: gt_images (ndarray | Tensor | list[ndarray] | list[Tensor]): ground truth images read by the PyTorch libr
imgproc.py:732
↓ 2 callersFunctionrandom_vertically_flip_torch
Randomly flip the image left and right Args: gt_images (ndarray): ground truth images read by the PyTorch library lr_images (ndar
imgproc.py:852
↓ 2 callersFunctiontensor_to_image
Convert the Tensor(NCWH) data type supported by PyTorch to the np.ndarray(WHC) image data type Args: tensor (Tensor): Data types supporte
imgproc.py:161
↓ 1 callersMethod__iter__
(self)
dataset.py:170
↓ 1 callersFunction_cast_input_torch
Casts the input tensor to the correct data type and stores the original data type. Args: tensor (Tensor): Input tensor. Returns:
image_quality_assessment.py:413
↓ 1 callersFunction_cast_output_torch
(tensor: Tensor, dtype: _D)
image_quality_assessment.py:432
↓ 1 callersFunction_cubic_contribution_torch
(tensor: Tensor, a: float = -0.5)
image_quality_assessment.py:129
↓ 1 callersFunction_downsampling_2d_torch
( tensor: Tensor, k: Tensor, scale: int, padding_type: str = "reflect", )
image_quality_assessment.py:388
↓ 1 callersMethod_forward_impl
(self, x: Tensor)
model.py:97
↓ 1 callersMethod_forward_impl
(self, x: Tensor)
model.py:159
↓ 1 callersFunction_fspecial_gaussian_torch
PyTorch implements the fspecial_gaussian() function in MATLAB Args: window_size (int): Gaussian filter size sigma (float): sigma
image_quality_assessment.py:65
↓ 1 callersFunction_gaussian_contribution_torch
(x: Tensor, sigma: float = 2.0)
image_quality_assessment.py:147
↓ 1 callersMethod_get_batch_fmtstr
(self, num_batches)
utils.py:268
↓ 1 callersFunction_get_padding_torch
Get padding size and padded tensor Args: tensor (Tensor): shape (b, c, h, w) kernel_size (int): kernel size x_size (int):
image_quality_assessment.py:205
↓ 1 callersFunction_get_weight_torch
Get weight for each pixel Args: tensor (Tensor): shape (b, c, h, w) kernel_size (int): kernel size kernel (str): kernel t
image_quality_assessment.py:237
↓ 1 callersFunction_make_layers
(net_cfg_name: str, batch_norm: bool = False)
model.py:37
↓ 1 callersFunction_psnr_torch
PyTorch implements PSNR (Peak Signal-to-Noise Ratio, peak signal-to-noise ratio) function Args: raw_tensor (Tensor): tensor flow of image
image_quality_assessment.py:550
↓ 1 callersFunction_reflect_padding_torch
Reflect padding for 2-dim tensor Args: tensor (Tensor): shape (b, c, h, w) dim (int): 2 or -2 pad_pre (int): padding size
image_quality_assessment.py:155
↓ 1 callersFunction_reshape_input_torch
Reshape the input tensor to 4-dim tensor Args: tensor (Tensor): shape (b, c, h, w) or (c, h, w) or (h, w) Returns: tensor (T
image_quality_assessment.py:103
↓ 1 callersFunction_ssim_torch
PyTorch implements SSIM (Structural Similarity) function Args: raw_tensor (Tensor): tensor flow of images to be compared, RGB format, dat
image_quality_assessment.py:581
↓ 1 callersFunction_to_tuple
Convert the input to a tuple Args: dim (int): the dimension of the input
image_quality_assessment.py:35
↓ 1 callersFunctionbgr_to_ycbcr
Implementation of bgr2ycbcr function in Matlab under Python language. Args: image (np.ndarray): Image input in BGR format only_us
imgproc.py:341
↓ 1 callersFunctionbuild_model
(config: Any, device: torch.device)
test.py:46
↓ 1 callersFunctionbuild_model
( config: Any, device: torch.device, )
train_gan.py:240
↓ 1 callersFunctionbuild_model
( config: Any, device: torch.device, )
train_net.py:198
↓ 1 callersFunctionbuild_model
(model_arch_name: str, device: torch.device)
inference.py:48
↓ 1 callersFunctiondefine_loss
(config: Any, device: torch.device)
train_gan.py:275
↓ 1 callersFunctiondefine_loss
(config: Any, device: torch.device)
train_net.py:226
↓ 1 callersFunctiondefine_optimizer
(g_model: nn.Module, d_model: nn.Module, config: Any)
train_gan.py:306
↓ 1 callersFunctiondefine_optimizer
(g_model: nn.Module, config: Any)
train_net.py:236
↓ 1 callersFunctiondefine_scheduler
(g_optimizer: optim.Adam, d_optimizer: optim.Adam, config: Any)
train_gan.py:325
↓ 1 callersMethoddisplay_summary
(self)
utils.py:263
↓ 1 callersFunctionimage_resize
Implementation of `imresize` function in Matlab under Python language. Args: image: The input image. scale_factor (float): Scale
imgproc.py:203
↓ 1 callersFunctionload_dataset
(config: Any, device: torch.device)
test.py:31
↓ 1 callersFunctionload_dataset
( config: Any, device: torch.device, )
train_gan.py:202
↓ 1 callersFunctionload_dataset
( config: Any, device: torch.device, )
train_net.py:160
↓ 1 callersFunctionmain
()
test.py:150
↓ 1 callersFunctionmain
()
train_gan.py:39
↓ 1 callersFunctionmain
()
train_net.py:38
↓ 1 callersFunctionmain
(args)
inference.py:26
↓ 1 callersFunctionmain
()
scripts/split_images.py:23
↓ 1 callersFunctionmain
(args)
scripts/separate_state_dict.py:21
↓ 1 callersFunctionpreprocess_one_image
(image_path: str, range_norm: bool, half: bool, device: torch.device)
imgproc.py:187
↓ 1 callersFunctionsplit_images
Split the image into multiple small images. Args: args (dict): Custom parameter dictionary.
scripts/split_images.py:45
↓ 1 callersMethodsummary
(self)
utils.py:237
↓ 1 callersFunctiontrain
( g_model: nn.Module, ema_g_model: nn.Module, d_model: nn.Module, train_data_p
train_gan.py:340
↓ 1 callersFunctiontrain
( g_model: nn.Module, ema_g_model: nn.Module, train_data_prefetcher: CUDAPrefetcher,
train_net.py:249
Method__getitem__
( self, batch_index: int )
dataset.py:72
Method__getitem__
(self, batch_index: int)
dataset.py:122
Method__init__
Args: crop_border (int, optional): how many pixels to crop border. Default: 0 only_test_y_channel (bool, optional):
image_quality_assessment.py:723
Method__init__
Args: window_size (int): Gaussian filter size, must be an odd number, default: ``11`` gaussian_sigma (float): sigma
image_quality_assessment.py:755
Method__init__
(self, name, fmt=":f", summary_type=Summary.AVERAGE)
utils.py:203
Method__init__
(self, num_batches, meters, prefix="")
utils.py:253
Method__init__
Args: gt_images_dir (str): Ground-truth image address. lr_images_dir (str, optional): Low resolution image address.
dataset.py:36
Method__init__
Args: paired_gt_images_dir: The address of the ground-truth image after registration paired_lr_images_dir: The addre
dataset.py:99
Method__init__
(self, generator, num_data_prefetch_queue: int)
dataset.py:152
Method__init__
(self, num_data_prefetch_queue: int, **kwargs)
dataset.py:182
Method__init__
(self, dataloader: DataLoader, device: torch.device)
dataset.py:222
Method__init__
( self, net_cfg_name: str = "vgg19", batch_norm: bool = False,
model.py:60
Method__init__
( self, in_channels: int = 3, out_channels: int = 1, channels:
model.py:173
Method__init__
(self, channels: int)
model.py:229
Method__init__
(self, channels: int, upscale_factor: int)
model.py:250
Method__init__
( self, net_cfg_name: str, batch_norm: bool, num_classes: int,
model.py:275
Method__iter__
(self)
dataset.py:186
Method__len__
(self)
dataset.py:92
Method__len__
(self)
dataset.py:140
Method__len__
(self)
dataset.py:210
Method__len__
(self)
dataset.py:253
Method__next__
(self)
dataset.py:164
Method__str__
(self)
utils.py:233
Function_image_resize_torch
Resize image with given kernel and sigma. Args: x (Tensor): Input image with shape (b, c, h, w) scale_factor (float): Scale facto
image_quality_assessment.py:445
Methodall_reduce
(self)
utils.py:221
Functionbgr_to_ycbcr_torch
Implementation of bgr2ycbcr function in Matlab under PyTorch References from:`https://en.wikipedia.org/wiki/YCbCr#ITU-R_BT.601_conversion` A
imgproc.py:438
Functioncenter_crop
Crop small image patches from one image center area. Args: image (np.ndarray): The input image for `OpenCV.imread`. image_size (i
imgproc.py:466
next →1–100 of 128, ranked by callers