Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ We **refactored the original code following the standard Python package structur

Initialization methods:
- [x] DUST3R (same method used in [InstantSplat](https://github.com/NVlabs/InstantSplat))
- [x] TTT3R (via a dedicated bridge env to avoid namespace conflicts with DUSt3R)
- [x] MAST3R (same method used in [Splatt3R](https://github.com/btsmart/splatt3r))
- [x] COLMAP Sparse reconstruct (same method used in [gaussian-splatting](https://github.com/graphdeco-inria/gaussian-splatting))
- [x] COLMAP Dense reconstruct (use `patch_match_stereo`, `stereo_fusion`, `poisson_mesher` and `delaunay_mesher` in COLMAP to reconstruct dense point cloud for initialization)
Expand All @@ -31,6 +32,16 @@ pip install --upgrade Pillow hydra-core omegaconf # deps for vggt
pip install --upgrade git+https://github.com/jytime/LightGlue.git#egg=lightglue # deps for vggt
```

Install `TTT3R` in a separate conda environment so its bundled `dust3r` package does not collide with InstantSplat's DUSt3R stack:
```shell
git clone https://github.com/Inception3D/TTT3R.git submodules/ttt3r
conda create -n instantsplat-ttt3r python=3.11 cmake=3.14.0 -y
conda run -n instantsplat-ttt3r conda install -y pytorch torchvision pytorch-cuda=12.1 -c pytorch -c nvidia
conda run -n instantsplat-ttt3r pip install -r submodules/ttt3r/requirements.txt
conda run -n instantsplat-ttt3r conda install -y "llvm-openmp<16"
conda run -n instantsplat-ttt3r bash -lc "cd submodules/ttt3r/src/croco/models/curope && python setup.py build_ext --inplace"
```

(Optional) Install `xformers` for faster Depth-Anything V2 inference:
```shell
pip install xformers
Expand Down Expand Up @@ -75,6 +86,7 @@ wget -P checkpoints/ https://huggingface.co/depth-anything/Depth-Anything-V2-Lar
wget -P checkpoints/ https://huggingface.co/facebook/VGGT-1B-Commercial/resolve/main/vggt_1B_commercial.pt --header="Authorization: Bearer $HF_TOKEN"
wget -P checkpoints/ https://download.europe.naverlabs.com/ComputerVision/MUSt3R/MUSt3R_512.pth
wget -P checkpoints/ https://download.europe.naverlabs.com/ComputerVision/Pow3R/Pow3R_ViTLarge_BaseDecoder_512_linear.pth
wget -P submodules/ttt3r/src/ https://drive.google.com/uc?id=1Asz-ZB3FfpzZYwunhQvNPZEUA8XUNAYD
```

Configs for `map-anything`:
Expand Down Expand Up @@ -102,6 +114,12 @@ python -m instantsplat.initialize -d data/sora/santorini/3_views -i vggt --with_
python -m instantsplat.train -s data/sora/santorini/3_views -d output/sora/santorini/3_views -i 1000 --init mapanything --with_depth_anything
```

TTT3R initialization example:
```shell
python -m instantsplat.initialize -d data/sora/santorini/3_views -i ttt3r
python -m instantsplat.train -s data/sora/santorini/3_views -d output/sora/santorini/3_views -i 1000 --init ttt3r
```

Depth format note:
- `Depth-Anything V2` saves inverse depth (`1 / depth`), which matches the default depth supervision used by 3DGS.
- The native depth saved by `mapanything`, `mapanything-external`, and `vggt` is regular depth, not inverse depth.
Expand Down
3 changes: 3 additions & 0 deletions instantsplat/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

default_image_folder = {
"dust3r": "images",
"ttt3r": "images",
"mast3r": "images",
"mapanything": "images",
"mapanything-external": "images",
Expand All @@ -26,6 +27,8 @@ def convert_image_path(image_path): return os.path.join(os.path.dirname(os.path.
match initializer:
case "dust3r":
constructor = Dust3rInitializer
case "ttt3r":
constructor = Ttt3rInitializer
case "mast3r":
constructor = Mast3rInitializer
case "vggt":
Expand Down
1 change: 1 addition & 0 deletions instantsplat/initializer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from .abc import AbstractInitializer, InitializingCamera, InitializedPointCloud
from .dataset import InitializedCameraDataset, TrainableCameraDataset, TrainableInitializedCameraDataset
from .dust3r import Dust3rInitializer, Mast3rInitializer
from .ttt3r import Ttt3rInitializer
from .vggt import VGGTInitializer, VGGTColmapSparseInitializer, VGGTColmapDenseInitializer
from .mapanything import MapAnythingInitializer, MapAnythingExternalInitializer
from .colmap import ColmapSparseInitializer, ColmapDenseInitializer
Expand Down
1 change: 1 addition & 0 deletions instantsplat/initializer/ttt3r/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .ttt3r import Ttt3rInitializer
Loading