mmagic.models.editors.arcface.model_irse
¶
Module Contents¶
Functions¶
|
Constructs a ir-50 model. |
|
Constructs a ir-101 model. |
|
Constructs a ir-152 model. |
|
Constructs a ir_se-50 model. |
|
Constructs a ir_se-101 model. |
|
Constructs a ir_se-152 model. |
- class mmagic.models.editors.arcface.model_irse.Backbone(input_size, num_layers, mode='ir', drop_ratio=0.4, affine=True)[source]¶
Bases:
torch.nn.Module
Arcface backbone. There are many repos follow this codes for facial recognition, and we also follow this routine. Ref: https://github.com/orpatashnik/StyleCLIP/blob/main/models/facial_recognition/helpers.py # noqa
- Parameters
input_size (int) – Input size of image.
num_layers (int) – Number of layer in backbone.
mode (str, optional) – Bottle neck mode. If set to ‘ir_se’, then SEModule will be applied. Defaults to ‘ir’.
drop_ratio (float, optional) – Drop out ratio. Defaults to 0.4.
affine (bool, optional) – Whether use affine in BatchNorm1d. Defaults to True.