mmagic.models.editors.deepfillv1.deepfill_encoder
¶
Module Contents¶
Classes¶
Encoder used in DeepFill model. |
- class mmagic.models.editors.deepfillv1.deepfill_encoder.DeepFillEncoder(in_channels=5, conv_type='conv', norm_cfg=None, act_cfg=dict(type='ELU'), encoder_type='stage1', channel_factor=1.0, **kwargs)[source]¶
Bases:
mmengine.model.BaseModule
Encoder used in DeepFill model.
This implementation follows: Generative Image Inpainting with Contextual Attention
- Parameters
in_channels (int) – The number of input channels. Default: 5.
conv_type (str) – The type of conv module. In DeepFillv1 model, the conv_type should be ‘conv’. In DeepFillv2 model, the conv_type should be ‘gated_conv’.
norm_cfg (dict) – Config dict to build norm layer. Default: None.
act_cfg (dict) – Config dict for activation layer, “elu” by default.
encoder_type (str) – Type of the encoder. Should be one of [‘stage1’, ‘stage2_conv’, ‘stage2_attention’]. Default: ‘stage1’.
channel_factor (float) – The scale factor for channel size. Default: 1.
kwargs (keyword arguments) –