Skip to content

An unofficial implementation of Gaussian Activated Radiance Fields in TensorFlow 2.

Notifications You must be signed in to change notification settings

laura-a-n-n/tf-garf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tf-garf

An unofficial implementation of Gaussian Activated Radiance Fields in TensorFlow 2.

Original paper by Chng et al. (2022): [arXiv] [webpage]

See the notebook for more info.

Now that the official code is available in PyTorch, you'll probably want to use that code instead!

Data

This implementation expects LLFF-style, forward-facing data, such as the NeRF LLFF dataset.

from lib.data import load_data
data = load_data('path/to/data/root')

If you have other data, you can use it like so.

from lib.data import hwf_rgb_to_data

hwf = np.array([image_height, image_width, focal_length]) # in pixels
rgb = # ... list of np.array objects of shape (image_height, image_width, 3)

data = hwf_rgb_to_data(hwf, rgb)

Model

Once you have the data, you can create a model object.

from model.garf import GaussianRadianceField
model = GaussianRadianceField(data, num_samples=128)

You can load the pre-trained model for the NeRF flower dataset. Pass opt=True to load the optimizer state.

model.load('pretrain/flowers', opt=False)

Render a view from a specific image index or pose with model.garf.GaussianRadianceField.render.

About

An unofficial implementation of Gaussian Activated Radiance Fields in TensorFlow 2.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published