Skip to content

Latest commit

 

History

History
134 lines (78 loc) · 2.32 KB

File metadata and controls

134 lines (78 loc) · 2.32 KB

Data Augmentation

Waifu2x Index / Waifu2x / Data Augmentation

Auto-generated documentation for waifu2x.data_augmentation module.

color_noise

Show source in data_augmentation.py:48

Apply color noise to the input image array.

Arguments


  • src np.ndarray - Input image array.
  • p float - Probability of applying the noise.
  • factor float - Noise factor.

Returns


  • np.ndarray - Processed image array.

Signature

def color_noise(src: np.ndarray, p: float, factor: float = 0.1) -> np.ndarray: ...

flip

Show source in data_augmentation.py:73

Flip the input image array.

Arguments


  • src np.ndarray - Input image array.

Returns


  • np.ndarray - Processed image array.

Signature

def flip(src: np.ndarray) -> np.ndarray: ...

half

Show source in data_augmentation.py:97

Scale down the input image array by half.

Arguments


  • src np.ndarray - Input image array.
  • p np.ndarray - Probability array.

Returns


  • np.ndarray - Processed image array.

Signature

def half(src: np.ndarray, p: np.ndarray) -> np.ndarray: ...

shift_1px

Show source in data_augmentation.py:117

Shift the input image array by 1 pixel.

Arguments


  • src (np.ndarray): Input image array.

Returns


  • - np.ndarray - Shifted image array.

Signature

def shift_1px(src: np.ndarray) -> np.ndarray: ...

unsharp_mask

Show source in data_augmentation.py:26

Apply unsharp mask filter to the input image array.

Arguments


  • src np.ndarray - Input image array.
  • p float - Probability of applying the filter.

Returns


  • np.ndarray - Processed image array.

Signature

def unsharp_mask(src: np.ndarray, p: float) -> np.ndarray: ...