Shortcuts

mmagic.models.editors.aotgan.aot_neck

Module Contents

Classes

AOTBlockNeck

Dilation backbone used in AOT-GAN model.

AOTBlock

AOT Block which constitutes the dilation backbone.

class mmagic.models.editors.aotgan.aot_neck.AOTBlockNeck(in_channels=256, dilation_rates=(1, 2, 4, 8), num_aotblock=8, act_cfg=dict(type='ReLU'), **kwargs)[source]

Bases: mmengine.model.BaseModule

Dilation backbone used in AOT-GAN model.

This implementation follows: Aggregated Contextual Transformations for High-Resolution Image Inpainting

Parameters
  • in_channels (int, optional) – Channel number of input feature. Default: 256.

  • dilation_rates (Tuple[int], optional) – The dilation rates used

  • Default (for AOT block.) – (1, 2, 4, 8).

  • num_aotblock (int, optional) – Number of AOT blocks. Default: 8.

  • act_cfg (dict, optional) – Config dict for activation layer, “relu” by default.

  • kwargs (keyword arguments) –

forward(x)[source]
class mmagic.models.editors.aotgan.aot_neck.AOTBlock(in_channels=256, dilation_rates=(1, 2, 4, 8), act_cfg=dict(type='ReLU'), **kwargs)[source]

Bases: mmengine.model.BaseModule

AOT Block which constitutes the dilation backbone.

This implementation follows: Aggregated Contextual Transformations for High-Resolution Image Inpainting

The AOT Block adopts the split-transformation-merge strategy: Splitting: A kernel with 256 output channels is split into four

64-channel sub-kernels.

Transforming: Each sub-kernel performs a different transformation with

a different dilation rate.

Splitting: Sub-kernels with different receptive fields are merged.

Parameters
  • in_channels (int, optional) – Channel number of input feature. Default: 256.

  • dilation_rates (Tuple[int]) – The dilation rates used for AOT block. Default (1, 2, 4, 8).

  • act_cfg (dict, optional) – Config dict for activation layer, “relu” by default.

  • kwargs (keyword arguments) –

normalize(x)[source]
forward(x)[source]
Read the Docs v: latest
Versions
latest
stable
0.x
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.