ayushjain1144 commited on
Commit
4e53b6f
·
verified ·
1 Parent(s): f49d744

Update model card for TrackEverything release API

Browse files
Files changed (1) hide show
  1. README.md +115 -63
README.md CHANGED
@@ -4,83 +4,120 @@ tags:
4
  - 3d-tracking
5
  - point-tracking
6
  - video
 
7
  pipeline_tag: keypoint-detection
8
  ---
9
 
10
  # TrackEverything
11
 
12
- Dense 3D point tracking in monocular video. Tracks all points in persistent 3D world-coordinate geometry.
13
 
 
14
 
15
- ## Quick Start
16
-
17
- ```python
18
- from tapip3d_internal.demo_hf import TrackEverything
19
 
20
- # Load model from HuggingFace Hub
21
- model = TrackEverything.from_pretrained("katefgroup/TrackEverything")
22
 
23
- # Run on a video file (Pi3 estimates geometry automatically)
24
- results = model.infer(video="path/to/video.mp4")
25
-
26
- # Dense 3D tracks
27
- print(results.coords.shape) # (B, T_src, H, W, T_tgt, 3)
28
- print(results.visibs.shape) # (B, T_src, H, W, T_tgt)
29
- print(results.dynamic_logits.shape) # (B, T_src, H, W, T_tgt)
30
- ```
31
 
32
  ## Installation
33
 
 
 
34
  ```bash
35
- # Clone the repo
36
- git clone https://github.com/katefgroup/tapip3d_internal.git
37
- cd tapip3d_internal
38
-
39
- # Install dependencies
40
- conda create -n alltracker python=3.10 -y
41
- pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu129
42
- pip install omegaconf hydra-core einops rich transformers tqdm numpy opencv-python av huggingface_hub
43
  pip install torch_scatter -f https://data.pyg.org/whl/torch-2.8.0+cu129.html
 
 
 
 
 
 
 
44
  ```
45
 
46
- ## Input Options
 
 
 
47
 
48
  ```python
49
- # Video file
50
- results = model.infer(video="path/to/video.mp4")
 
 
 
 
 
 
 
 
 
51
 
52
- # Folder of images
53
- results = model.infer(video="path/to/frames/")
 
 
 
 
 
 
54
 
55
- # URL to a video
56
- results = model.infer(video="https://example.com/video.mp4")
57
 
58
- # Numpy array (T, H, W, 3) uint8 RGB
59
- results = model.infer(video=frames_array)
60
 
61
- # Subsampling
62
- results = model.infer(video="video.mp4", frame_stride=3, max_frames=32)
 
63
  ```
64
 
65
- ## Providing Your Own Geometry (Skip Pi3)
66
 
67
- If you already have depths, camera intrinsics, and extrinsics, pass them directly to skip Pi3:
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  ```python
70
- results = model.infer(
71
  video="path/to/video.mp4",
72
- depths=depths, # (T, H, W) numpy float32 or torch tensor
73
- intrinsics=intrinsics, # (T, 3, 3) camera intrinsic matrices
74
- extrinsics=extrinsics, # (T, 4, 4) world-to-camera extrinsic matrices
 
75
  )
76
  ```
77
 
78
  ## 2D Query Points
79
 
80
- Supply query points as `[frame_index, x_pixel, y_pixel]`. They are automatically unprojected to 3D:
 
 
81
 
82
  ```python
83
- results = model.infer(
84
  video="path/to/video.mp4",
85
  query_points_2d=[
86
  [0, 100, 200], # frame 0, pixel (100, 200)
@@ -88,39 +125,54 @@ results = model.infer(
88
  ],
89
  )
90
 
91
- print(results.query_coords.shape) # (B, T, N, 3)
92
- print(results.query_visibs.shape) # (B, T, N)
93
  ```
94
 
95
  ## Output
96
 
97
- `model.infer()` returns a `TrackEverythingOutput` dataclass:
 
 
98
 
99
  | Field | Shape | Description |
100
  |-------|-------|-------------|
101
- | `coords` | `(B, T_src, H, W, T_tgt, 3)` | Dense 3D tracks in world frame |
102
- | `visibs` | `(B, T_src, H, W, T_tgt)` | Visibility masks |
103
- | `dynamic_logits` | `(B, T_src, H, W, T_tgt)` | Static/dynamic logits |
104
- | `query_coords` | `(B, T, N, 3)` | Query point 3D positions (if provided) |
105
- | `query_visibs` | `(B, T, N)` | Query point visibility (if provided) |
106
- | `norm_factor` | `float` | Applied scene normalization factor |
107
- | `depths` | `(T, H, W)` | Preprocessed depth maps |
108
  | `intrinsics` | `(T, 3, 3)` | Camera intrinsics at inference resolution |
109
- | `extrinsics` | `(T, 4, 4)` | Extrinsics after normalization |
 
 
 
