Shortcuts

mmedit.models.editors.duf

Package Contents

Classes

DynamicUpsamplingFilter

Dynamic upsampling filter used in DUF.

class mmedit.models.editors.duf.DynamicUpsamplingFilter(filter_size=(5, 5))[source]

Bases: mmengine.model.BaseModule

Dynamic upsampling filter used in DUF.

Ref: https://github.com/yhjo09/VSR-DUF. It only supports input with 3 channels. And it applies the same filters to 3 channels.

Parameters

filter_size (tuple) – Filter size of generated filters. The shape is (kh, kw). Default: (5, 5).

forward(x, filters)[source]

Forward function for DynamicUpsamplingFilter.

Parameters
  • x (Tensor) – Input image with 3 channels. The shape is (n, 3, h, w).

  • filters (Tensor) –

    Generated dynamic filters. The shape is (n, filter_prod, upsampling_square, h, w). filter_prod: prod of filter kernel size, e.g., 1*5*5=25. upsampling_square: similar to pixel shuffle,

    upsampling_square = upsampling * upsampling e.g., for x 4 upsampling, upsampling_square= 4*4 = 16

Returns

Filtered image with shape (n, 3*upsampling, h, w)

Return type

Tensor

Read the Docs v: latest
Versions
master
latest
stable
zyh-re-docs
zyh-doc-notfound-extend
zyh-api-rendering
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.