Add model card for TAPIP3D
#1
by
nielsr
HF Staff
- opened
README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: depth-estimation
|
| 3 |
+
library_name: torch
|
| 4 |
+
license: mit
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# TAPIP3D: Tracking Any Point in Persistent 3D Geometry
|
| 8 |
+
|
| 9 |
+
This repository contains the TAPIP3D model as presented in [TAPIP3D: Tracking Any Point in Persistent 3D Geometry](https://huggingface.co/papers/2504.14717).
|
| 10 |
+
|
| 11 |
+
[Project Page](https://tapip3d.github.io)
|
| 12 |
+
|
| 13 |
+
Code: https://github.com/zbww/tapip3d
|
| 14 |
+
|
| 15 |
+
**Overview**
|
| 16 |
+
|
| 17 |
+
TAPIP3D is a method for long-term feed-forward 3D point tracking in monocular RGB and RGB-D video sequences. It introduces a 3D feature cloud representation that lifts image features into a persistent world coordinate space, canceling out camera motion and enabling accurate trajectory estimation across frames.
|
| 18 |
+
|
| 19 |
+
## Demo Usage
|
| 20 |
+
|
| 21 |
+
We provide a simple demo script `inference.py`, along with sample input data located in the `demo_inputs/` directory. The script accepts as input either an `.mp4` video file or an `.npz` file. If providing an `.npz` file, it should follow the following format:
|
| 22 |
+
|
| 23 |
+
- `video`: array of shape (T, H, W, 3), dtype: uint8
|
| 24 |
+
- `depths` (optional): array of shape (T, H, W), dtype: float32
|
| 25 |
+
- `intrinsics` (optional): array of shape (T, 3, 3), dtype: float32
|
| 26 |
+
- `extrinsics` (optional): array of shape (T, 4, 4), dtype: float32
|
| 27 |
+
|
| 28 |
+
For demonstration purposes, the script uses a 32x32 grid of points at the first frame as queries.
|
| 29 |
+
|
| 30 |
+
### Inference with Monocular Video
|
| 31 |
+
|
| 32 |
+
By providing a video as `--input_path`, the script first runs [MegaSAM](https://github.com/mega-sam/mega-sam) with [MoGe](https://wangrc.site/MoGePage/) to estimate depth maps and camera parameters. Subsequently, the model will process these inputs within the global frame.
|
| 33 |
+
|
| 34 |
+
To run inference:
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
python inference.py --input_path demo_inputs/sheep.mp4 --checkpoint checkpoints/tapip3d_final.pth --resolution_factor 2
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
An npz file will be saved to `outputs/inference/`. To visualize the results:
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
python visualize.py <result_npz_path>
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
### Inference with Known Depths and Camera Parameters
|
| 47 |
+
|
| 48 |
+
If an `.npz` file containing all four keys (`rgb`, `depths`, `intrinsics`, `extrinsics`) is provided, the model will operate in an aligned global frame, generating point trajectories in world coordinates.
|
| 49 |
+
|
| 50 |
+
## Citation
|
| 51 |
+
|
| 52 |
+
If you find this project useful, please consider citing:
|
| 53 |
+
|
| 54 |
+
```
|
| 55 |
+
@article{tapip3d,
|
| 56 |
+
title={TAPIP3D: Tracking Any Point in Persistent 3D Geometry},
|
| 57 |
+
author={Zhang, Bowei and Ke, Lei and Harley, Adam W and Fragkiadaki, Katerina},
|
| 58 |
+
journal={arXiv preprint arXiv:2504.14717},
|
| 59 |
+
year={2025}
|
| 60 |
+
}
|
| 61 |
+
```
|