Skip to main content

Real-time object tracking, zone analytics, and event alerting built on YOLO26

Project description

yolo26-analytics

Real-time object tracking, zone analytics, and event alerting built on YOLO26.

CI Python 3.10+

What is this?

A pip-installable framework that turns YOLO26 into a production-grade video analytics pipeline. Draw zones, count objects, detect entry/exit, measure dwell time, generate heatmaps, and get real-time alerts — all from a YAML config file.

Quickstart

pip install yolo26-analytics
y26a run --source video.mp4 --dashboard

Or with Python:

from yolo26_analytics import Pipeline

pipeline = Pipeline.from_yaml("config.yaml")
pipeline.run()

Open http://localhost:8000 to see the live dashboard.

Architecture

VideoSource → Detector → Tracker → ZoneAnalyzer → AlertManager
                            ↓                        ↓
                        TrackStore ←──────── EventStore
                            ↓
                      AnalyticsEngine (heatmaps, dwell, counts)
                            ↓
                        Dashboard (live + replay)

Every stage is a Python Protocol. Swap the detector, alert backend, or video source — nothing else changes.

Features

  • YOLO26 detection with pluggable model adapters (bring your own model)
  • ByteTrack multi-object tracking with persistent IDs
  • Zone analytics: counting, entry/exit, dwell time, throughput
  • Heatmap generation from accumulated track data
  • 4 alert backends: console, webhook (Slack/Discord), MQTT, Telegram
  • Alert routing — filter alerts by zone and event type
  • SAHI integration for small object detection at distance
  • FastAPI dashboard with live feed, analytics charts, replay, zone editor
  • PostgreSQL track store for production (SQLite fallback for dev)
  • Model export to ONNX, TFLite, TensorRT with auto-benchmarking
  • CLI (y26a) and Python API

Configuration

source:
  type: rtsp
  url: rtsp://192.168.1.100/stream

model:
  weights: yolo26n.pt
  confidence: 0.5

zones:
  - name: "Loading Dock"
    polygon: [[100,100], [400,100], [400,400], [100,400]]
    track_classes: [person, forklift]
    analytics:
      - type: count
      - type: dwell
        alert_threshold: 300
      - type: entry_exit

alerts:
  - type: telegram
    bot_token: "YOUR_TOKEN"
    chat_id: "YOUR_CHAT_ID"
  - type: console

dashboard: true

See examples/ for more configurations.

CLI

# Run pipeline
y26a run --source video.mp4 --dashboard
y26a run --config config.yaml

# Export model
y26a export --model yolo26n.pt --format onnx
y26a export --model yolo26n.pt --format tflite --quantize int8

# Generate heatmap
y26a heatmap --source video.mp4 --output heatmap.png

Docker

docker-compose up

Starts the app + PostgreSQL. Dashboard at http://localhost:8000.

Roadmap

  • YOLO26-pose for action/posture detection
  • YOLO26-seg for pixel-level analytics
  • Natural language queries over detection history (LLM integration)
  • Active learning: flag low-confidence detections for relabeling
  • Multi-camera orchestration with load balancing
  • Grafana datasource plugin

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yolo26_analytics-0.1.0.tar.gz (67.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yolo26_analytics-0.1.0-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file yolo26_analytics-0.1.0.tar.gz.

File metadata

  • Download URL: yolo26_analytics-0.1.0.tar.gz
  • Upload date:
  • Size: 67.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for yolo26_analytics-0.1.0.tar.gz
Algorithm Hash digest
SHA256 48195d91136991789587aedef855662758fdb112101a361794c659fed6798d70
MD5 62d5ee6c2a943b47c1021e7b12f1c271
BLAKE2b-256 bc37e081c854dea2fd81fef337bc36d00238c312ad76f6426545b62eb51e7c3d

See more details on using hashes here.

File details

Details for the file yolo26_analytics-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for yolo26_analytics-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98d8b5f977508ab301de9b1847793c8d88d5f07724c1961393a9a2b6253516d2
MD5 a563ee0a3441a4641433ae48f95565dd
BLAKE2b-256 15193854cfd07305854c22fc576537e49963fa77d4471e769b58403ec540ec7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page