LangSplat

minghanqin长期未更新

LangSplat 是 CVPR2024 高亮论文的官方实现,把语言特征嵌入 3D 高斯泼溅,实现可开放词汇查询的 3D 场景重建与语义检索。

Official implementation of the paper "LangSplat: 3D Language Gaussian Splatting" [CVPR2024 Highlight]

暂无版本1,100star116fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/minghanqin/LangSplat.git --recursive
conda env create --file environment.yml
conda activate langsplat
硬件要求按 README 说明

需要 Compute Capability 7.0+ 的 CUDA GPU,训练到论文质量需 24 GB 显存;README 未说明 CPU 运行方案。

24G 显存可跑支持 Apple Silicon需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

CVPR2024 高亮工作,用 3D 语言高斯泼溅把自然语言查询落到三维场景里

LangSplat 是 CVPR2024 高亮论文的官方实现,把语言特征嵌入 3D 高斯泼溅,实现可开放词汇查询的 3D 场景重建与语义检索。

核心能力

  • 用场景级语言自编码器把 512 维 CLIP 特征压到 3 维以降低显存
  • 基于 SfM 数据与语言特征训练 LangSplat 模型
  • 提供预处理 3D-OVS 数据集与预训练模型直接渲染
  • 支持把自有图像经 COLMAP 与 SAM 流程转成可训练数据
  • 附带 LERF 上的 3D 物体定位与语义分割评测脚本

容易踩的坑

