需单独用 gdown 从 Google Drive 下载 cut3r_512_dpt_4_64.pth 权重放到 src 下;RoPE 的 CUDA kernel 必须先在 src/croco/models/curope/ 编译,否则无法运行;demo 默认在 8080 端口启动 viser 可视化,端口被占用需改 --port
git clone https://github.com/Inception3D/TTT3R.git && cd TTT3R
conda create -n ttt3r python=3.11 cmake=3.14.0 && conda activate ttt3r
pip install -r requirements.txt
cd src/croco/models/curope/ && python setup.py build_ext --inplaceREADME 未明确说明显存要求;安装命令使用 pytorch-cuda=12.1,需按本机 CUDA 版本调整,并需编译 RoPE 的 CUDA kernel,因此需要 NVIDIA GPU
基于 CUT3R 的 3D 重建工具,用简单状态更新规则提升长序列泛化能力
给 CUT3R 这类循环式三维重建模型换了个简单的状态更新规则,让它在长序列输入下不容易崩,提升长度泛化能力。
核心能力
- 用测试时训练的状态更新规则替换 CUT3R 的循环状态更新
- 支持输入文件夹或视频,逐帧推理并输出 3D 重建结果
- 用 viser 在浏览器端口实时可视化重建结果
- 提供 reset_interval 等参数控制长序列的状态重置
- 附带 evo、open3d 的评测流程
容易踩的坑
暂无 release 数据(可能没有发版,或尚未同步)。
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Xingyu Chen, Yue Chen, Yuliang Xiu, Andreas Geiger, Anpei Chen
https://github.com/user-attachments/assets/b7583837-1f1e-43a4-b281-09f340ee5918
Getting Started
Installation
- Clone TTT3R.
git clone https://github.com/Inception3D/TTT3R.git
cd TTT3R
- Create the environment.
conda create -n ttt3r python=3.11 cmake=3.14.0
conda activate ttt3r
conda install pytorch torchvision pytorch-cuda=12.1 -c pytorch -c nvidia # use the correct version of cuda for your system
pip install -r requirements.txt
# issues with pytorch dataloader, see https://github.com/pytorch/pytorch/issues/99625
conda install 'llvm-openmp<16'
# for evaluation
pip install evo
pip install open3d
- Compile the cuda kernels for RoPE (as in CroCo v2).
cd src/croco/models/curope/
python setup.py build_ext --inplace
cd ../../../../
Download Checkpoints
CUT3R provide checkpoints trained on 4-64 views: cut3r_512_dpt_4_64.pth.
To download the weights, run the following commands:
cd src
gdown --fuzzy https://drive.google.com/file/d/1Asz-ZB3FfpzZYwunhQvNPZEUA8XUNAYD/view?usp=drive_link
cd ..
Inference Demo
To run the inference demo, you can use the following command:
# input can be a folder or a video
# the following script will run inference with TTT3R and visualize the output with viser on port 8080
CUDA_VISIBLE_DEVICES=6 python demo.py --model_path MODEL_PATH --size 512 \
--seq_path SEQ_PATH --output_dir OUT_DIR --port 8080 \
--model_update_type ttt3r --frame_interval 1 --reset_interval 100 \
--downsample_factor 1000 --vis_threshold 5.0
# Example:
CUDA_VISIBLE_DEVICES=6 python demo.py --model_path src/cut3r_512_dpt_4_64.pth --size 512 \
--seq_path examples/westlake.mp4 --output_dir tmp/taylor --port 8080 \
--model_update_type ttt3r --frame_interval 1 --reset_interval 100 \
--downsample_factor 100 --vis_threshold 6.0
CUDA_VISIBLE_DEVICES=6 python demo.py --model_path src/cut3r_512_dpt_4_64.pth --size 512 \
--seq_path examples/taylor.mp4 --output_dir tmp/taylor --port 8080 \
--model_update_type ttt3r --frame_interval 1 --reset_interval 50 \
--downsample_factor 100 --vis_threshold 10.0
Output results will be saved to output_dir.
Evaluation
Please refer to the eval.md for more details.
Acknowledgements
Our code is based on the following awesome repositories:
We thank the authors for releasing their code!
Citation
If you find our work useful, please cite:
@article{chen2025ttt3r,
title={TTT3R: 3D Reconstruction as Test-Time Training},
author={Chen, Xingyu and Chen, Yue and Xiu, Yuliang and Geiger, Andreas and Chen, Anpei},
journal={arXiv preprint arXiv:2509.26645},
year={2025}
}