This is a work in progress reimplementation of Instant Neural Graphics Primitives

Overview

Neural Hash Encoding

This is a work in progress reimplementation of Instant Neural Graphics Primitives Currently this can train an implicit representation of a gigapixel image using a multires hash encoding.

FYI: This is brand new -- most parameters in the training script are hard coded right now

Check out results in viz

Setup:

Download the Tokyo image

wget -O tokyo.jpg https://live.staticflickr.com/1859/29314390837_b39ae4876e_o_d.jpg

Convert to numpy binary format for faster reading (1s w/ .npz vs 14s with .jpg)

from PIL import Image
Image.MAX_IMAGE_PIXELS = 10**10

img = np.asarray(Image.open("tokyo.jpg"))   # Abount 3.5 gb
np.save("tokyo.npy", img)

Train:

python src/train_image.py

Implementation Notes (From the Paper)

Architecture

In all tasks, except for NeRF which we will describe later, we use an MLP with two hidden layers that have a width of 64 neurons and rectified linear unit (ReLU)

4. Initialization

  • Initialize hash table entries with uniform distribution [-1e-4, 1e-4]

4. Training

  • Optimizer
  • Regularization:
    • L2: 10e-6 Applied to the MLP weigths not the hash table weights

we skip Adam steps for hash table entries whose gradient is exactly 0. This saves ∼10% performance when gradients are sparse

You might also like...
PyTorch reimplementation of minimal-hand (CVPR2020)
PyTorch reimplementation of minimal-hand (CVPR2020)

Minimal Hand Pytorch Unofficial PyTorch reimplementation of minimal-hand (CVPR2020). you can also find in youtube or bilibili bare hand youtube or bil

PyTorch reimplementation of the paper Involution: Inverting the Inherence of Convolution for Visual Recognition [CVPR 2021].

Involution: Inverting the Inherence of Convolution for Visual Recognition Unofficial PyTorch reimplementation of the paper Involution: Inverting the I

PyTorch reimplementation of hand-biomechanical-constraints (ECCV2020)
PyTorch reimplementation of hand-biomechanical-constraints (ECCV2020)

Hand Biomechanical Constraints Pytorch Unofficial PyTorch reimplementation of Hand-Biomechanical-Constraints (ECCV2020). This project reimplement foll

A PyTorch Reimplementation of TecoGAN: Temporally Coherent GAN for Video Super-Resolution
A PyTorch Reimplementation of TecoGAN: Temporally Coherent GAN for Video Super-Resolution

TecoGAN-PyTorch Introduction This is a PyTorch reimplementation of TecoGAN: Temporally Coherent GAN for Video Super-Resolution (VSR). Please refer to

 a reimplementation of Optical Flow Estimation using a Spatial Pyramid Network in PyTorch
a reimplementation of Optical Flow Estimation using a Spatial Pyramid Network in PyTorch

pytorch-spynet This is a personal reimplementation of SPyNet [1] using PyTorch. Should you be making use of this work, please cite the paper according

An official reimplementation of the method described in the INTERSPEECH 2021 paper - Speech Resynthesis from Discrete Disentangled Self-Supervised Representations.
An official reimplementation of the method described in the INTERSPEECH 2021 paper - Speech Resynthesis from Discrete Disentangled Self-Supervised Representations.

Speech Resynthesis from Discrete Disentangled Self-Supervised Representations Implementation of the method described in the Speech Resynthesis from Di

PyTorch reimplementation of REALM and ORQA

PyTorch reimplementation of REALM and ORQA

Reimplementation of the paper "Attention, Learn to Solve Routing Problems!" in jax/flax.

JAX + Attention Learn To Solve Routing Problems Reinplementation of the paper Attention, Learn to Solve Routing Problems! using Jax and Flax. Fully su

 a reimplementation of UnFlow in PyTorch that matches the official TensorFlow version
a reimplementation of UnFlow in PyTorch that matches the official TensorFlow version

pytorch-unflow This is a personal reimplementation of UnFlow [1] using PyTorch. Should you be making use of this work, please cite the paper according

