ARCH-002: Extract ML Inference Engine
- Created MLInferenceEngine interface with async detection methods
- Implemented YOLOInferenceEngine preserving ALL YOLOOnnxDetector functionality:
* Complete 96-class mapping with exact original class names
* All preprocessing techniques (ultralytics, enhanced, sharpened, original)
* All coordinate transformation modes (HYBRID, LETTERBOX, DIRECT)
* Weighted NMS and cross-class NMS for semantically related classes
* Confidence mapping and mobile optimization
* Debug features (class filtering, confidence logging)
* Letterbox resize with proper aspect ratio preservation
* CLAHE contrast enhancement and sharpening filters
- Created ImagePreprocessor utility for reusable preprocessing operations
* Configurable preprocessing with letterboxing, normalization, color conversion
* Coordinate transformation utilities for model-to-image space conversion
* Support for different preprocessing configurations
- Updated ScreenCaptureService to use new MLInferenceEngine:
* Replaced YOLOOnnxDetector with MLInferenceEngine dependency injection
* Added class name to class ID mapping for compatibility
* Maintained all existing detection pipeline functionality
* Proper async/await integration with coroutines
- Applied preferred code style throughout:
* Opening braces on new lines for functions and statements
* snake_case for local variables to distinguish from members/parameters
* Consistent formatting matching project standards
- Removed obsolete YOLO implementations (YOLODetector, YOLOTFLiteDetector)
- Preserved all sophisticated ML features: TTA, multi-preprocessing, confidence mapping
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>