Shortcuts

mmedit.models.editors.nafnet

Package Contents

Classes

NAFBaseline

The original version of Baseline model in "Simple Baseline for Image

NAFBaselineLocal

The original version of Baseline model in "Simple Baseline for Image

NAFNet

NAFNet.

NAFNetLocal

The original version of NAFNetLocal in "Simple Baseline for Image

class mmedit.models.editors.nafnet.NAFBaseline(img_channel=3, mid_channels=16, middle_blk_num=1, enc_blk_nums=[1, 1, 1, 28], dec_blk_nums=[1, 1, 1, 1], dw_expand=1, ffn_expand=2)[源代码]

Bases: mmengine.model.BaseModule

The original version of Baseline model in “Simple Baseline for Image Restoration”.

参数
  • img_channels (int) – Channel number of inputs.

  • mid_channels (int) – Channel number of intermediate features.

  • middle_blk_num (int) – Number of middle blocks.

  • enc_blk_nums (List of int) – Number of blocks for each encoder.

  • dec_blk_nums (List of int) – Number of blocks for each decoder.

forward(inp)

Forward function.

参数

inp – input tensor image with (B, C, H, W) shape

check_image_size(x)

Check image size and pad images so that it has enough dimension do downsample.

参数

x – input tensor image with (B, C, H, W) shape.

class mmedit.models.editors.nafnet.NAFBaselineLocal(*args, train_size=(1, 3, 256, 256), fast_imp=False, **kwargs)[源代码]

Bases: mmedit.models.editors.nafnet.naf_avgpool2d.Local_Base, NAFBaseline

The original version of Baseline model in “Simple Baseline for Image Restoration”.

参数
  • img_channels (int) – Channel number of inputs.

  • mid_channels (int) – Channel number of intermediate features.

  • middle_blk_num (int) – Number of middle blocks.

  • enc_blk_nums (List of int) – Number of blocks for each encoder.

  • dec_blk_nums (L`ist of int) – Number of blocks for each decoder.

class mmedit.models.editors.nafnet.NAFNet(img_channel=3, mid_channels=16, middle_blk_num=1, enc_blk_nums=[], dec_blk_nums=[])[源代码]

Bases: mmengine.model.BaseModule

NAFNet.

The original version of NAFNet in “Simple Baseline for Image Restoration”.

参数
  • img_channels (int) – Channel number of inputs.

  • mid_channels (int) – Channel number of intermediate features.

  • middle_blk_num (int) – Number of middle blocks.

  • enc_blk_nums (List of int) – Number of blocks for each encoder.

  • dec_blk_nums (List of int) – Number of blocks for each decoder.

forward(inp)

Forward function.

参数

inp – input tensor image with (B, C, H, W) shape

check_image_size(x)

Check image size and pad images so that it has enough dimension do downsample.

参数

x – input tensor image with (B, C, H, W) shape.

class mmedit.models.editors.nafnet.NAFNetLocal(*args, train_size=(1, 3, 256, 256), fast_imp=False, **kwargs)[源代码]

Bases: mmedit.models.editors.nafnet.naf_avgpool2d.Local_Base, NAFNet

The original version of NAFNetLocal in “Simple Baseline for Image Restoration”.

NAFNetLocal uses local average pooling modules than NAFNet.

参数
  • img_channels (int) – Channel number of inputs.

  • mid_channels (int) – Channel number of intermediate features.

  • middle_blk_num (int) – Number of middle blocks.

  • enc_blk_nums (List of int) – Number of blocks for each encoder.

  • dec_blk_nums (List of int) – Number of blocks for each decoder.

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

Free document hosting provided by Read the Docs.