Comments
  • add support for nd interpolation

    add support for nd interpolation

    Re-names:

    • HashArray2D -> HashArray
    • Interpolate2D -> Interpolate
    • DenseEncodingLevel2D -> DenseEncodingLevel
    • HashEncodingLevel2D -> HashEncodingLevel
    • MultiResEncoding2D -> MultiResEncoding

    Adds map_coordinates adapted from jax.scipy.ndimage.map_coordinates for n-dimensional interpolation

    opened by jenkspt 0
  • Added PyTorch version with NeuS training

    Added PyTorch version with NeuS training

    Check out my PyTorch version that implements the MultiresHashEncoding: https://github.com/jenkspt/multires-hash-encoding-pytorch And the NeuS fork that replaces the NeRF-like modules with MultiresHashEncodings: https://github.com/jenkspt/NeuS/tree/hash And discussion here: https://github.com/Totoro97/NeuS/issues/65

    opened by jenkspt 0
  • add NeRF training

    add NeRF training

    • Adapt jax code from sarafridov/plenoxels
      • Replace the plenoxel sparse grid with HashArray of
      • Replace spherical harmonic eval_sh with MLP

    The instant neural graphics nerf training is more similar to plenoxel than original nerf, since plenoxel uses trilinear interpolation on a sparse grid.

    opened by jenkspt 0
Owner
Penn
Machine learning engineer
Penn
Optimized primitives for collective multi-GPU communication

NCCL Optimized primitives for inter-GPU communication. Introduction NCCL (pronounced "Nickel") is a stand-alone library of standard communication rout

NVIDIA Corporation 2k Jan 9, 2023
Reimplementation of the paper `Human Attention Maps for Text Classification: Do Humans and Neural Networks Focus on the Same Words? (ACL2020)`

Human Attention for Text Classification Re-implementation of the paper Human Attention Maps for Text Classification: Do Humans and Neural Networks Foc

Shunsuke KITADA 15 Dec 13, 2021
Instant Real-Time Example-Based Style Transfer to Facial Videos

FaceBlit: Instant Real-Time Example-Based Style Transfer to Facial Videos The official implementation of FaceBlit: Instant Real-Time Example-Based Sty

Aneta Texler 131 Dec 19, 2022
Instant-Teaching: An End-to-End Semi-Supervised Object Detection Framework

This repo is the official implementation of "Instant-Teaching: An End-to-End Semi-Supervised Object Detection Framework". @inproceedings{zhou2021insta

null 34 Dec 31, 2022
Torch-ngp - A pytorch implementation of the hash encoder proposed in instant-ngp

HashGrid Encoder (WIP) A pytorch implementation of the HashGrid Encoder from ins

hawkey 1k Jan 1, 2023
Instant-nerf-pytorch - NeRF trained SUPER FAST in pytorch

instant-nerf-pytorch This is WORK IN PROGRESS, please feel free to contribute vi

null 94 Nov 22, 2022
Collection of in-progress libraries for entity neural networks.

ENN Incubator Collection of in-progress libraries for entity neural networks: Neural Network Architectures for Structured State Entity Gym: Abstractio

null 25 Dec 1, 2022
NPBG++: Accelerating Neural Point-Based Graphics

[CVPR 2022] NPBG++: Accelerating Neural Point-Based Graphics Project Page | Paper This repository contains the official Python implementation of the p

Ruslan Rakhimov 57 Dec 3, 2022
[ECCV 2020] Reimplementation of 3DDFAv2, including face mesh, head pose, landmarks, and more.

Stable Head Pose Estimation and Landmark Regression via 3D Dense Face Reconstruction Reimplementation of (ECCV 2020) Towards Fast, Accurate and Stable

Remilia Scarlet 221 Dec 30, 2022
text_recognition_toolbox: The reimplementation of a series of classical scene text recognition papers with Pytorch in a uniform way.

text recognition toolbox 1. 项目介绍 该项目是基于pytorch深度学习框架,以统一的改写方式实现了以下6篇经典的文字识别论文,论文的详情如下。该项目会持续进行更新,欢迎大家提出问题以及对代码进行贡献。 模型 论文标题 发表年份 模型方法划分 CRNN 《An End-t

null 168 Dec 24, 2022