mmagic.models.editors.plain
¶
Package Contents¶
Classes¶
Simple decoder from Deep Image Matting. |
|
Simple refiner from Deep Image Matting. |
- class mmagic.models.editors.plain.PlainDecoder(in_channels, init_cfg: Optional[dict] = None)[source]¶
Bases:
mmengine.model.BaseModule
Simple decoder from Deep Image Matting.
- Parameters
in_channels (int) – Channel num of input features.
init_cfg (dict, optional) – Initialization config dict. Default: None.
- forward(inputs)[source]¶
Forward function of PlainDecoder.
- Parameters
inputs (dict) –
Output dictionary of the VGG encoder containing:
out (Tensor): Output of the VGG encoder.
max_idx_1 (Tensor): Index of the first maxpooling layer in the VGG encoder.
max_idx_2 (Tensor): Index of the second maxpooling layer in the VGG encoder.
max_idx_3 (Tensor): Index of the third maxpooling layer in the VGG encoder.
max_idx_4 (Tensor): Index of the fourth maxpooling layer in the VGG encoder.
max_idx_5 (Tensor): Index of the fifth maxpooling layer in the VGG encoder.
- Returns
Output tensor.
- Return type
Tensor
- class mmagic.models.editors.plain.PlainRefiner(conv_channels=64, init_cfg=None)[source]¶
Bases:
mmengine.model.BaseModule
Simple refiner from Deep Image Matting.
- Parameters
conv_channels (int) – Number of channels produced by the three main convolutional layer. Default: 64.
pretrained (str) – Name of pretrained model. Default: None.