TripoSplat Documentation

repository·main·Indexed 21 days ago

https://github.com/vast-ai-research/triposplat

A tool for converting a single 2D image into high-quality 3D Gaussian Splats. It supports variable Gaussian counts up to 262,144 to balance visual quality and rendering performance, exporting results in .ply or .splat formats.

Tokens
812
Snippets
3
Records
3
Agent score
26%

What's inside TripoSplat

  1. Quickstart: Run TripoSplat inference

    main

    To run the example inference script, follow these steps:

    1. Ensure you have downloaded the model weights to ckpts/ (see Download model weights).
    2. Install the required dependencies (ensure torch and torchvision are installed for your specific environment first).
    3. Run the example script.
    pip install numpy safetensors pillow tqdm
    python run_example.py

    Output files are exported in .ply or .splat formats, which can be visualized using 3D Gaussian viewers like SparkJS or SuperSplat.

    # install torch and torchvision according to your environment
    pip install numpy safetensors pillow tqdm
    python run_example.py
  2. Download TripoSplat model weights

    main

    Before running TripoSplat, you must download the model weights into a ckpts/ directory. You can use any of the following methods:

    HuggingFace

    Using HuggingFace CLI:

    hf download VAST-AI/TripoSplat --local-dir ckpts/

    Using huggingface_hub Python library:

    pip install huggingface_hub
    python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='VAST-AI/TripoSplat', local_dir='ckpts/')"

    ModelScope

    Using ModelScope CLI:

    pip install modelscope
    modelscope download VAST-AI-Research/TripoSplat --local_dir ckpts/

    Using modelscope Python SDK:

    pip install modelscope
    python -c "from modelscope import snapshot_download; snapshot_download('VAST-AI-Research/TripoSplat', local_dir='ckpts/')"

    Manual Download

    You can also manually download the weights from HuggingFace or ModelScope and place them in the ckpts/ folder.

    # Use one of the following ways to download model weights.
    
    # 1. Use HuggingFace CLI
    hf download VAST-AI/TripoSplat --local-dir ckpts/
    
    # 2. Use huggingface_hub
    pip install huggingface_hub
    python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='VAST-AI/TripoSplat', local_dir='ckpts/')"
    
    # 3. Use ModelScope CLI
    pip install modelscope
    modelscope download VAST-AI-Research/TripoSplat --local_dir ckpts/
    
    # 4. Use modelscope Python SDK
    pip install modelscope
    python -c "from modelscope import snapshot_download; snapshot_download('VAST-AI-Research/TripoSplat', local_dir='ckpts/')"