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

Uploaded Python 3

File details

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

File metadata

  • Download URL: yolo26_analytics-0.1.1.tar.gz
  • Upload date:
  • Size: 74.8 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.1.tar.gz
Algorithm Hash digest
SHA256 246034c1ecde2500b999d4441cab8416cf9741895b7a4404300a80b4f9e1774c
MD5 8c043b3cf479e369d0f78ea120420963
BLAKE2b-256 1a8764511d14eb57a0c2f2211b35f31cc6d3461b28e400a3d767aeb4660103c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yolo26_analytics-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e593b88fbc2990a06ffaf8e2e780f5fca4d4f38bb4cb37e737b85989702f09d8
MD5 9028d83a51f4763785876ef5c24fe40c
BLAKE2b-256 f7d5ffe45f1db830f6c6ae402e5a3c1d9de0920eebb4a0577216dea8979633d3

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