Spaces:
Sleeping
Sleeping
File size: 1,177 Bytes
77da9e2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
"""
Detection Module - Business Logic Layer
This module contains all detection business logic including:
- DetectionService: Main service for UI element detection
- Service Factory: Singleton pattern for DetectionService
- Image Utils: Shared image loading utilities
- OCR Handler: OCR-only processing
- Response Builder: Response formatting utilities
Architecture:
- RF-DETR: Detects generic UI elements (single class)
- CLIP: Classifies detected elements into 6 types
- OCR: Extracts text content
- BLIP: Generates visual descriptions
"""
from detection.service import DetectionService
from detection.service_factory import get_detection_service, reset_detection_service
from detection.image_utils import load_image
from detection.image_preprocessing import preprocess_screenshot, ImagePreprocessor, PRESETS
from detection.rfdetr_preprocessing import preprocess_for_rfdetr, RFDETRPreprocessor, RFDETR_PRESETS
__all__ = [
'DetectionService',
'get_detection_service',
'reset_detection_service',
'load_image',
'preprocess_screenshot',
'ImagePreprocessor',
'PRESETS',
'preprocess_for_rfdetr',
'RFDETRPreprocessor',
'RFDETR_PRESETS'
]
|