ayushjain1144 commited on
Commit
20334bc
·
verified ·
1 Parent(s): 7296950

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +128 -0
README.md CHANGED
@@ -1,3 +1,131 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ tags:
4
+ - 3d-tracking
5
+ - point-tracking
6
+ - video
7
+ - depth-estimation
8
+ - monocular-video
9
+ - 3d-reconstruction
10
+ library_name: tapip3d
11
+ pipeline_tag: video-classification
12
  ---
13
+
14
+ # TrackEverything (AllTrack3r)
15
+
16
+ Dense 3D point tracking in monocular video. Tracks all points in persistent 3D world-coordinate geometry.
17
+
18
+ Built on [TAPIP3D: Tracking Any Point in Persistent 3D Geometry](https://arxiv.org/abs/2504.14717).
19
+
20
+ ## Quick Start
21
+
22
+ ```python
23
+ from tapip3d_internal.demo_hf import TrackEverything
24
+
25
+ # Load model from HuggingFace Hub
26
+ model = TrackEverything.from_pretrained("katefgroup/TrackEverything")
27
+
28
+ # Run on a video file (Pi3 estimates geometry automatically)
29
+ results = model.infer(video="path/to/video.mp4")
30
+
31
+ # Dense 3D tracks
32
+ print(results.coords.shape) # (B, T_src, H, W, T_tgt, 3)
33
+ print(results.visibs.shape) # (B, T_src, H, W, T_tgt)
34
+ print(results.dynamic_logits.shape) # (B, T_src, H, W, T_tgt)
35
+ ```
36
+
37
+ ## Installation
38
+
39
+ ```bash
40
+ # Clone the repo
41
+ git clone https://github.com/katefgroup/tapip3d_internal.git
42
+ cd tapip3d_internal
43
+
44
+ # Install dependencies
45
+ conda create -n alltracker python=3.10 -y
46
+ pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu129
47
+ pip install omegaconf hydra-core einops rich transformers tqdm numpy opencv-python av huggingface_hub
48
+ pip install torch_scatter -f https://data.pyg.org/whl/torch-2.8.0+cu129.html
49
+ ```
50
+
51
+ ## Input Options
52
+
53
+ ```python
54
+ # Video file
55
+ results = model.infer(video="path/to/video.mp4")
56
+
57
+ # Folder of images
58
+ results = model.infer(video="path/to/frames/")
59
+
60
+ # URL to a video
61
+ results = model.infer(video="https://example.com/video.mp4")
62
+
63
+ # Numpy array (T, H, W, 3) uint8 RGB
64
+ results = model.infer(video=frames_array)
65
+
66
+ # Subsampling
67
+ results = model.infer(video="video.mp4", frame_stride=3, max_frames=32)
68
+ ```
69
+
70
+ ## Providing Your Own Geometry (Skip Pi3)
71
+
72
+ If you already have depths, camera intrinsics, and extrinsics, pass them directly to skip Pi3:
73
+
74
+ ```python
75
+ results = model.infer(
76
+ video="path/to/video.mp4",
77
+ depths=depths, # (T, H, W) numpy float32 or torch tensor
78
+ intrinsics=intrinsics, # (T, 3, 3) camera intrinsic matrices
79
+ extrinsics=extrinsics, # (T, 4, 4) world-to-camera extrinsic matrices
80
+ )
81
+ ```
82
+
83
+ ## 2D Query Points
84
+
85
+ Supply query points as `[frame_index, x_pixel, y_pixel]`. They are automatically unprojected to 3D:
86
+
87
+ ```python
88
+ results = model.infer(
89
+ video="path/to/video.mp4",
90
+ query_points_2d=[
91
+ [0, 100, 200], # frame 0, pixel (100, 200)
92
+ [5, 150, 300], # frame 5, pixel (150, 300)
93
+ ],
94
+ )
95
+
96
+ print(results.query_coords.shape) # (B, T, N, 3)
97
+ print(results.query_visibs.shape) # (B, T, N)
98
+ ```
99
+
100
+ ## Output
101
+
102
+ `model.infer()` returns a `TrackEverythingOutput` dataclass:
103
+
104
+ | Field | Shape | Description |
105
+ |-------|-------|-------------|
106
+ | `coords` | `(B, T_src, H, W, T_tgt, 3)` | Dense 3D tracks in world frame |
107
+ | `visibs` | `(B, T_src, H, W, T_tgt)` | Visibility masks |
108
+ | `dynamic_logits` | `(B, T_src, H, W, T_tgt)` | Static/dynamic logits |
109
+ | `query_coords` | `(B, T, N, 3)` | Query point 3D positions (if provided) |
110
+ | `query_visibs` | `(B, T, N)` | Query point visibility (if provided) |
111
+ | `norm_factor` | `float` | Applied scene normalization factor |
112
+ | `depths` | `(T, H, W)` | Preprocessed depth maps |
113
+ | `intrinsics` | `(T, 3, 3)` | Camera intrinsics at inference resolution |
114
+ | `extrinsics` | `(T, 4, 4)` | Extrinsics after normalization |
115
+
116
+ ## Checkpoint Format
117
+
118
+ The checkpoint (`.pth`) contains:
119
+ - `cfg`: dict with `model` config name and `resolution` (image_size)
120
+ - `weight`: model state_dict
121
+
122
+ ## Citation
123
+
124
+ ```bibtex
125
+ @article{tapip3d,
126
+ title={TAPIP3D: Tracking Any Point in Persistent 3D Geometry},
127
+ author={Zhang, Bowei and Ke, Lei and Harley, Adam W and Fragkiadaki, Katerina},
128
+ journal={arXiv preprint arXiv:2504.14717},
129
+ year={2025}
130
+ }
131
+ ```