Skip to main content

packaged InstantSplat

PyPI version Downloads Total downloads CI CI

This repo is the refactored python training and inference code for InstantSplat. Forked from commit 2c5006d41894d06464da53d5495300860f432872. We refactored the original code following the standard Python package structure, while keeping the algorithms used in the code identical to the original version.

Initialization methods:

  • DUST3R (same method used in InstantSplat)
  • MAST3R (same method used in Splatt3R)
  • COLMAP Sparse reconstruct (same method used in gaussian-splatting)
  • COLMAP Dense reconstruct (use patch_match_stereo, stereo_fusion, poisson_mesher and delaunay_mesher in COLMAP to reconstruct dense point cloud for initialization)
  • Masking during COLMAP feature extraction and dense fusion. See File layout.
  • VGGT
  • VGG-T³
  • VGGT/VGG-T³ + Colmap Bundle Adjustment with COLMAP needs point tracking implemented on AbstractViewPointTracker from track-4dgs.
  • Map-Anything and Map-Anything with external pose/depth priors

Prerequisites

  • Pytorch (v2.4 or higher recommended)
  • CUDA Toolkit (12.4 recommended, should match with PyTorch version)

Install a colmap executable, e.g. using conda:

conda install conda-forge::colmap

Install mapanything and vggt:

pip install --upgrade "mapanything[all] @ git+https://github.com/facebookresearch/map-anything.git@main"
pip install --upgrade git+https://github.com/facebookresearch/vggt.git@main
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

(Optional) Install xformers for faster Depth-Anything V2 inference:

pip install xformers

(Optional) If you have trouble with gaussian-splatting or track-4dgs, try to install it from source:

pip install wheel setuptools
pip install --upgrade git+https://github.com/yindaheng98/gaussian-splatting.git@master --no-build-isolation
pip install --upgrade https://github.com/yindaheng98/track-4dgs --no-build-isolation

PyPI Install

pip install --upgrade instantsplat

or build latest from source:

pip install wheel setuptools
pip install --upgrade git+https://github.com/yindaheng98/InstantSplat.git@main --no-build-isolation

Development Install

git clone --recursive https://github.com/yindaheng98/InstantSplat
cd InstantSplat
pip install --target . --upgrade --no-deps . --no-build-isolation

Download model

wget -P checkpoints/ https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_224_linear.pth
wget -P checkpoints/ https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_linear.pth
wget -P checkpoints/ https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth
wget -P checkpoints/ https://download.europe.naverlabs.com/ComputerVision/MASt3R/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth
wget -P checkpoints/ https://huggingface.co/depth-anything/Depth-Anything-V2-Small/resolve/main/depth_anything_v2_vits.pth
wget -P checkpoints/ https://huggingface.co/depth-anything/Depth-Anything-V2-Base/resolve/main/depth_anything_v2_vitb.pth
wget -P checkpoints/ https://huggingface.co/depth-anything/Depth-Anything-V2-Large/resolve/main/depth_anything_v2_vitl.pth
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

Configs for map-anything:

git clone --depth 1 --filter=blob:none --sparse https://github.com/facebookresearch/map-anything.git /tmp/map-anything-configs
git -C /tmp/map-anything-configs sparse-checkout set configs
cp -r /tmp/map-anything-configs/configs ./
rm -rf /tmp/map-anything-configs

File layout

<name>.jpg is the image path relative to the image folder, including its extension and any subdirectory. images/foo/bar.jpg pairs with image_masks/foo/bar.jpg.png, depths/foo/bar.jpg.tiff, and depth_masks/foo/bar.jpg.tiff. Lists are collected with os.walk. Training reads the written scene as a gaussian-splatting dataset.

Input: images/

dust3r, mast3r, mapanything, mapanything-external, vggt, vggttt:

<data>/
  images/
    <name>.jpg
  image_masks/                 # optional
    <name>.jpg.png

Input: input/

colmap-sparse, colmap-dense, dust3r-align-colmap-sparse, dust3r-align-colmap-dense:

<data>/
  input/
    <name>.jpg
  feature_mask/                # optional; COLMAP feature extraction only
    <name>.jpg.png
  input_mask/                  # optional; undistorted into image_masks/
    <name>.jpg.png

feature_mask and input_mask are independent. A missing mask is skipped.

Output: no depth

dust3r, mast3r, colmap-sparse, dust3r-align-colmap-sparse:

<data>/
  images/
    <name>.jpg
  image_masks/                 # only when an input mask was provided
    <name>.jpg.png
  sparse/0/
    cameras.bin                # cameras.txt is also accepted when training
    images.bin
    points3D.ply               # if missing, points3D.bin then points3D.txt

Output: depth

vggt, vggttt, mapanything, mapanything-external, colmap-dense, dust3r-align-colmap-dense. Same as above, plus:

<data>/
  depths/
    <name>.jpg.tiff
    <name>.jpg.png             # uint8 preview; the loader uses the tiff when both exist
  depth_masks/
    <name>.jpg.tiff

