Git Product home page Git Product logo

3d_gaussian_sam's Introduction

3D Gaussian Splatting SAM

gif

This is the final project for EECS542: Advanced Topics for Computer Vision.

๐Ÿš€ 1. Motivation

The recent Neural Radiance Fields (NeRF) offers impressive results in building 3D objects given several surrounding images. However, it still has some drawbacks, such as its reliance on the Multi-Layer Perceptron (MLP) network, and the time-consuming training process. NVIDIA addresses the problem with instant-ngp, a solution that significantly accelerates NeRF's training, but still with some blurry effect on the object. Thus, to further enhance the fine details, 3D Gaussian splatting employs Gaussian-based representation. Even though, objects still have to be extracted, which Segment Anything Model (SAM) has great performance on such a task. Integrating SAM's robust segmentation capabilities with the intricate 3D Gaussian representation, we introduce a novel method aimed at delivering unparalleled quality on 3D objects given 2D images.

๐Ÿ’ป 2. Prerequisites

Gaussian Splatting

This is a new emerging 3D reconstruction tool with fast training speed and high quality. The official website can be found in here.

# Install dependencies of Gaussian Splatting
git clone --recursive https://github.com/yi-cheng-liu/3d_gaussian_sam.git

# Setting up environment of Gaussian Splatting
cd 3d_gaussian/
conda env create --file environment.yml
conda activate gaussian_splatting
cd ..

Segment Anything

This model is for segmenting the object from 2D images. Original paper could be found in the website.

# Setting up environment of Segment-Anything
cd segment-anything
pip install -e .

# Dependencies for clip model
pip install torch opencv-python Pillow tqdm
pip install git+https://github.com/openai/CLIP.git

# The following optional dependencies are necessary for mask 
# post-processing, saving masks in COCO format, the example notebooks, 
# and exporting the model in ONNX format. 
pip install opencv-python pycocotools matplotlib onnxruntime onnx
cd ..

Download weights for the segmentation model from here and put it in segment-anything/model_checkpoint/.

Colmap (Structure from Motion)

This model is for generating the initial point cloud from the video. Official documentation can be found in here.

git clone https://github.com/colmap/colmap.git

NerfStudio

This folder is for viewing the training result of the Gaussian Splatting

git clone -b gaussian_splatting https://github.com/yzslab/nerfstudio.git

๐Ÿ“Š 3. Dataset

this project consists of two datasets, MipNeRF-360 and Food-360. MipNeRF-360 could be found in the official website of MipNeRF. Food-360 dataset could be found in here.

MipNeRF-360

cd datasets
# Dataset Pt.1
wget http://storage.googleapis.com/gresearch/refraw360/360_v2.zip

# Dataset Pt.2
wget https://storage.googleapis.com/gresearch/refraw360/360_extra_scenes.zip

Food-360

# Setup the kaggle api first
kaggle datasets download liuyiche/food-360-dataset/

The structure of the project will look like this

โ”œโ”€โ”€ 3d_gaussian
โ”œโ”€โ”€ bounding_box_sam.py
โ”œโ”€โ”€ clip_sam.py
โ”œโ”€โ”€ colmap
โ”œโ”€โ”€ Dataset # unzip before use
โ”‚   โ”œโ”€โ”€ 360_extra_scenes.zip
โ”‚   โ”œโ”€โ”€ 360_v2.zip
โ”‚   โ”œโ”€โ”€ Food-360-dataset.zip
โ”‚   โ””โ”€โ”€ convert_video
โ”œโ”€โ”€ nerfstudio
โ”œโ”€โ”€ output
โ”œโ”€โ”€ EADME.md
โ”œโ”€โ”€ segment-anything
โ”‚   โ”œโ”€โ”€ ...
โ”‚   โ””โ”€โ”€ model_checkpoint
โ””โ”€โ”€ train.py

๐Ÿƒ 4. Run the project

# Bounding box
python bounding_box.py
# CLIP
python clip_sam.py

# Train with Gaussian Splatting
# python train.py -s <path to COLMAP or NeRF Synthetic dataset>
python train.py -s datasets/chips/chips/images_segmented

๐Ÿ’ก See some of our output ๐Ÿšœ Bulldozer ๐Ÿฅค Cola-Cola ๐ŸŒ Banana ๐ŸŸ Chips

๐Ÿ“„ 5. Related Papers

** A new paper that addressed the task with a better result

๐Ÿ“ซ 6. Contact

3d_gaussian_sam's People

Contributors

tien-li avatar yi-cheng-liu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

3d_gaussian_sam's Issues

about train.py

It is certain that the authors have completed a very good job. But it seems that the train.py file has not yet been opened source. I am also very interested in the 3DGS project. May I ask when you can release train.py?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.