Skip to content
AkarinVS edited this page Dec 3, 2021 · 29 revisions

DPIR, or Plug-and-Play Image Restoration with Deep Denoiser Prior, is a denoise and deblocking neural network. See also https://github.com/HolyWu/vs-dpir.

DPIR requires a strength parameter.

Link: https://github.com/AmusementClub/vs-mlrt/releases/download/model-20211203/dpir_v2.7z Includes these models:

  • Denoise models, default sigma is 5.0
    • drunet_gray: GRAY denoise
    • drunet_color: RGB denoise
  • Deblocking models, default sigma is 50.0
    • drunet_deblocking_grayscale: GRAY deblocking
    • drunet_deblocking_color: RGB deblocking

Requirements & Parameters

  1. block_w and block_h (tile size) must be multiples of 8.
  2. All DPIR models require a strength parameter, or sigma, and you need to pass that in the form of a GRAYS clip (with normalization factor 1.0/255), see examples below for details.

Usage

src = core.std.BlankClip(width=640, height=360, format=vs.GRAYS)
sigma = 2.0
flt = core.ov.Model([src, core.std.BlankClip(src, color=sigma/255.0)], "drunet_gray.onnx")

Notes

DPIR is a huge network and it is extremely slow when running on CPU (e.g. for 360p input, you might see 0.05fps/cpu).