mmagic.models.editors.rdn
¶
Package Contents¶
Classes¶
Residual Dense Block of Residual Dense Network. |
|
RDN model for single image super-resolution. |
- class mmagic.models.editors.rdn.RDB(in_channels, channel_growth, num_layers)[source]¶
Bases:
mmengine.model.BaseModule
Residual Dense Block of Residual Dense Network.
- Parameters
in_channels (int) – Channel number of inputs.
channel_growth (int) – Channels growth in each layer.
num_layers (int) – Layer number in the Residual Dense Block.
- class mmagic.models.editors.rdn.RDNNet(in_channels, out_channels, mid_channels=64, num_blocks=16, upscale_factor=4, num_layers=8, channel_growth=64)[source]¶
Bases:
mmengine.model.BaseModule
RDN model for single image super-resolution.
Paper: Residual Dense Network for Image Super-Resolution
Adapted from ‘https://github.com/yjn870/RDN-pytorch.git’ ‘RDN-pytorch/blob/master/models.py’ Copyright (c) 2021, JaeYun Yeo, under MIT License.
Most of the implementation follows the implementation in: ‘https://github.com/sanghyun-son/EDSR-PyTorch.git’ ‘EDSR-PyTorch/blob/master/src/model/rdn.py’ Copyright (c) 2017, sanghyun-son, under MIT license.
- 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. Default: 16.
upscale_factor (int) – Upsampling factor. Support 2^n and 3. Default: 4.
num_layer (int) – Layer number in the Residual Dense Block. Default: 8.
channel_growth (int) – Channels growth in each layer of RDB. Default: 64.