mmagic.models.editors.esrgan.rrdb_net
¶
Module Contents¶
Classes¶
Networks consisting of Residual in Residual Dense Block, which is used |
|
Residual Dense Block. |
|
Residual in Residual Dense Block. |
- class mmagic.models.editors.esrgan.rrdb_net.RRDBNet(in_channels, out_channels, mid_channels=64, num_blocks=23, growth_channels=32, upscale_factor=4, init_cfg=None)[source]¶
Bases:
mmengine.model.BaseModule
Networks consisting of Residual in Residual Dense Block, which is used in ESRGAN and Real-ESRGAN.
ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks. Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data. # noqa: E501 Currently, it supports [x1/x2/x4] upsampling scale factor.
- Parameters
in_channels (int) – Channel number of inputs.
out_channels (int) – Channel number of outputs.
mid_channels (int) – Channel number of intermediate features. Default: 64
num_blocks (int) – Block number in the trunk network. Defaults: 23
growth_channels (int) – Channels for each growth. Default: 32.
upscale_factor (int) – Upsampling factor. Support x1, x2 and x4. Default: 4.
init_cfg (dict, optional) – Initialization config dict. Default: None.
- class mmagic.models.editors.esrgan.rrdb_net.ResidualDenseBlock(mid_channels=64, growth_channels=32)[source]¶
Bases:
torch.nn.Module
Residual Dense Block.
Used in RRDB block in ESRGAN.
- Parameters
mid_channels (int) – Channel number of intermediate features. Default: 64.
growth_channels (int) – Channels for each growth. Default: 32.
- class mmagic.models.editors.esrgan.rrdb_net.RRDB(mid_channels, growth_channels=32)[source]¶
Bases:
torch.nn.Module
Residual in Residual Dense Block.
Used in RRDB-Net in ESRGAN.
- Parameters
mid_channels (int) – Channel number of intermediate features.
growth_channels (int) – Channels for each growth. Default: 32.