110
 
111
- ## Checkpoint Format
112
 
113
- The checkpoint (`.pth`) contains:
114
- - `cfg`: dict with `model` config name and `resolution` (image_size)
115
- - `weight`: model state_dict
 
 
 
 
 
 
 
 
116
 
117
  ## Citation
118
 
119
  ```bibtex
120
- @article{tapip3d,
121
- title={TAPIP3D: Tracking Any Point in Persistent 3D Geometry},
122
- author={Zhang, Bowei and Ke, Lei and Harley, Adam W and Fragkiadaki, Katerina},
123
- journal={arXiv preprint arXiv:2504.14717},
124
- year={2025}
 
 
 
125
  }
126
- ```
 
4
  - 3d-tracking
5
  - point-tracking
6
  - video
7
+ - arxiv:2609.30222
8
  pipeline_tag: keypoint-detection
9
  ---
10
 
11
  # TrackEverything
12
 
13
+ ### Long Horizon Dense Tracking via De-Duplicating 3D Scene Representations
14
 
15
+ [Project Page](https://trackeverything.github.io/) · [Paper](https://arxiv.org/abs/2609.30222) · [Code](https://github.com/ayushjain1144/trackeverything)
16
 
17
+ TrackEverything tracks dense 3D points across long video sequences. Given RGB frames along with
18
+ depth and camera poses, it builds and maintains a persistent, de-duplicated 3D scene
19
+ representation. Trajectories are refined in 3D across temporal windows, and points are classified
20
+ as static or dynamic.
21
 
22
+ If depth and camera poses are not provided, they are estimated on the fly with feedforward 3D
23
+ reconstruction models ([VGGT-Ω](http://vggt-omega.github.io/) or [Pi3](https://github.com/yyfz/Pi3)).
24
 
25
+ This repo holds the trained checkpoint (`model.pth`). Access is gated: request access above, and
26
+ authenticate with `hf auth login` (older `huggingface_hub`: `huggingface-cli login`), or pass
27
+ `token=` explicitly, before downloading.
 
 
 
 
 
28
 
29
  ## Installation
30
 
31
+ Tested on Linux with Python 3.10, PyTorch 2.8, and CUDA 12.9.
32
+
33
  ```bash
34
+ git clone https://github.com/ayushjain1144/trackeverything.git
35
+ cd trackeverything
36
+
37
+ conda create -n trackeverything python=3.10 -y
38
+ conda activate trackeverything
39
+
40
+ pip install torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu129
 
41
  pip install torch_scatter -f https://data.pyg.org/whl/torch-2.8.0+cu129.html
42
+ pip install omegaconf hydra-core ipdb einops rich transformers wandb tqdm tensorboard iopath \
43
+ numpy fsspec torchinfo h5py imageio imageio-ffmpeg matplotlib opencv-python viztracer pillow scipy \
44
+ opt-einsum python-box line-profiler typed-argument-parser plyfile av rerun-sdk accelerate \
45
+ huggingface_hub
46
+
47
+ # The repository directory is the package `trackeverything`; add its parent to PYTHONPATH:
48
+ export PYTHONPATH="$(dirname "$PWD"):$PYTHONPATH"
49
  ```
50
 
51
+ Inference needs nothing further; only training requires the deformable-attention CUDA extension
52
+ (see the repository README for training setup).
53
+
54
+ ## Quick Start
55
 
56
  ```python
57
+ from trackeverything.demo_hf import TrackEverything
58
+
59
+ # Load the checkpoint from the Hub (or pass a local .pth path)
60
+ model = TrackEverything.from_pretrained(
61
+ "katefgroup/TrackEverything",
62
+ device="cuda",
63
+ geometry_backend="vggt_omega", # default; pass "pi3" to switch
64
+ )
65
+
66
+ # Run on a video; depth and camera poses are estimated automatically
67
+ out = model.infer(video="path/to/video.mp4")
68
 
69
+ # Compact scene tracks: one track per distinct scene point, O(T) in sequence length
70
+ tracks = out.tracks()
71
+ print(tracks.coords.shape) # (N, T, 3) world-frame 3D positions
72
+ print(tracks.visibs.shape) # (N, T) visibility logits
73
+ print(tracks.dyn_logits.shape) # (N, T) static vs. dynamic logits
74
+ print(tracks.src_time.shape) # (N,) birth frame of each point
75
+ print(tracks.cell_to_token.shape) # (T, H', W') which point each grid cell belongs to
76
+ ```
77
 
78
+ Entries before a point is born are set to `-1000`.
 
79
 
80
+ To expand back to per-pixel tracks (grows with T squared, so keep clips short):
 
81
 
82
+ ```python
83
+ dense_coords, dense_visibs, dense_dyn = tracks.to_dense()
84
+ # (1, T, H', W', T, 3), (1, T, H', W', T), (1, T, H', W', T)
85
  ```
86
 
87
+ ## Input Options
88
 
89
+ ```python
90
+ out = model.infer(video="path/to/video.mp4") # video file
91
+ out = model.infer(video="path/to/frames/") # folder of images
92
+ out = model.infer(video="https://example.com/v.mp4")# URL
93
+ out = model.infer(video=frames_array) # (T, H, W, 3) uint8 or (T, 3, H, W) float [0,1]
94
+
95
+ # Temporal cropping / subsampling
96
+ out = model.infer(video="video.mp4", start_frame=10, frame_stride=3, max_frames=32)
97
+ ```
98
+
99
+ ## Providing Your Own Geometry
100
+
101
+ Pass depths, intrinsics and extrinsics together to skip the geometry backend:
102
 
103
  ```python
104
+ out = model.infer(
105
  video="path/to/video.mp4",
106
+ depths=depths, # (T, H, W) float32 numpy or torch
107
+ intrinsics=intrinsics, # (T, 3, 3)
108
+ extrinsics=extrinsics, # (T, 4, 4) world-to-camera
109
+ conf_mask=conf_mask, # optional (T, H, W) in [0, 1]
110
  )
111
  ```
112
 
113
  ## 2D Query Points
114
 
115
+ Query points are given as `[frame_index, x_pixel, y_pixel]` and unprojected to 3D with the
116
+ estimated or supplied geometry. They are never merged with other scene points, so they can
117
+ retain higher resolution than the dense tracks.
118
 
119
  ```python
120
+ out = model.infer(
121
  video="path/to/video.mp4",
122
  query_points_2d=[
123
  [0, 100, 200], # frame 0, pixel (100, 200)
 
125
  ],
126
  )
127
 
128
+ print(out.query_coords.shape) # (B, T, N, 3)
129
+ print(out.query_visibs.shape) # (B, T, N)
130
  ```
131
 
132
  ## Output
133
 
134
+ `model.infer()` returns a `TrackEverythingOutput` dataclass. Its native payload is
135
+ `prediction`, a set of per-window track snapshots that grows linearly with T; the track views
136
+ are built from it on demand.
137
 
138
  | Field | Shape | Description |
139
  |-------|-------|-------------|
140
+ | `prediction` | — | Per-window snapshots the track views are built from (`None` in sparse mode) |
141
+ | `query_coords` | `(B, T, N, 3)` | Query point 3D positions (if query points were given) |
142
+ | `query_visibs` | `(B, T, N)` | Query point visibility (if query points were given) |
143
+ | `norm_factor` | `float` | Scene normalization factor applied to depths/extrinsics |
144
+ | `depths` | `(T, H, W)` | Preprocessed depth maps at inference resolution |
145
+ | `conf_mask` | `(T, H, W)` | Geometry confidence in `[0, 1]`, or `None` |
 
146
  | `intrinsics` | `(T, 3, 3)` | Camera intrinsics at inference resolution |
147
+ | `extrinsics` | `(T, 4, 4)` | Extrinsics after cam0-alignment and normalization |
148
+ | `rgb` | `(T, 3, H, W)` | Preprocessed RGB, float `[0, 1]` |
149
+ | `dense_source_mask` | `(T_src, H', W')` | Dense source validity mask |
150
+ | `voxel_size`, `dynamic_threshold` | `float` | Settings the model ran with |
151
 
152
+ Derived views:
153
 
154
+ | Accessor | Shape | Cost |
155
+ |----------|-------|------|
156
+ | `out.tracks()` | `SceneTokens`: `coords` `(N, T, 3)`, `visibs` / `dyn_logits` `(N, T)`, `cell_to_token` `(T, H', W')` | linear in T — preferred |
157
+ | `out.coords` | `(B, T_src, H, W, T_tgt, 3)` | built on first access, quadratic in T |
158
+ | `out.visibs` | `(B, T_src, H, W, T_tgt)` | built on first access, quadratic in T |
159
+ | `out.dynamic_logits` | `(B, T_src, H, W, T_tgt)` | built on first access, quadratic in T |
160
+
161
+ ## License
162
+
163
+ Released under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/): share and adapt
164
+ for non-commercial purposes with attribution.
165
 
166
  ## Citation
167
 
168
  ```bibtex
169
+ @misc{jain2026trackeverythinglonghorizondense,
170
+ title={TrackEverything: Long Horizon Dense Tracking via De-Duplicating 3D Scene Representations},
171
+ author={Ayush Jain and Sreeharsha Paruchuri and Ishita Gupta and Fan Zhang and Tanner Schmidt and Jakob Engel and Katerina Fragkiadaki and Adam W. Harley},
172
+ year={2026},
173
+ eprint={2609.30222},
174
+ archivePrefix={arXiv},
175
+ primaryClass={cs.CV},
176
+ url={https://arxiv.org/abs/2609.30222},
177
  }
178
+ ```