https://github.com/rizwanmunawar/streamgrid
Multi-stream video inference with Ultralytics YOLO - Display multiple video streams in a grid layout with real-time object detection.
https://github.com/rizwanmunawar/streamgrid
computer-vision deep-learning multi-stream-player multistreaming notebook object-detection object-tracking open-source opencv-python python-apps research-and-development streamgrid threading ultralytics ultralytics-yolo yolo11 yolov8
Last synced: 3 months ago
JSON representation
Multi-stream video inference with Ultralytics YOLO - Display multiple video streams in a grid layout with real-time object detection.
- Host: GitHub
- URL: https://github.com/rizwanmunawar/streamgrid
- Owner: RizwanMunawar
- License: agpl-3.0
- Created: 2025-06-30T09:07:49.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-20T13:55:30.000Z (3 months ago)
- Last Synced: 2025-07-20T15:14:39.513Z (3 months ago)
- Topics: computer-vision, deep-learning, multi-stream-player, multistreaming, notebook, object-detection, object-tracking, open-source, opencv-python, python-apps, research-and-development, streamgrid, threading, ultralytics, ultralytics-yolo, yolo11, yolov8
- Language: Python
- Homepage:
- Size: 70.3 KB
- Stars: 9
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StreamGrid ⚡
Ultra-fast multi-stream video display, Run real-time object detection across multiple video feeds with real-time speed. Whether you're on CPU or GPU, StreamGrid handles the load like a champ.
From smart surveillance to AI-powered dashboards, StreamGrid makes it effortless to display and analyze multiple video streams side-by-side, with [Ultralytics](https://github.com/ultralytics/ultralytics) YOLO-based detection running on all of them in real time.
[](https://github.com/RizwanMunawar/streamgrid/actions/workflows/ci.yml)
[](https://pepy.tech/projects/streamgrid)
[](https://pypi.org/project/streamgrid/)## Installation
```bash
pip install streamgrid
```## Quick Start
### Python
```python
from ultralytics import YOLO
from streamgrid import StreamGrid# Use assets videos for testing
model = YOLO("yolo11n.pt")
StreamGrid(model=model)# Use your own videos
sources = ["video1.mp4", "video2.mp4", "video3.mp4", "video4.mp4"]
StreamGrid(sources=sources, model=model)# Inference on GPU
StreamGrid(sources=sources, device="cuda")
```### CLI (Command Line Interface)
```bash
streamgrid model=yolo11n.pt# Run inference with GPU device
streamgrid model=yolo11n.pt device=0# save the output
streamgrid model=yolo11n.pt device=cpu save=True# Pass source
streamgrid model=yolo11n.pt sources=["video1.mp4", "video2.mp4"]
```## Performance (Beta, final benchmarks will be released soon)
StreamGrid automatically optimizes performance based on the number of streams:
- **1-2 streams**: 640×360 resolution, up to 15 FPS per stream
- **3-4 streams**: 480×270 resolution, up to 10 FPS total (CPU processing)
- **5-9 streams**: 320×180 resolution, up to 5 FPS per stream
- **10+ streams**: 240×135 resolution, up to 3 FPS per stream*Note: Performance benchmarks are based on CPU processing. GPU acceleration can significantly improve throughput.*
## Contributing
We welcome contributions! Please feel free to submit a Pull Request or open an issue for discussion.