Files
mediaproc/detect/profiles/__init__.py
2026-03-26 22:22:35 -03:00

36 lines
766 B
Python

from .base import (
ContentTypeProfile,
CropContext,
DetectionConfig,
FrameExtractionConfig,
OCRConfig,
ResolverConfig,
SceneFilterConfig,
)
from .soccer import SoccerBroadcastProfile
_PROFILES: dict[str, type] = {
"soccer_broadcast": SoccerBroadcastProfile,
}
def get_profile(name: str) -> ContentTypeProfile:
"""Get a profile instance by name."""
cls = _PROFILES.get(name)
if cls is None:
raise ValueError(f"Unknown profile: {name!r}. Available: {list(_PROFILES)}")
return cls()
__all__ = [
"ContentTypeProfile",
"CropContext",
"DetectionConfig",
"FrameExtractionConfig",
"OCRConfig",
"ResolverConfig",
"SceneFilterConfig",
"SoccerBroadcastProfile",
"get_profile",
]