• Stars
    star
    185
  • Rank 208,271 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 2 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

NeRF-Supervision

Project Page | Video | Paper | Data

Open Tiny-NeRF in Colab

PyTorch implementation of NeRF-Supervision, an RGB-only, self-supervised pipeline for learning object-centric dense descriptors from neural radiance fields (NeRFs).

NeRF-Supervision: Learning Dense Object Descriptors from Neural Radiance Fields
Lin Yen-Chen1, Pete Florence2, Jonathan T. Barron2, Tsung-Yi Lin3, Alberto Rodriguez1, Phillip Isola1
1MIT, 2Google, 3Nvidia
ICRA 2022

What This Repo Contains?

This repo hosts the code for step (a) Use RGB images to optimize NeRF and (b) Generate dense correspondences. For step (c) Train dense object descriptors, we refer users to pytorch-dense-correspondence.

Dependencies

Install the following dependencies before you run the code:

pip install -r requirements.txt

How to Run?

In the following, we will use fork as an example:

OBJECT=fork

To use other objects, one can simply set the variable OBJECT=your_favorite_object.

Download example data

cd data
gdown 16_y_Nnh19Qhml0bg9RYR-hav0YOpWKuw
unzip -q $OBJECT.zip
cd ..

Generate camera poses and sparse depth information using COLMAP

The data should look like the following:

β”œβ”€β”€ data
β”‚Β Β  β”œβ”€β”€ fork
β”‚Β Β  β”‚   β”œβ”€β”€ images
β”‚Β Β  β”‚   β”‚   β”œβ”€β”€ 000001.png
β”‚Β Β  β”‚   β”‚   β”œβ”€β”€ 000002.png
β”‚Β Β  β”‚   β”‚   β”œβ”€β”€ ...

To generate camera poses and the sparse point cloud:

python imgs2poses.py --data_dir ./data/$OBJECT

Train NeRFs

To train a DS-NeRF:

python DS_NeRF/run_nerf.py --config DS_NeRF/configs/$OBJECT.txt

All the checkpoints and rendered images will be saved in ./logs/$OBJECT.

Generate The Correspondence Dataset

Once the training is done, run the following lines:

python DS_NeRF/run_nerf.py --config DS_NeRF/configs/$OBJECT.txt --render_only --render_train --render_factor 2

This should produce a new directory called logs/$OBJECT/renderonly_train_$ITER where $ITER corresponds to the number of training iterations. This directory contains the generated correspondence and will be used in the next step!

Examine The Correspondence Dataset

We provide the following interface to examine the correspondences generated by NeRFs.

  1. Launch the jupyter notebook:
jupyter notebook examine-correspondence.ipynb
  1. In the first cell, specify DATA_DIR with the directory we generated from the last step: logs/$OBJECT/renderonly_train_$ITER. For example, it can be logs/$OBJECT/renderonly_train_049999.

Citation

@inproceedings{yen2022nerfsupervision,
  title={{NeRF-Supervision}: Learning Dense Object Descriptors from Neural Radiance Fields},
  author={Lin Yen-Chen and Pete Florence and Jonathan T. Barron and Tsung-Yi Lin and Alberto Rodriguez and Phillip Isola},
  booktitle={IEEE Conference on Robotics and Automation ({ICRA})},
  year={2022}
}

This codebase is highly based on the following publication:

@article{kangle2021dsnerf,
  title={Depth-supervised NeRF: Fewer Views and Faster Training for Free},
  author={Deng, Kangle and Liu, Andrew and Zhu, Jun-Yan and Ramanan, Deva},
  journal={arXiv preprint arXiv:2107.02791},
  year={2021}
}

More Repositories

1

DeepLearningFlappyBird

Flappy Bird hack using Deep Reinforcement Learning (Deep Q-learning).
Python
6,471
star
2

nerf-pytorch

A PyTorch implementation of NeRF (Neural Radiance Fields) that reproduces the results.
Python
4,076
star
3

awesome-NeRF

A curated list of awesome neural radiance fields papers
TeX
2,492
star
4

awesome-adversarial-machine-learning

A curated list of awesome adversarial machine learning resources
1,699
star
5

pix2pix-tensorflow

TensorFlow implementation of "Image-to-Image Translation Using Conditional Adversarial Networks".
Python
935
star
6

awesome-watchos

A curated list of awesome watchOS frameworks, libraries, sample apps.
Ruby
445
star
7

iNeRF-public

Python
162
star
8

research-advice

28
star
9

vision2action-ICRA

15
star
10

evf-public

Experience-embedded Visual Foresight, CoRL 2019
Python
14
star
11

paper-notes

Notes for papers or blog posts about ML, Robotics, CV.
14
star
12

mira

Python
12
star
13

Deep360Pilot-optical-flow

Code for extracting optical flow features for deep 360 pilot
Python
8
star
14

orthographic-ngp

Cuda
7
star
15

link

Jupyter Notebook
3
star
16

YahooParallaxScrollEffect

Implementation of Yahoo! Weather's parallax scroll effect
Swift
3
star
17

the-military-grind

My memories for military service.
CSS
3
star
18

alpaca-turbo

Python
2
star
19

fid

Python
2
star
20

adversarial-deep-rl

2
star
21

yenchenlin.github.io

JavaScript
2
star
22

gear-vr-360-player

clone from Oculus sample
Makefile
1
star
23

biggan-opt

Jupyter Notebook
1
star
24

dev-setup

My development environment setup
1
star
25

old-the-military-grind

This book will chronicle my four-month-grind when serving military in Taiwan.
HTML
1
star
26

old-blog

CSS
1
star
27

omniglot-45-5

Omniglot 45-5 split dataset
Python
1
star