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.3.tar.gz (2.3 MB 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.3-py3-none-any.whl (45.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yolo26_analytics-0.1.3.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • 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.3.tar.gz
Algorithm Hash digest
SHA256 1b2e24116fceb576c9e7b8e631b8251cdd48a9bbc16221f0f5958c741218f00d
MD5 7a7d0b77712bb79e6235db6cffa8d980
BLAKE2b-256 6cf61dcf96af1e5f0130dc3d161fdab85d22d4d19191e900f30598c806fafc5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yolo26_analytics-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1f63457d73524256ea952f2c5e92d0687193904f0039a9f29f94316b94518904
MD5 05719d4e4dff9a06dd100124ead33397
BLAKE2b-256 67f84693641c556d47234e8155b69b9f3f2de4d12cee1471e9638ee803ea14a2

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