Waifu2x Index / Waifu2x / Data Augmentation
Auto-generated documentation for waifu2x.data_augmentation module.
Show source in data_augmentation.py:48
Apply color noise to the input image array.
srcnp.ndarray - Input image array.pfloat - Probability of applying the noise.factorfloat - Noise factor.
np.ndarray- Processed image array.
def color_noise(src: np.ndarray, p: float, factor: float = 0.1) -> np.ndarray: ...Show source in data_augmentation.py:73
Flip the input image array.
srcnp.ndarray - Input image array.
np.ndarray- Processed image array.
def flip(src: np.ndarray) -> np.ndarray: ...Show source in data_augmentation.py:97
Scale down the input image array by half.
srcnp.ndarray - Input image array.pnp.ndarray - Probability array.
np.ndarray- Processed image array.
def half(src: np.ndarray, p: np.ndarray) -> np.ndarray: ...Show source in data_augmentation.py:117
Shift the input image array by 1 pixel.
- src (np.ndarray): Input image array.
-np.ndarray - Shifted image array.
def shift_1px(src: np.ndarray) -> np.ndarray: ...Show source in data_augmentation.py:26
Apply unsharp mask filter to the input image array.
srcnp.ndarray - Input image array.pfloat - Probability of applying the filter.
np.ndarray- Processed image array.
def unsharp_mask(src: np.ndarray, p: float) -> np.ndarray: ...