Point Tracking for 4DGS
This repo is the point tracking Python extension for 4D Gaussian Splatting. It wraps sequence point trackers such as CoTracker3, VGGT, MV-TAP, OpenD4RT, MV-RoMa, UniFlowMatch, and torchvision RAFT behind one small registry, then applies them either to plain image sequences or to multi-timestep Gaussian Splatting camera datasets.
The package provides three common workflows:
- track sampled 2D points through one ordered image sequence
- project 3D Gaussians into a reference timestep, track those projected points across all timesteps, and attach the resulting tracks back to Gaussian Splatting camera datasets
- build supervision samples (query, frames, and per-view tracks) from camera datasets, a trained 3DGS point cloud, or a Blender scene, and save them for later training
Features
- [x] Organised as a standard Python package with
pip install support
- [x] Shared point tracker registry with
cotracker3, vggt, vggsfm, mvtap, d4rt, mvroma, ufm-base, ufm-refine, ufm-base-980, ufm-refine-980, ufm-base-dinov2l, ufm-base-dinov2g, raft, dot, and blender
- [x] Single-view image sequence tracking and rendering
- [x] Multi-timestep Gaussian Splatting camera dataset tracking
- [x] Point batching inside trackers that take a constructor
batch_size
- [x] Camera dataset reordering against a selected reference timestep
- [x] Blender mesh tracking for scenes rendered by NVS2COLMAP
- [x] Supervision datasets (
tracker, gstracker, blender) that save query, frames, and tracks
- [ ] Port the motion estimation workflow from TrackerSplat for point-tracker-driven motion synthesis
- [ ] Regularize 3DGS training with point tracker trajectories
Install
Prerequisites
pip install track-4dgs also installs Pillow, einops, timm, PyYAML, numpy, opencv-python, warp-lang, huggingface_hub, safetensors, hydra-core, and omegaconf.
The published wheel leaves out Git dependencies. Install them for the trackers that need them:
pip install wheel setuptools
pip install --upgrade "gaussian-splatting>=2.12.0"
# cotracker3
pip install --upgrade git+https://github.com/facebookresearch/co-tracker.git@main
# VGGT COLMAP demo only. vggt and vggsfm point tracking do not import LightGlue.
pip install --upgrade "git+https://github.com/jytime/LightGlue.git#egg=lightglue"
# uniflowmatch and mvroma
pip install --upgrade "git+https://github.com/castacks/UniCeption.git@ee7fa0b50d8295b3f0485e42c1d133fb534bfce7"
mvroma, uniflowmatch, dot, and vggt ship inside this package. Their source trees are the submodules/MV-RoMa, submodules/UFM, submodules/dot, and submodules/vggt submodules, so a source install needs git clone --recursive.
If you have trouble with gaussian-splatting, try installing it from source:
pip install wheel setuptools
pip install --upgrade git+https://github.com/yindaheng98/gaussian-splatting.git@master --no-build-isolation
PyPI Install
pip install --upgrade track-4dgs
or build latest from source:
pip install wheel setuptools
pip install --upgrade git+https://github.com/yindaheng98/track-4dgs.git@master --no-build-isolation
Development Install
git clone --recursive https://github.com/yindaheng98/track-4dgs.git
cd track-4dgs
pip install --target . --upgrade . --no-deps
--no-deps skips everything in Prerequisites. Install those packages first.
Download Checkpoints
CoTracker3 offline checkpoint (cotracker3, default checkpoints/scaled_offline.pth):
mkdir -p checkpoints
wget -P checkpoints https://huggingface.co/facebook/cotracker3/resolve/main/scaled_offline.pth
DOT (dot). -m model="'dot'" uses the CoTracker2 initializer. Other names are cotracker3, tapir, and bootstapir. cotracker3 reuses checkpoints/scaled_offline.pth from the download above. The RAFT estimator and refiner are shared:
mkdir -p checkpoints
wget -P checkpoints https://huggingface.co/16lemoing/dot/resolve/main/cvo_raft_patch_8.pth
wget -P checkpoints https://huggingface.co/16lemoing/dot/resolve/main/movi_f_raft_patch_4_alpha.pth
wget -P checkpoints https://huggingface.co/16lemoing/dot/resolve/main/movi_f_cotracker2_patch_4_wind_8.pth
wget -P checkpoints https://huggingface.co/16lemoing/dot/resolve/main/panning_movi_e_tapir.pth
wget -P checkpoints https://huggingface.co/16lemoing/dot/resolve/main/panning_movi_e_plus_bootstapir.pth
VGGT commercial checkpoint (vggt, default checkpoints/vggt_1B_commercial.pt):
mkdir -p checkpoints
wget -P checkpoints https://huggingface.co/facebook/VGGT-1B-Commercial/resolve/main/vggt_1B_commercial.pt --header="Authorization: Bearer $HF_TOKEN"
If the VGGT checkpoint is not present, VGGTPointTracker falls back to VGGT.from_pretrained("facebook/VGGT-1B"). VGGT reads query features from frame 0, so every query frame index must be 0.
VGGSfM tracker checkpoint (vggsfm, default checkpoints/vggsfm_v2_tracker.pt):
mkdir -p checkpoints
wget -P checkpoints https://huggingface.co/facebook/VGGSfM/resolve/main/vggsfm_v2_tracker.pt
If the checkpoint is not present, load_vggsfm downloads it from that URL.
MV-TAP checkpoint (mvtap, default checkpoints/mvtap.ckpt, from the MV-TAP release):
mkdir -p checkpoints
# save the downloaded file as checkpoints/mvtap.ckpt
MV-RoMa checkpoint (mvroma, default checkpoints/outdoor_final.pth, from the MV-RoMa release). Indoor weights are here. The tracker also downloads infinity1096/UFM-Refine as its prematcher. It runs on CUDA and accepts at most 31 reference frames.
mkdir -p checkpoints
# save the downloaded file as checkpoints/outdoor_final.pth
UniFlowMatch downloads a Hugging Face repo on first use. Each checkpoint is its own tracker: ufm-base (infinity1096/UFM-Base), ufm-refine (infinity1096/UFM-Refine), ufm-base-980 (infinity1096/UFM-Base-980), ufm-refine-980 (infinity1096/UFM-Refine-980), ufm-base-dinov2l (infinity1096/UFM-Base-DINOv2L-init), and ufm-base-dinov2g (infinity1096/UFM-Base-DINOv2G-init).
RAFT (raft) uses torchvision raft_large (optical flow tutorial). Weights download on first use. -m model="'small'" selects raft_small. -m num_flow_updates=12 is the iteration count; the last flow is the track. -m max_resolution=512 shrinks a frame only when its long side is above 512. Smaller frames keep their own size. The model has no input resize of its own, and its correlation volume is quadratic in the resolution it receives.
OpenD4RT checkpoint and model config (d4rt, default checkpoints/OpenD4RT_48CLIP_9Mix_NoCropAUG/opend4rt.ckpt):
# 48-frame model
mkdir -p checkpoints/OpenD4RT_48CLIP_9Mix_NoCropAUG
wget -P checkpoints/OpenD4RT_48CLIP_9Mix_NoCropAUG https://huggingface.co/Lijiaxin0111/OpenD4RT/resolve/main/checkpoints/OpenD4RT_48CLIP_9Mix_NoCropAUG/opend4rt.ckpt
wget -P checkpoints/OpenD4RT_48CLIP_9Mix_NoCropAUG https://huggingface.co/Lijiaxin0111/OpenD4RT/resolve/main/checkpoints/OpenD4RT_48CLIP_9Mix_NoCropAUG/model.yaml
# 32-frame model
mkdir -p checkpoints/OpenD4RT_32CLIP_9Dataset_NoAUG
wget -P checkpoints/OpenD4RT_32CLIP_9Dataset_NoAUG https://huggingface.co/Lijiaxin0111/OpenD4RT/resolve/main/checkpoints/OpenD4RT_32CLIP_9Dataset_NoAUG/opend4rt.ckpt
wget -P checkpoints/OpenD4RT_32CLIP_9Dataset_NoAUG https://huggingface.co/Lijiaxin0111/OpenD4RT/resolve/main/checkpoints/OpenD4RT_32CLIP_9Dataset_NoAUG/model.yaml
Each model requires both opend4rt.ckpt and its adjacent model.yaml. Pass either the checkpoint file or its containing directory through the checkpoint tracker option.
Download Datasets
DexYCB (CC BY-NC 4.0). Download the per-folder archives from the project page. Each subject is 12G. bop.tar.gz is 1.2G, models.tar.gz is 1.4G, and calibration.tar.gz is 16K. gdown downloads each Google Drive file. The loop extracts every archive into data/dex-ycb. That directory is DEX_YCB_DIR for dex-ycb-toolkit: 20200709-subject-01/ through 20201022-subject-10/, plus calibration/ and models/.
pip install gdown
mkdir -p data/dex-ycb
while read -r name id; do
[ -n "$name" ] || continue
gdown "$id" -O "data/dex-ycb/$name" &&
tar -C data/dex-ycb -zxvf "data/dex-ycb/$name"
done <<'EOF'
20200709-subject-01.tar.gz 1Ehh92wDE3CWAiKG7E9E73HjN2Xk2XfEk
20200813-subject-02.tar.gz 1Uo7MLqTbXEa-8s7YQZ3duugJ1nXFEo62
20200820-subject-03.tar.gz 1FkUxas8sv8UcVGgAzmSZlJw1eI5W5CXq
20200903-subject-04.tar.gz 14up6qsTpvgEyqOQ5hir-QbjMB_dHfdpA
20200908-subject-05.tar.gz 1NBA_FPyGWOQF5-X9ueAat5g8lDMz-EmS
20200918-subject-06.tar.gz 1UWIN2-wOBZX2T0dkAi4ctAAW8KffkXMQ
20200928-subject-07.tar.gz 1oWEYD_o3PVh39pLzMlJcArkDtMj4nzI0
20201002-subject-08.tar.gz 1GTNZwhWbs7Mfez0krTgXwLPndvrw1Ztv
20201015-subject-09.tar.gz 1j0BLkaCjIuwjakmywKdOO9vynHTWR0UH
20201022-subject-10.tar.gz 1FvFlRfX-p5a5sAWoKEGc17zKJWwKaSB-
bop.tar.gz 1CPqLjsaYNjE3xSJbuWmqaMsGvyGIxiKL
calibration.tar.gz 1UAwVKT4Rgb1fLcFoa1o71_-0NtSvvLAQ
models.tar.gz 1cAzlQBpcTatI5ykYQ8ziQiHLUG_a_UpM
EOF
Harmony4D (project page, download notes). Each sequence has about 20 synchronized exo GoPro cameras. The repo is about 352G of zip archives under train/ and test/, licensed under MIT. hf download writes them to data/harmony4d. Install the Hugging Face CLI if hf is not on PATH.
mkdir -p data/harmony4d
hf download Jyun-Ting/Harmony4D --type dataset --local-dir data/harmony4d
One sequence is the same command with --include. train/04_sword is split across train/04_sword_part1.zip and train/04_sword_part2.zip.
hf download Jyun-Ting/Harmony4D --type dataset --include "train/01_hugging.zip" --local-dir data/harmony4d
Unzip each archive inside train/ or test/. The download notes expect one sequence folder per activity:
for z in data/harmony4d/train/*.zip data/harmony4d/test/*.zip; do
unzip -n -d "$(dirname "$z")" "$z"
done
data/harmony4d/
├── train/
│ ├── 01_hugging/
│ ├── 02_grappling/
│ └── ...
└── test/
├── 01_hugging/
├── 03_grappling2/
└── ...
CMU Panoptic Studio (ver 1.2 sequence list) is released for non-commercial research use. The released set is 84 sequences under http://domedb.perception.cs.cmu.edu/webdata/dataset/<sequence>/: range of motion, haggling, musical instruments, ultimatum, mafia, dance, toddler, office, and pizza. 171204_pose1_sample is a short clip of 171204_pose1 (31 HD videos, 271MB, no VGA). The dataset browser also lists later sequences; add a name to the loop to fetch it from the same paths. If the CMU host does not answer, replace http://domedb.perception.cs.cmu.edu with http://vcl.snu.ac.kr/panoptic.
PanopticSpec.load reads calibration_<sequence>.json, hdPose3d_stage1_coco19/body3DScene_XXXXXXXX.json, and videos/hd_shared_crf20/hd_00_00.mp4 through hd_00_30.mp4. The loop keeps the 53 sequences where that coco19 archive contains the body jsons and all 31 HD videos are on the host.
170224_haggling_a1 is left out because hdPose3d_stage1_coco19.tar is a 10KB archive of an empty directory. 171204_pose3, 171204_pose4, and 171204_pose5 have no hd_00_20.mp4. 171204_pose6 and 160224_haggling1 have no hd_00_21.mp4. 160422_haggling1 has no hd_00_20.mp4 or hd_00_21.mp4. Calibration for those six still names the missing cameras.
These sequences have no hdPose3d_stage1_coco19.tar: 171026_cello1, 171026_cello2, 160226_ultimatum1, 160224_ultimatum1, 160224_ultimatum2, 160422_mafia2, 160226_mafia1, 160226_mafia2, 160224_mafia1, 160224_mafia2, 170307_dance1, 170307_dance2, 170307_dance3, 170307_dance4, 170307_dance6, 170915_toddler2, 170915_toddler3, 170915_toddler4, 160401_ian1, 160401_ian2, 160401_ian3, 160317_moonbaby1, 160317_moonbaby2, and 160317_moonbaby3. 160226_ultimatum1, 160224_ultimatum1, 160224_ultimatum2, the five mafia sequences, 170307_dance1, and 160401_ian1 through 160401_ian3 publish hdPose3d_stage1.tar and vgaPose3d_stage1.tar instead. 160317_moonbaby1 publishes vgaPose3d_stage1.tar. The three moonbaby sequences have no HD videos.
Each sequence is saved under data/panoptic/<sequence>/. calibration_<sequence>.json and videos/hd_shared_crf20/hd_00_00.mp4 through hd_00_30.mp4 are written as files. hdPose3d_stage1_coco19.tar, hdFace3d.tar, hdHand3d.tar, and hdMeshTrack_face.tar are piped to tar and extracted in that directory. 161029_piano2, 161029_piano3, 160906_band1, 160906_band2, 160906_band3, 160906_ian2, 160906_ian3, and 160906_ian5 have no face or hand archive. This loop skips VGA. It needs wget and tar. Videos stay mp4. A missing file makes wget fail; a partial saved file is deleted, and the loop continues. The 271MB figure above is the sample's compressed HD video.
mkdir -p data/panoptic
set -o pipefail
while read -r seq; do
[ -n "$seq" ] || continue
mkdir -p "data/panoptic/$seq/videos/hd_shared_crf20"
wget --tries=2 --timeout=60 -O - \
"http://domedb.perception.cs.cmu.edu/webdata/dataset/$seq/hdPose3d_stage1_coco19.tar" \
| tar -C "data/panoptic/$seq" -xf - \
|| true
wget --tries=2 --timeout=60 -O - \
"http://domedb.perception.cs.cmu.edu/webdata/dataset/$seq/hdFace3d.tar" \
| tar -C "data/panoptic/$seq" -xf - \
|| true
wget --tries=2 --timeout=60 -O - \
"http://domedb.perception.cs.cmu.edu/webdata/dataset/$seq/hdHand3d.tar" \
| tar -C "data/panoptic/$seq" -xf - \
|| true
wget --tries=2 --timeout=60 -O - \
"http://domedb.perception.cs.cmu.edu/webdata/dataset/$seq/hdMeshTrack_face.tar" \
| tar -C "data/panoptic/$seq" -xf - \
|| true
wget -c --tries=2 --timeout=60 \
-O "data/panoptic/$seq/calibration_$seq.json" \
"http://domedb.perception.cs.cmu.edu/webdata/dataset/$seq/calibration_$seq.json" \
|| rm -f "data/panoptic/$seq/calibration_$seq.json"
for i in $(seq -w 0 30); do
wget -c --tries=2 --timeout=60 \
-O "data/panoptic/$seq/videos/hd_shared_crf20/hd_00_$i.mp4" \
"http://domedb.perception.cs.cmu.edu/webdata/dataset/$seq/videos/hd_shared_crf20/hd_00_$i.mp4" \
|| rm -f "data/panoptic/$seq/videos/hd_shared_crf20/hd_00_$i.mp4"
done
done <<'EOF'
160906_ian5
160906_ian3
160906_ian2
160906_ian1
170407_office2
EOF
Command-Line Usage
List Registered Point Trackers
Verify that track_4dgs can import and register trackers:
python -c "import track_4dgs; print(track_4dgs.get_available_point_trackers())"