"""
Person detection processors with pluggable providers.

Use ProcessorFactory to create instances:
    from mini_videorag.processors import ProcessorFactory
    factory = ProcessorFactory()
    person_detection = factory.create("person_detection")
"""

# pylint: disable=import-outside-toplevel,undefined-all-variable
# Lazy loading pattern: Imports deferred to avoid loading ultralytics/YOLO at module import time


def __getattr__(name):
    """Lazy load processor classes to avoid importing heavy ML dependencies."""
    if name == "BasePersonDetectionProcessor":
        from .base import BasePersonDetectionProcessor

        return BasePersonDetectionProcessor
    if name == "YOLOPersonDetectionProcessor":
        from .yolo_detection import YOLOPersonDetectionProcessor

        return YOLOPersonDetectionProcessor
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")


__all__ = [
    "BasePersonDetectionProcessor",
    "YOLOPersonDetectionProcessor",
]