--with_depth_anything adds these depth files for any initializer. That depth is inverse depth. The initializers in this section otherwise write regular depth. See Running.

Running

  1. Initialize coarse point cloud and jointly train 3DGS & cameras
# Option 1: init and train in one command
python -m instantsplat.train -s data/sora/santorini/3_views -d output/sora/santorini/3_views -i 1000 --init dust3r
# Option 2: init and train in two separate commands
python -m instantsplat.initialize -d data/sora/santorini/3_views -i dust3r # init coarse point and save as a Colmap workspace at data/sora/santorini/3_views
python -m instantsplat.train -s data/sora/santorini/3_views -d output/sora/santorini/3_views -i 1000 # train

To enable the optional auto-scaled Depth-Anything V2 wrapper for any initializer, add --with_depth_anything:

python -m instantsplat.initialize -d data/sora/santorini/3_views -i vggt --with_depth_anything
python -m instantsplat.train -s data/sora/santorini/3_views -d output/sora/santorini/3_views -i 1000 --init mapanything --with_depth_anything

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, vggt, vggttt, and COLMAP dense reconstruction is regular depth, not inverse depth.
  • When training from those native depth maps without --with_depth_anything, add -o depth_ground_truth_is_inversed=False.

Example:

python -m instantsplat.train -s data/sora/santorini/3_views -d output/sora/santorini/3_views -i 1000 --init vggt -o depth_ground_truth_is_inversed=False
python -m instantsplat.train -s data/sora/santorini/3_views -d output/sora/santorini/3_views -i 1000 --init mapanything-external -o depth_ground_truth_is_inversed=False

VGG-T³ initialization

vggttt initializes cameras, a point cloud, and native depth maps. Put images in <scene>/images.

The model weights are downloaded automatically from nvidia/vgg-ttt on first use. For a source checkout, clone with --recursive as shown in Development Install so that the submodules/vgg-ttt submodule is available.

python -m instantsplat.initialize -d data/my_scene -i vggttt

The VGG-T³ inference options can be passed with -o:

python -m instantsplat.initialize -d data/my_scene -i vggttt \
  -o num_ttt_steps=2 \
  -o memory_efficient_inference=True \
  -o use_global_pred=True

VGG-T³ saves regular depth rather than inverse depth. When training without --with_depth_anything, use:

python -m instantsplat.train -s data/my_scene -d output/my_scene -i 1000 \
  --init vggttt -o depth_ground_truth_is_inversed=False

VGG-T³ code and weights are subject to the NVIDIA OneWay Noncommercial License.

  1. Render it
python -m gaussian_splatting.render -s data/sora/santorini/3_views -d output/sora/santorini/3_views -i 1000 --load_camera output/sora/santorini/3_views/cameras.json

See .vscode\launch.json for more command examples.

Usage

See instantsplat.initialize, instantsplat.train and gaussian_splatting.render for full example.

Also check yindaheng98/gaussian-splatting for more detail of training process.

Gaussian models

Use CameraTrainableGaussianModel in yindaheng98/gaussian-splatting

Dataset

Use TrainableCameraDataset in yindaheng98/gaussian-splatting

Initialize coarse point cloud and cameras

from instantsplat.initializer import Dust3rInitializer
image_path_list = sorted(
    os.path.join(dirpath, filename)
    for dirpath, _, filenames in os.walk(image_folder)
    for filename in filenames
)
initializer = Dust3rInitializer(...).to(args.device) # see instantsplat/initializer/dust3r/dust3r.py for full options
initialized_point_cloud, initialized_cameras = initializer(image_path_list, destination)

Create camera dataset from initialized cameras:

from instantsplat.initializer import TrainableInitializedCameraDataset
dataset = TrainableInitializedCameraDataset(initialized_cameras).to(device)

Initialize 3DGS from initialized coarse point cloud:

gaussians.create_from_pcd(initialized_point_cloud.points, initialized_point_cloud.colors)

Training

Trainer jointly optimize the 3DGS parameters and cameras, without densification

from instantsplat.trainer import Trainer
trainer = Trainer(
    gaussians,
    dataset=dataset,
    ... # see instantsplat/trainer/trainer.py for full options
)

InstantSplat: Sparse-view SfM-free Gaussian Splatting in Seconds

arXiv Gradio Home PageX youtube youtube

This repository is the official implementation of InstantSplat, an sparse-view, SfM-free framework for large-scale scene reconstruction method using Gaussian Splatting. InstantSplat supports 3D-GS, 2D-GS, and Mip-Splatting.

Free-view Rendering

https://github.com/zhiwenfan/zhiwenfan.github.io/assets/34684115/748ae0de-8186-477a-bab3-3bed80362ad7

TODO List

  • Confidence-aware Point Cloud Downsampling
  • Support 2D-GS
  • Support Mip-Splatting

Acknowledgement

This work is built on many amazing research works and open-source projects, thanks a lot to all the authors for sharing!

Citation

If you find our work useful in your research, please consider giving a star ⭐ and citing the following paper 📝.