仓库含 submodule,克隆必须加 --recursive,否则缺代码;需另装 segment-anything-langsplat 并把 SAM 权重放到 ckpts/;训练前要先按 3dgs 流程准备 COLMAP 数据与预训练 RGB 模型。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    [CVPR2024 Highlight] LangSplat: 3D Language Gaussian Splatting

    Minghan Qin*, Wanhua Li*†, Jiawei Zhou*, Haoqian Wang†, Hanspeter Pfister(* indicates equal contribution, † means Co-corresponding author)| Webpage | Full Paper | Video | | Preprocessed Dataset | BaiduWangpan | GoogleDrive | | Pre-trained Models | BaiduWangpan | GoogleDrive | | Datasets |

    Teaser image

    This repository contains the official authors implementation associated with the paper "LangSplat: 3D Language Gaussian Splatting" (CVPR 2024), which can be found here. We further provide the preprocessed datasets 3D-OVS with language feature, as well as pre-trained models.

    Cloning the Repository

    The repository contains submodules, thus please check it out with

    # SSH
    git clone [email protected]:minghanqin/LangSplat.git --recursive
    

    or

    # HTTPS
    git clone https://github.com/minghanqin/LangSplat.git --recursive
    

    Overview

    The codebase has 3 main components:

    • A PyTorch-based optimizer to produce a LangSplat model from SfM datasets with language feature inputs to
    • A scene-wise language autoencode to alleviate substantial memory demands imposed by explicit modeling.
    • A script to help you turn your own images into optimization-ready SfM data sets with language feature

    The components have been tested on Ubuntu Linux 18.04. Instructions for setting up and running each of them are found in the sections below.

    Datasets

    In the experiments section of our paper, we primarily utilized two datasets: the 3D-OVS dataset and the LERF dataset.

    The 3D-OVS dataset is accessible for download via the following link: Download 3D-OVS Dataset .

    For the LERF dataset, we have expanded upon its existing collection and also provided the corresponding COLMAP data. These resources can be accessed through this link: Download Expanded LERF Dataset and COLMAP Data.

    Optimizer

    The optimizer uses PyTorch and CUDA extensions in a Python environment to produce trained models.

    Hardware Requirements

    • CUDA-ready GPU with Compute Capability 7.0+
    • 24 GB VRAM (to train to paper evaluation quality)

    Software Requirements

    • Conda (recommended for easy setup)
    • C++ Compiler for PyTorch extensions (we used VS Code)
    • CUDA SDK 11 for PyTorch extensions (we used 11.8)
    • C++ Compiler and CUDA SDK must be compatible

    Setup

    Environment Setup

    Our default, provided install method is based on Conda package and environment management:

    conda env create --file environment.yml
    conda activate langsplat
    

    QuickStart

    Download the pretrained model to output/, then simply use

    python render.py -m output/$CASENAME --include_feature
    

    Processing your own Scenes

    Before getting started

    Firstly, put your images into the data dir.

    <dataset_name>
    |---input
    |   |---<image 0>
    |   |---<image 1>
    |   |---...
    

    Secondly, you need to acquire the following dataset format and a pre-trained RGB model follow the 3dgs repository.

    <dataset_name>
    |---images
    |   |---<image 0>
    |   |---<image 1>
    |   |---...
    |---input
    |   |---<image 0>
    |   |---<image 1>
    |   |---...
    |---output
    |   |---<dataset_name>
    |   |   |---point_cloud/iteration_30000/point_cloud.ply
    |   |   |---cameras.json
    |   |   |---cfg_args
    |   |   |---chkpnt30000.pth
    |   |   |---input.ply
    |---sparse
        |---0
            |---cameras.bin
            |---images.bin
            |---points3D.bin
    

    Environment setup.

    Please install segment-anything-langsplat and download the checkpoints of SAM from here to ckpts/.

    Pipeline

    Follow the process.sh and train LangSplat on your own scenes.

    • Step 1: Generate Language Feature of the Scenes. Put the image data into the "input" directory under the <dataset_name>/, then run the following code.

      python preprocess.py --dataset_path $dataset_path 
      
    • Step 2: Train the Autoencoder and get the lower-dims Feature.

      # train the autoencoder
      cd autoencoder
      python train.py --dataset_name $dataset_path --encoder_dims 256 128 64 32 3 --decoder_dims 16 32 64 128 256 256 512 --lr 0.0007 --output ae_ckpt
      # get the 3-dims language feature of the scene
      python test.py --dataset_name $dataset_path --output
      

      Our model expect the following dataset structure in the source path location:

      <dataset_name>
      |---images
      |   |---<image 0>
      |   |---<image 1>
      |   |---...
      |---language_feature
      |   |---00_f.npy
      |   |---00_s.npy
      |   |---...
      |---language_feature_dim3
      |   |---00_f.npy
      |   |---00_s.npy
      |   |---...
      |---output
      |   |---<dataset_name>
      |   |   |---point_cloud/iteration_30000/point_cloud.ply
      |   |   |---cameras.json
      |   |   |---cfg_args
      |   |   |---chkpnt30000.pth
      |   |   |---input.ply
      |---sparse
          |---0
              |---cameras.bin
              |---images.bin
              |---points3D.bin
      
    • Step 3: Train the LangSplat.

      python train.py -s dataset_path -m output/${casename} --start_checkpoint $dataset_path/output/$casename/chkpnt30000.pth --feature_level ${level}
      
    • Step 4: Render the LangSplat.

      python render.py -s dataset_path -m output/${casename} --feature_level ${level}
      
    • Step 5: Eval. First, we generate the 3-dim language feature map through Step 4. Subsequently, the decoder elevates the features from 3 dimensions to 512 dimensions. For further operations and detailed explanations, please refer to the supplementary materials.

      • 3D Object Localization on LERF and 3D Semantic Segmentation on LERF. Our eval code is based on LERF and NerfStudio, thanks for these impressive open-source projects!

        • Please download the lerf_ovs first.

        • Set the gt_folder as the path to lerf_ovs/label.

        • Make sure finish the Step 4 before you run the eval code.

      cd eval
      sh eval.sh
      

    TODO list:

    • release the code of the optimizer
    • release the code of the autoencoder
    • release the code of the segment-anything-langsplat
    • update the arxiv link
    • release the preprocessed dataset and the pretrained model
    • release more preprocessed dataset and the pretrained model (coming soon)
    • release the code of the eval

    This project is still under development. Please feel free to raise issues or submit pull requests to contribute to our codebase.