TraceWave video tracking pipeline using SAM2
Project description
TraceWave Pipeline
TraceWave is a video tracking pipeline that runs SAM2 on frame sequences, produces per-frame CSV summaries, and exports annotated videos.
What You Get
- Annotated MP4 outputs per chunk (and a merged MP4).
- Per-frame CSVs per chunk (and a merged CSV).
- A CLI for running the pipeline over frame folders and prompt YAMLs.
Requirements
- Python 3.10+
- SAM2 (installed automatically via pip)
- CUDA GPU recommended for speed (CPU is supported but slow)
Install (PyPI)
pip install tracewave
Checkpoints (Auto-Download)
TraceWave automatically downloads the required SAM2 checkpoint on first run if it is missing. By default, checkpoints are stored in:
~/.cache/tracewave/sam2/checkpoints
You can also pre-download all checkpoints:
tracewave-download-checkpoints
To change the checkpoint location:
SAM2_CHECKPOINT_DIR=/path/to/checkpoints
To disable auto-download:
TRACEWAVE_AUTO_DOWNLOAD=0
Dev Helper (SAM2 + Checkpoints)
If you prefer a local clone of SAM2 (for development), you can still use:
make install
This creates a venv, installs TraceWave in editable mode, clones SAM2 into third_party/sam2, and downloads checkpoints.
Configure SAM2 (optional)
If SAM2 lives somewhere else, set:
SAM2_ROOT=/path/to/sam2(should containsam2/andcheckpoints/)SAM2_MODEL=tiny|small|base_plus|large(default:large)
Usage
Run the pipeline:
tracewave -i /path/to/frames -o /path/to/output -p /path/to/prompts.yaml
Generate a tasks file for batch runs:
tracewave-gen-tasks /path/to/root -o tasks.tsv
Prompt YAML Format
Prompt files must contain a top-level prompts list. See src/tracewave/prompts/parser.py for the exact schema and examples.
Outputs
Given frame_dir=/data/frames/clipA, outputs are:
/output/clipA.csv(merged CSV)/output/clipA.mp4(merged annotated video)/output/clipA_tmp/(intermediate chunk files; removed if--del_tmpis set)
Troubleshooting
- If SAM2 configs or checkpoints are missing, TraceWave will raise a clear error with the expected paths.
- Set
HYDRA_FULL_ERROR=1for detailed SAM2 errors.
License
See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tracewave-0.2.0.tar.gz.
File metadata
- Download URL: tracewave-0.2.0.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75316422479420fc4049212d32afc8a0960d13552204d04975883be45db89521
|
|
| MD5 |
c966ef4500431ef6aef176fc844f9591
|
|
| BLAKE2b-256 |
f5de77ccd84741f01da74bd1ca7cf958367ee1d50bbf155d5671d91429ebc5c2
|
Provenance
The following attestation bundles were made for tracewave-0.2.0.tar.gz:
Publisher:
publish.yml on StevetheGreek97/TraceWave-pipeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tracewave-0.2.0.tar.gz -
Subject digest:
75316422479420fc4049212d32afc8a0960d13552204d04975883be45db89521 - Sigstore transparency entry: 920018708
- Sigstore integration time:
-
Permalink:
StevetheGreek97/TraceWave-pipeline@20836ebc5a085248d5f38f68de3fb57c820fd12d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/StevetheGreek97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@20836ebc5a085248d5f38f68de3fb57c820fd12d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file tracewave-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tracewave-0.2.0-py3-none-any.whl
- Upload date:
- Size: 34.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18202f7bd3574f8ae1428b3a0d2aca8e20c7b610c8cb68d27a9bbf0c6d83b534
|
|
| MD5 |
51c169aab6f1d8d3f446592619f11265
|
|
| BLAKE2b-256 |
db90089a002d58653865f4037901ee6bbf0884bb1b090cff3c5954cdc088b97a
|
Provenance
The following attestation bundles were made for tracewave-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on StevetheGreek97/TraceWave-pipeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tracewave-0.2.0-py3-none-any.whl -
Subject digest:
18202f7bd3574f8ae1428b3a0d2aca8e20c7b610c8cb68d27a9bbf0c6d83b534 - Sigstore transparency entry: 920018711
- Sigstore integration time:
-
Permalink:
StevetheGreek97/TraceWave-pipeline@20836ebc5a085248d5f38f68de3fb57c820fd12d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/StevetheGreek97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@20836ebc5a085248d5f38f68de3fb57c820fd12d -
Trigger Event:
workflow_dispatch
-
Statement type: