sldl.image¶
Module contents¶
- class ImageSR(model_name: str = 'SwinIR-M', precision: str = 'full')[source]¶
Bases:
ModuleImage Super-Resolution
Takes an image and increases its resoulution by some factor. Currently supports SwinIR, BSRGAN and RealESRGAN models.
- Parameters:
Example:
from PIL import Image from sldl.image import ImageSR sr = ImageSR('BSRGAN') img = Image.open('test.png') upscaled = sr(img)
- class ImageDenoising(model_name: str = 'SwinIR', noise: int = 15, precision: str = 'full')[source]¶
Bases:
ModuleImage Denoising
Takes an image and removes the noise from it. Currently supports SwinIR only.
- Parameters:
Example:
from PIL import Image from sldl.image import ImageDenoising denoiser = ImageDenoising('SwinIR') img = Image.open('test.png') denoised = denoiser(img)
- __call__(img: Image) Image[source]¶
Applies the denoiser.
- Parameters:
img (PIL.Image.Image) – An input image.
- Returns:
Denoised image.
- Return type: