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

Apache 2.0

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.2.tar.gz (74.9 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.2-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for yolo26_analytics-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bcb0079ce77f424513cad6d23c438d879a3a6c9d6ceba2e350c0e64bd3fbecfe
MD5 62ca6bf8c822b10a68ef1c820282aa49
BLAKE2b-256 537e7b837658c39831593214939323faa7e60ede77cd93de296ac16a89589798

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yolo26_analytics-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 43211a90ddce52e6bccba85bd94e242f6bb9b2eb53886bbe2593b7ad9551d6b3
MD5 0bfdcd819da95ce5465e5b44561bd629
BLAKE2b-256 a000bfbc6aceea8d51042a26876e444c5e8803a67d9dc9d8126683b3a05b4589

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