master_adapt_detect/image_detector.py
2025-10-01 14:32:55 -05:00

34 lines
No EOL
1.1 KiB
Python

#!/usr/bin/env python3
"""
Master Image Detection in Layout Images - Modular Version
Uses Google Gemini 2.5 Pro API to detect which master images appear in layout images
This is the main entry point that imports from the refactored modules:
- process_detection.py: Standalone process function for detection
- gemini_detector.py: ImageDetector class using Gemini LLM
- vector_detector.py: VectorImageDetector class using embeddings
- cli.py: Command line interface
For backward compatibility, this module re-exports the main classes and functions.
"""
# Import all components from the refactored modules
from process_detection import process_single_master_detection
from gemini_detector import ImageDetector
from vector_detector import VectorImageDetector
from cli import main, parse_arguments
# Re-export for backward compatibility
__all__ = [
'process_single_master_detection',
'ImageDetector',
'VectorImageDetector',
'main',
'parse_arguments'
]
if __name__ == "__main__":
# Import the main execution from cli module
import multiprocessing
multiprocessing.set_start_method('spawn', force=True)
exit(main())