mediapipe_model_maker.face_stylizer.ModelOptions
Stay organized with collections
Save and categorize content based on your preferences.
Configurable model options for face stylizer models.
mediapipe_model_maker.face_stylizer.ModelOptions(
swap_layers: Sequence[int] = dataclasses.field(default_factory=lambda : [4, 5, 10, 11]),
alpha: float = 0.1,
perception_loss_weight: mediapipe_model_maker.face_stylizer.face_stylizer.loss_functions.PerceptualLossWeight = dataclasses.field(default_factory=_default_perceptual_quality_loss_weight),
adv_loss_weight: float = 0.2
)
Attributes |
swap_layers
|
The layers of feature to be interpolated between encoding
features and StyleGAN input features.
|
alpha
|
Weighting coefficient of style latent for swapping layer
interpolation. Its valid range is [0, 1]. The greater weight means
stronger style is applied to the output image. Expect to set it to a small
value, i.e. < 0.1.
|
perception_loss_weight
|
Weighting coefficients of image perception quality
loss.
|
adv_loss_weight
|
Weighting coeffcieint of adversarial loss versus image
perceptual quality loss. It expects a small value, i.e. < 0.2.
|
Methods
__eq__
__eq__(
other
)
Class Variables |
|
adv_loss_weight
|
0.2
|
|
alpha
|
0.1
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-28 UTC.
[null,null,["Last updated 2026-05-28 UTC."],[],[]]