Tracktail
Multi-view 3D point tracking without depth input. You give Tracktail synchronized videos from calibrated cameras and a set of 3D query points. It returns each point's 3D trajectory and visibility over time.
To reproduce the paper, see the paper branch.
- Uses only RGB video and camera calibration. No depth sensor and no monocular depth model.
- Works with any number of cameras (1–N) and different rigs, because coordinates are normalized by a per-camera scene scale.
- Pretrained models on the Hugging Face Hub, a Python API, and an HTTP inference server.
Contents
- Installation
- Python API
- Pretrained models
- Conventions: cameras, coordinates, outputs
- Long videos
- Visualization & evaluation
- Inference server
- Training
- Repository layout
- Citation
Installation
git clone https://github.com/AI-HHMI/tracktail.git
cd tracktail
pixi install # Python 3.11, CUDA 12.8 PyTorch, all deps
pixi shell # or prefix commands with `pixi run`
Library only, without the server: pip install tracktail. You need to install PyTorch yourself.
GPU. Any recent NVIDIA GPU works. Peak memory on an A100, 96 frames at 256 px, 2–10 views
(paper speed benchmark, benchmark_speed/ on the paper branch): about 2 GB for 10 query points, 3.5 GB for 100, and 20 GB for 1000 (up to
34 GB reserved by PyTorch at 10 views). Memory grows with the number of points, so lower
max_kpts (points per forward pass) on smaller GPUs. CPU works but is slow.
Python API
from tracktail.model.tracker_encoder import TrackerEncoder
from tracktail.inference.inference_utils import (
load_camera_group_from_metadata, run_tracker_encoder_on_videos, run_inference)
model = TrackerEncoder.from_pretrained("ai-hhmi/tracktail-static-animal", revision="2026-10-12")
# a) arbitrary videos + calibration + query points
cams = load_camera_group_from_metadata("trial/metadata.yaml")
res = run_tracker_encoder_on_videos(model, video_paths, cams, queries_xyz, # (N,3) tensor
start_frame=0, n_frames=1000, query_times=None)
res["coords_pred"], res["vis_pred"], res["frame_numbers"]
# b) a trial directory (see layout below); optionally saves an .npz
run_inference(model, None, None, trial_path="trial/", n_frames=1000, outpath="out.npz")
run_tracker_encoder_on_videos takes care of windowing, re-anchoring queries between windows,
and a crop that follows the subject. Useful arguments:
query_times: per-point query frame (relative tostart_frame); each point starts at its own frame.motion_margin(default on): widen each window's crop by the previous window's motion so fast subjects stay in view.max_kpts: points per forward pass; lower it to save GPU memory.vis_thresh(default 0.1): visibility threshold for the occlusion state carried between windows.run_inference(..., n_views=K, seed=S)uses K randomly chosen cameras.
Trial directory layout (used by run_inference, scripts/inference_video.py, and
server/example_client.py):
trial/
metadata.yaml # intrinsic_matrices, extrinsic_matrices (world->cam), distortion_matrices,
# camera_heights, camera_widths, [offset_dict], [cam_type], [moving_cams]
pose3d.npz # 'pose' (subjects, T, kpts, 3): query source (and GT if present); optional 'vis'
vid/<cam>.mp4 # or img/<cam>/*.png
Pretrained models
| Repo | Trained on | Clip / res | Release |
|---|---|---|---|
ai-hhmi/tracktail-static-animal (server default) |
tracktail-static, further finetuned on animal datasets |
24 frames / 256 px | 2026-10-12 |
ai-hhmi/tracktail-static |
The paper model: trained on Multi-view Kubric + Multi-view Point Odyssey (human, animal) | 24 frames / 256 px | 2026-10-12 |
"static" means static (calibrated, non-moving) cameras. Use tracktail-static-animal for animal
recordings; use tracktail-static for general scenes and to compare with the paper's numbers.
Conventions
- Extrinsics are world→camera 4×4 matrices. Units can be anything, because the model
normalizes by a per-camera scene scale
s_c = 1 / median σ_max(J_c). - Logits:
vis_*andconf_*outputs are logits, so apply a sigmoid. For visibility use a threshold of 0.1 (tracktail.model.eval_metrics.TRACKTAIL_VIS_THRESH; used in the paper). - Camera order: in
metadata.yamlcameras are sorted by name (numerically if every name is a number). - Moving cameras:
moving_cams: truewith (T,4,4) extrinsics (Python API only).
Long videos
The model sees 24 frames at a time. The Python API and scripts/inference_video.py track through
longer videos automatically: they run overlapping windows, start each window from the previous
window's predictions, and move the crop with the subject. With the server, you do the windowing on
the client (see docs/SERVER.md).
pixi run python scripts/inference_video.py --help # windowed inference over a whole trial
Visualization & evaluation
scripts/render_video.py --input-npz out.npz --output-dir viz/ [--crop --trails]: draws predictions over the video.scripts/viz3d.py: 3D viewer built on rerun. It's a function library, so import it in a notebook.scripts/inference_metrics.py: computes AJ, δ_avg, OA and MTE usingtracktail.model.eval_metrics.
Inference server
server/server.py serves the model over HTTP, one clip per request, so you can call it from any
language or another machine:
pixi run python server/server.py # downloads ai-hhmi/tracktail-static-animal, serves on :8000
See docs/SERVER.md for the options, the request format, the outputs, and a Python client.
Training
See docs/TRAINING.md. Training now defaults to bf16 autocast in the encoder
and decoder plus a compiled encoder (~1.9x faster on H100); [training.speed] enabled = false
restores fp32 eager (see Training speed). The configs behind the paper's model are on the
paper branch.
Repository layout
tracktail/model/ model (tracker_encoder.py, encoder_decoder.py, vjepa2.py, cube.py), losses, metrics, train_utils
tracktail/datasets/ training (tracktail_dataset.py) and inference datasets, scorer corruptions
tracktail/inference/ inference_utils.py (loading, windowed tracking, trial I/O)
server/ FastAPI inference server + example client (docs/SERVER.md)
docs/ server and training docs
scripts/ inference / rendering / metrics / packaging CLIs
configs/ training configs (TOML)
cluster/ LSF launch scripts
Citation
Metadata
Release files for tracktail 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tracktail-0.6.2.tar.gz | 195.1 kB | Without provenance | Details for tracktail-0.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tracktail-0.6.2-py3-none-any.whl | Python 3 | none | any | Details for tracktail-0.6.2-py3-none-any.whl |
Total release size: 381.3 kB
Release files / tracktail-0.6.2.tar.gz
| Download URL | tracktail-0.6.2.tar.gz |
|---|---|
| Size | 195.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78db2ccbd6a9b31be34f5bf2aa200078c2a906f378273fc23721e498d721135f
|
|
BLAKE2b-256 checksum How to use checksums |
c50a34a26e006624651bc8317f3d2f2daa3ae0ef5abb8448f347a910c6b350fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / tracktail-0.6.2-py3-none-any.whl
| Download URL | tracktail-0.6.2-py3-none-any.whl |
|---|---|
| Size | 186.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b280967d1347d7c86e261a47fef81ee5cfa93c638712b1d528ef255713225b8c
|
|
BLAKE2b-256 checksum How to use checksums |
3702db364cc00114699efcf5e40aa6349d8b5aee30e4215d92b37647d31a23c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for tracktail 0.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.