AI Tracking Solution for Any PTZ Cameras

AutoPTZ
AI-driven PTZ camera tracking โ detect people, lock onto a target, and move the camera to follow them automatically.
Installation ยท Configuration ยท Performance ยท Building ยท Architecture ยท Troubleshooting
AutoPTZ is a cross-platform desktop app (native Qt Widgets / PySide6) that runs a real-time vision pipeline per camera โ **detect โ track โ re-identify โ pose โ aim โ drive PTZ** โ and sends smooth pan/tilt/zoom commands so a PTZ camera keeps the chosen person framed. It is built for live production: multi-camera, stable target identity across occlusions, and graceful degradation when a model or device is missing (it always keeps live preview).
Highlights
- Multi-camera โ each camera runs its own worker; identities stay stable per
- Identity-gated tracking โ click a person to target them; optional face
- Smooth PTZ control โ motion prediction, one-euro smoothing, PD + velocity
- Runs anywhere, fast โ ONNX Runtime picks the best accelerator per platform
- PTZ backends โ VISCA over USB, VISCA over IP, ONVIF, and NDI.
- In-app updates โ checks GitHub Releases and downloads the matching asset for
Quick start (from source)
Requires Python 3.12+.
git clone https://github.com/AutoPTZ/autoptz
cd autoptz
Create a venv at the PROJECT ROOT (not inside autoptz/)
python3.12 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
Full stack (detection + tracking + UI), editable source checkout:
python tools/install.py --editable
python -m autoptz # launch the app python -m autoptz --selftest # verify the foundations and exit
Use Engine โ Models... to cache the detector tiers and pose model in the platform app-data dir. Without required models, AutoPTZ disables the affected feature controls and still keeps live preview available where possible. Missing detector tiers are not fetched on switch unless automatic model downloads are enabled in that window.
Picking your accelerator
tools/install.py detects the OS/GPU and prints every pip command before it runs it. Use --dry-run to review the plan. Static requirements files cannot inspect CUDA/TensorRT, so you can still force the ONNX Runtime wheel explicitly:
python tools/install.py --dry-run
python tools/install.py --accelerator nvidia --editable
python tools/install.py --accelerator openvino --editable
python tools/install.py --accelerator cpu --editable
Only one onnxruntime* wheel can be installed at a time โ see Performance.
Installers
Pre-built installers are published on the Releases page: a macOS .dmg, a Windows installer (.exe), and a Linux AppImage. To build them yourself see docs/building.md.
After install, Help โ Updates โ Check Nowโฆ downloads the matching OS asset, starts it, and closes AutoPTZ so the update can finish. If a release is missing your OS asset, AutoPTZ opens the release page instead.
Documentation
| Doc | What's in it | | --- | --- | | Installation | From source + pre-built installers, per platform. | | Configuration | Every tuning knob: detector tier, detect interval, framing, smoothing, PTZ gains. | | Performance | Cross-platform device/precision matrix + the epcompare benchmark. | | Building | PyInstaller bundles โ DMG / Windows installer / AppImage. | | Architecture | Module map and the per-frame data flow. | | Troubleshooting | Common issues (no boxes, wrong camera, slow tracking). | | Contributing | Dev setup, lint/type/test gates, branch policy. |
License And Models
AutoPTZ is licensed under the GNU Affero General Public License v3.0. See LICENSE.md and NOTICE.md for third-party model and optional dependency notices.