Spaces:
Paused
Paused
| from abc import ABC, abstractmethod | |
| from typing import Union | |
| from ..motion import MotionClip | |
| PersonSelector = Union[str, int] | |
| class PoseBackend(ABC): | |
| """MotionBackend kind: video -> MotionClip (own skeleton); goes through resample+retarget+bake.""" | |
| name: str | |
| kind: str = "motion" | |
| def infer(self, video_path: str, fps=None, person: PersonSelector = "auto") -> MotionClip: ... | |
| class DirectRetargetBackend(ABC): | |
| """Direct kind: (video, target rig + reference frame) -> rotations already on the target skeleton. | |
| Returns a retarget.TargetAnimation; the pipeline sends it straight to bake (no MotionClip).""" | |
| name: str | |
| kind: str = "direct" | |
| def infer(self, video_path: str, target_rig_glb: str, reference_frame=None, | |
| fps=None, person: PersonSelector = "auto"): # -> retarget.retarget.TargetAnimation | |
| ... | |