Git Product home page Git Product logo

garfield's Introduction

GARField: Group Anything with Radiance Fields

This is the official implementation for GARField.

Tested on Python 3.10, cuda 12.0, using conda.

Installation

  1. Install nerfstudio from source, and its dependencies. This project requires the latest version of nerfstudio (more specifically, the new viewer based on viser).
# install dependencies
pip3 install torch torchvision torchaudio
conda install -c "nvidia/label/cuda-12.0.0" cuda-toolkit
pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

# install nerfstudio!
git clone [email protected]:nerfstudio-project/nerfstudio.git
cd nerfstudio
pip install -e .
  1. To use GARField with Gaussian Splatting, cuml is required (for global clustering). The best way to install it is through conda: conda install -c rapidsai -c conda-forge -c nvidia cuml

Note 1: If you get ClobberError, try conda clean --all -- see here. It seems that pip installed packages from nerfstudio may conflict with the conda install here.

Note 2: I used libmamba for conda.

  1. Install GARField!
git clone [email protected]:chungmin99/garfield.git
pip install -e .

This installs both garfield (NeRF geometry), and garfield-gauss (Gaussian geometry). Note that garfield-gauss requires reference to a fully trained garfield checkpoint, as it relies on the affinity field from garfield. See the main paper for more details.

Running GARField

Note: using colmap-based data makes running both garfield and garfield-gauss, since Gaussian Splatting in nerfstudio is best supported with it.

You can use it like any other third-party nerfstudio project.

ns-train garfield --data /your/data/here

Note that GARField will pause to generate groups using Segment-Anything at around 2000 steps (set by default, this can be set in GarfieldPipeline). Afterwards, you can start interacting with the affinity field.

  1. PCA visualization of affinity field: select instance as the output type, and change the value of scale slider.
garfield_pca.mp4
  1. Affinity visualization between 3D point and scene: use "Click" button to select the point, and select instance_interact as the output type. You might need to drag the viewer window slightly to see this output type. Again, interact with the scale slider! Here, with invert True and output unnormalized, red color means high affinity (i.e., features at click point and rendered point are close to each other). Blue means low affinity.
garfield_selection.mp4

Also, note: the results can change a lot between 2k to 30k steps.

Once the model is trained to completion, you can use the outputted config file for garfield-gauss.

Running GARField with Gaussian Splatting geometry!

Although GARField's affinity field is optimized using NeRF geometry, it can be used to group and cluster gaussians in 3D!

ns-train garfield-gauss --data /your/data/here --pipeline.garfield-ckpt outputs/your/data/garfield/.../config.yml

There are two main ways to interact with the scene -- make sure to pause training first!

  1. Interactive selection: click anywhere in the scene, and use "Crop to Click" button to retrieve different groups (scale=group level*0.05). Use "Drag Current Crop" to move it around!
garfield_gauss_click.mp4
  1. Global clustering: cluster the currently visible gaussians (either globally or just for the crop), at the scale specified by "Cluster Scale".
garfield_gauss_cluster.mp4

Citation

If you use this work or find it helpful, please consider citing: (bibtex)

@inproceedings{garfield2024,
 author = {Kim, Chung Min and Wu, Mingxuan and Kerr, Justin and Tancik, Matthew and Goldberg, Ken and Kanazawa, Angjoo},
 title = {GARField: Group Anything with Radiance Fields},
 booktitle = {arXiv},
 year = {2024},
}

garfield's People

Contributors

chungmin99 avatar

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.