How poeticoding/yolo_elixir works
Core Processing Pipeline
a. Preprocessing Stage
b. Model Inference Stage
c. Postprocessing Stage
Frame Scaling System
• EvisionScaler (OpenCV)
• ImageScaler
• NxIdentityScaler
• To the Preprocessing Stage
Model Implementation Layer
• Ultralytics Implementation
• YOLOv8 Specific Logic
• Connection to the core pipeline
External Dependencies & Integration
• ONNX Runtime (Ortex)
• Hardware Acceleration Options:
• CoreML (Mac)
• DirectML (Windows)
• CUDA/TensorRT (Linux)
Optional Components
• FastNMS Integration
• Standard NMS Implementation
┌─────────────────────────────────────── YOLO System ───────────────────────────────────────┐
• ┌─── Input Sources ───┐ ┌────── Core Pipeline ───────┐ ┌──── Output Format ────┐ │
• Image Files │ │ 1. Preprocessing │ │ Detected Objects │ │
• Webcam Stream │───▶│ 2. Model Inference │───▶│ [{class, prob, │ │
• Video Feed │ │ 3. Postprocessing │ │ bbox, class_idx}] │ │
• ┘ └────────────────────────────┘ └────────────────────┘ │
• ▲ │
• ┌─── Frame Scalers ────┐ ┌─── Model Layer ────┐ ┌──── NMS Options ─────────┐ │
• EvisionScaler │ │ - Ultralytics │ │ - Standard NMS │ │
• ImageScaler │────│ - YOLOv8 │ │ - FastNMS (Rust NIF) │ │
• NxIdentityScaler │ └──────────────────┘ └────────────────────────┘ │
• ┘ │
• ┌─── Hardware Acceleration ──┐ ┌─── External Dependencies ─┐ │
• CoreML (Mac) │ │ - ONNX Runtime │ │
• DirectML (Windows) │ │ - Evision/OpenCV │ │
• CUDA/TensorRT (Linux) │ │ - Nx │ │
• ┘ └────────────────────────┘ │
• ┘
• Use blue for core pipeline components
• Use green for input/output components
• Use orange for hardware acceleration
• Use purple for external dependencies
• Use yellow for optional components
Important Implementation Details to Note:
Performance optimization options
This design captures both the high-level architecture and the important implementation details while maintaining clarity about the system's primary purpose of real-time object detection.