@misc{fan2024instantsplat,
        title={InstantSplat: Unbounded Sparse-view Pose-free Gaussian Splatting in 40 Seconds},
        author={Zhiwen Fan and Wenyan Cong and Kairun Wen and Kevin Wang and Jian Zhang and Xinghao Ding and Danfei Xu and Boris Ivanovic and Marco Pavone and Georgios Pavlakos and Zhangyang Wang and Yue Wang},
        year={2024},
        eprint={2403.20309},
        archivePrefix={arXiv},
        primaryClass={cs.CV}
      }

Metadata

Release files for instantsplat 1.17.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for instantsplat 1.17.4
File Size Uploaded
instantsplat-1.17.4.tar.gz 379.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for instantsplat 1.17.4
File
instantsplat-1.17.4-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
instantsplat-1.17.4-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
instantsplat-1.17.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
instantsplat-1.17.4-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
instantsplat-1.17.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details

Total release size: 10.3 MB

Release files / instantsplat-1.17.4.tar.gz

Download URL instantsplat-1.17.4.tar.gz
Size 379.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8cf5e16d1cbce6c76545f853fd37a5bb7f2de0d1c701be86202d86086c231f46
BLAKE2b-256 checksum
How to use checksums
d5c594f8d5aa6d4179d74c88a81674475355a0f044c9e5db1310ccd4a0339e6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / instantsplat-1.17.4-cp312-cp312-win_amd64.whl

Download URL instantsplat-1.17.4-cp312-cp312-win_amd64.whl
Size 598.8 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
db723268b1dd8ccba12b6a8c4ce244e0a7304f58cc816357d1f2029d55d48992
BLAKE2b-256 checksum
How to use checksums
e044b2becc6ba2cdb3bd94460702a5d2c308ea7beaa7c907be8f5a0685d7586c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / instantsplat-1.17.4-cp311-cp311-win_amd64.whl

Download URL instantsplat-1.17.4-cp311-cp311-win_amd64.whl
Size 598.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
1b1ba85ba31f8c7c3d4161d90ed02a630a0a7d352926e6fb34c74f4339133406
BLAKE2b-256 checksum
How to use checksums
fc50d0b5783ad90f6c9fcca301b23e6cb39dcf49eae53a36ccac9ecc67b9f162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / instantsplat-1.17.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL instantsplat-1.17.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 4.1 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9ff25fc5cfeede79b17c503565ceed530d54acbd6a67ac8d323fcc620a1a24ed
BLAKE2b-256 checksum
How to use checksums
53f1aa5e6d7c8e19da3f440151a463ea0e4b7dc2b643f06119aa6d82827121f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / instantsplat-1.17.4-cp310-cp310-win_amd64.whl

Download URL instantsplat-1.17.4-cp310-cp310-win_amd64.whl
Size 597.8 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
abd38911ca702e93fa6a52b88b89e8febeca6bd291686253a274f97fb9c4f22e
BLAKE2b-256 checksum
How to use checksums
363f88c7e366baec007f00bd0e52377a58c9c2d39064f86be47b67efc6b8b35e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / instantsplat-1.17.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL instantsplat-1.17.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 4.1 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
89a9ad760c89298c789851ccd16b52112a744411ba37b05b3d2d66537ab84333
BLAKE2b-256 checksum
How to use checksums
0b6e0fd1314a7f32ae3c2c763e02b209a956cbb3ce0f5bdd7b735742164c19d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.17.4 This release

6 release files

1.16.2

6 release files

1.15.5

6 release files

1.15.4

6 release files

1.15.3

6 release files

1.10.0

4 release files

1.9.2

4 release files

1.9.1

4 release files

1.9.0

4 release files

1.8.7

6 release files

1.8.6

6 release files

1.8.5

6 release files

1.8.4

6 release files

1.8.3

6 release files

1.8.2

6 release files

1.8.1

6 release files

1.8.0

6 release files

1.7.1

6 release files

1.7.0

6 release files

1.6.11

8 release files

1.6.10

6 release files

1.6.9

6 release files

1.6.8

4 release files

1.6.7

4 release files

1.6.6

4 release files

1.6.5

4 release files

1.6.4

4 release files

1.6.3

4 release files

1.6.2

4 release files

1.6.1

4 release files

1.6.0

4 release files

1.5.1

4 release files

1.5.0

4 release files

1.4.9

4 release files

1.4.8

4 release files

1.4.7

4 release files

1.4.6

4 release files

1.4.5

4 release files

1.4.4

4 release files

1.4.3

4 release files

1.4.2

4 release files

1.4.1

4 release files

1.4.0

4 release files

1.3.2

4 release files

1.3.1

4 release files

1.3.0

4 release files

1.2.2

4 release files

1.2.1

6 release files

1.2.0

6 release files

1.1.5

6 release files

1.1.3

6 release files

1.1.2

6 release files

1.1.1

6 release files

1.1.0

6 release files

1.0.5

6 release files

1.0.4

6 release files

1.0.3

6 release files

1.0.2

6 release files

1.0.1

6 release files

1.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page