|
|
|
|
|
""" |
|
parameters used for crop faces |
|
""" |
|
|
|
from dataclasses import dataclass |
|
|
|
from .base_config import PrintableConfig |
|
|
|
|
|
@dataclass(repr=False) |
|
class CropConfig(PrintableConfig): |
|
insightface_root: str = "../../pretrained_weights/insightface" |
|
landmark_ckpt_path: str = "../../pretrained_weights/liveportrait/landmark.onnx" |
|
device_id: int = 0 |
|
flag_force_cpu: bool = False |
|
|
|
dsize: int = 512 |
|
scale: float = 2.0 |
|
vx_ratio: float = 0 |
|
vy_ratio: float = -0.125 |
|
max_face_num: int = 0 |
|
|
|
|
|
scale_crop_video: float = 2.2 |
|
vx_ratio_crop_video: float = 0.0 |
|
vy_ratio_crop_video: float = -0.1 |
|
direction: str = "large-small" |
|
|