sldl.video

Module contents

class VideoSR(model_name='BSRGAN', precision='full')[source]

Bases: Module

Video Super-Resolution

Takes an image and increases its resoulution by some factor. Currently supports SwinIR, BSRGAN, and VRT models.

Parameters:
  • model_name (str) – Name of the pre-trained model. Can be one of the SwinIR-M, SwinIR-L, BSRGAN, BSRGANx2, RealESRGAN, and vrt. Default: BSRGAN.

  • precision (str) – Can be either full (uses fp32) and half (uses fp16). Default: full.

Example:

from sldl.video import VideoSR

sr = VideoSR('BSRGAN').cuda()
sr('your_video.mp4', 'upscaled_video.mp4')
property device
training: bool
class VideoDenoising(model_name='SwinIR', noise=15, precision: str = 'full')[source]

Bases: Module

Video Denoising

Takes a noisy video and removes the noise from it. Currently supports only SwinIR that is applied to a video frame-by-frame.

Parameters:
  • model_name (str) – Name of the pre-trained model. Now it can only be SwinIR.

  • noise (int) – Noise level that the model was trained on. Can be of of 15, 25, 50.

  • precision (str.) – Can be either full (uses fp32) and half (uses fp16). Default: full.

Example:

from sldl.video import VideoDenoising

denoiser = VideoDenoising('BSRGAN').cuda()
sr('your_video.mp4', 'denoised_video.mp4')
training: bool
class VideoInterpolation(model_name: str = 'IFRNet-Vimeo')[source]

Bases: Module

Video Interpolation

Takes an image and increases the FPS. Currently supports only IFRNet trained on Vimeo90K an GoPro datasets and only x2 FPS increasing.

Parameters:

model_name (str) – Name of the pre-trained model. Can be one of the IFRNet-Vimeo and IFRNet-GoPro. Default: IFRNet-Vimeo.

Example:

from sldl.video import VideoInterpolation

interpolator = VideoInterpolation('IFRNet-Vimeo').cuda()
interpolator('your_video.mp4', 'interpolated_video.mp4')
property device
training: bool