Trackforge
[!IMPORTANT] This project is currently under active development. APIs and features are subject to change.
Trackforge is a unified, high-performance computer vision tracking library, implemented in Rust and exposed as a Python package. It provides state-of-the-art tracking algorithms like ByteTrack, optimized for speed and ease of use in both Rust and Python environments.
Features
- 🚀 High Performance: Native Rust implementation for maximum speed and memory safety.
- 🐍 Python Bindings: Seamless integration with the Python ecosystem using
pyo3. - 🛠 Unified API: Consistent interface for tracking tasks across both languages.
- 📸 ByteTrack: Robust multi-object tracking using Kalman filters and IoU matching.
Installation
Python
(Note: Released on PyPI soon. For now, build from source).
Rust
Add trackforge to your Cargo.toml:
[]
= "0.1.1" # Check crates.io for latest version
Usage
🐍 Python
# Initialize ByteTrack
# track_thresh: High confidence detection threshold (e.g., 0.5)
# track_buffer: Frames to keep lost tracks alive (e.g., 30)
# match_thresh: IoU matching threshold (e.g., 0.8)
# det_thresh: Initialization threshold (e.g., 0.6)
=
# Detections: List of (TLWH_Box, Score, ClassID)
=
# Update tracker
=
# t is (track_id, tlwh_box, score, class_id)
🦀 Rust
use ByteTrack;
Development
This project uses maturin to manage the Rust/Python interop.
Prerequisites
- Rust & Cargo
- Python 3.8+
maturin:pip install maturin
Build
# Build Python bindings
# Run Rust tests
Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.