Computer Vision
Real-Time Object Detection & Segmentation using YOLOv11
Developed a real-time object detection and segmentation system using YOLOv11, OpenCV, and Streamlit supporting webcam, image, and video inference with dynamic model switching and interactive visualization.
Overview
Challenge
Computer vision streaming pipelines often suffer from high frame-processing latency, leading to lag, stuttering, and severe frame drop in live streams.
Solution
Engineered a frame-processing queue in Python that isolates webcam capturing, YOLOv11 model inference, and Streamlit visualization.
Status
Production-style CV App
Architecture
CLICK ANY STAGE TO INSPECT ITS INPUT / OUTPUT SPECDATA FLOW 5 STAGES ✓
Implementation
- Segregated frame ingestion, model execution, and rendering loops to prevent thread blocking.
- Optimized frame queue buffers to maintain stable processing bounds during model-switching.
- Integrated dynamic counting boundaries and class filters directly into the OpenCV overlay layer.
Results
- Maintained smooth live video streaming across webcam and uploaded footage.
- Decoupled inference processing from user interface rendering.
- Prevented video buffer overflow with thread-safe frame management.
Lessons Learned
- Decoupling model thread execution from UI rendering is essential for smooth video playback.
- YOLOv11 inference efficiency is maximized when batch size and frame resolution are dynamically constrained.
- OpenCV drawing operations must be lightweight to prevent introducing latency back into the pipeline.
Tech Stack
YOLOv11OpenCVStreamlitPythonFrame Queue Buffers