↓ 4 callersFunctionreorder_imageReorder images to 'HWC' order.
If the input_order is (h, w), return (h, w, 1);
If the input_order is (c, h, w), return (h, w, c);
If
basicsr/metrics/metric_util.py:6
↓ 2 callersFunctionfilter2DPyTorch version of cv2.filter2D
Args:
img (Tensor): (b, c, h, w)
kernel (Tensor): (b, k, k)
basicsr/utils/img_process_util.py:7
↓ 2 callersMethodforward
Args:
pred (Tensor): of shape (N, C, H, W). Predicted tensor.
target (Tensor): of shape (N, C, H, W). Ground truth
basicsr/losses/basic_loss.py:45
↓ 2 callersFunctiongenerate_gaussian_noiseGenerate Gaussian noise.
Args:
img (Numpy array): Input image, shape (h, w, c), range [0, 1], float32.
sigma (float): Noise s
basicsr/data/degradations.py:419
↓ 2 callersFunctiongenerate_gaussian_noise_ptAdd Gaussian noise (PyTorch version).
Args:
img (Tensor): Shape (b, c, h, w), range[0, 1], float32.
scale (float | Tensor): N
basicsr/data/degradations.py:460
↓ 2 callersFunctiongenerate_poisson_noise_ptGenerate a batch of poisson noise (PyTorch version)
Args:
img (Tensor): Input image, shape (b, c, h, w), range [0, 1], float32.
basicsr/data/degradations.py:609
↓ 2 callersFunctionwindow_partition Args: x: (b, h, w, c) window_size (int): window size Returns: windows: (num_windows*b, window_size, window_size, c)
basicsr/archs/pft_arch.py:172
↓ 1 callersMethod__init__(self, optimizer, milestones, gamma=0.1, restarts=(0, ), restart_weights=(1, ), last_epoch=-1)
basicsr/models/lr_scheduler.py:19
↓ 1 callersFunctionadd_jpg_compressionAdd JPG compression artifacts.
Args:
img (Numpy array): Input image, shape (h, w, c), range [0, 1], float32.
quality (float):
basicsr/data/degradations.py:731