CU1-X / detection /__init__.py
AI-DrivenTesting's picture
init
77da9e2
"""
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'
]