Home

Awesome

Relight My Nerf - A Dataset for Novel View Synthesis and Relighting of Real World Objects

This package contains commands to manage the dataset for the Relight My Nerf project. The architecture of the network is not included in this package, nor the training scripts. This package is only for managing the dataset.

Install | Download | Structure | What's inside | How to Use it | Benchmark

<br>

šŸ‘·ā€ā™€ļø Install the management package

To install the package, run the following command in a python venv:

git clone git@github.com:eyecan-ai/rene.git
cd rene
pip install .

It has been tested with python 3.9 on Ubuntu 22.04, should work even with python >= 3.8 and hopefully in another OS.

ā¬‡ļø Download the dataset

You can download the dataset from this Google Drive Folder and extract the files contained in the zip archive in /path/to/rene_parent_folder. The structure of the extracted folder should be the following:

šŸ“‚ rene_parent_folder
ā”œā”€ā”€ šŸ“ apple
ā”œā”€ā”€ šŸ“ cheetah 
ā”œā”€ā”€ šŸ“ cube 
...
ā”œā”€ā”€ šŸ“ tapes
ā”œā”€ā”€ šŸ“ trucks
ā””ā”€ā”€ šŸ“ wooden 

šŸ“ Dataset structure

Each scene folder contains the following files:

šŸ“‚ rene_parent_folder
ā”œā”€ā”€ šŸ“‚ apple
ā”‚   ā”œā”€ā”€ šŸ“‚ lset000
ā”‚       ā”œā”€ā”€ šŸ“ƒļø camera.yml
ā”‚       ā”œā”€ā”€ šŸ“„ light.txt 
ā”‚       ā”œā”€ā”€ šŸ“‚ data
ā”‚           ā”œā”€ā”€ šŸ–¼ļø 00000_image.png
ā”‚           ā”œā”€ā”€ šŸ“„ 00000_pose.txt
ā”‚           ...
ā”‚           ā”œā”€ā”€ šŸ–¼ļø 00048_image.png
ā”‚           ā””ā”€ā”€ šŸ“„ 00049_pose.txt
ā”‚   ā”œā”€ā”€ šŸ“ lset001
ā”‚   ...
ā”‚   ā””ā”€ā”€ šŸ“ lset039
...

Additional notes:

šŸ‘ļø Show the dataset

As a check if everying went well, you can show the dataset with the following command:

rene show +i /path/to/rene_parent_folder

This will show a window similar to the following:

https://github.com/eyecan-ai/rene/assets/23316277/51fac737-05ed-4d20-bdac-3687f44f4f1d

šŸ›¼ Handle the dataset

We use pipelime-python to handle the dataset, it's automatically installed when you install the package, but you can find the documentation here.

A simple script to load the dataset is the following:

import matplotlib.pyplot as plt

from rene.utils.loaders import ReneDataset

# Lazy load the dataset
rene = ReneDataset(input_folder="/path/to/rene_parent_folder")

# To get a sample, you can do the following:
sample = rene["cube"][18][36]  # <- scene=cube, light_pose=18, camera_pose=36

# Each sample contains [camera, image, pose, light] keys
# To actually load an image you can do this:
image = sample["image"]()  # <- Notice the `()` at the end!

# And use the item as you wish
plt.imshow(image)
plt.show()

To see more advanced examples you can always check the folder examples library.

šŸŖ‘ Contribute to the Benchmark

To send your test images you will need to upload and send the link of a zip file with the following structure:

šŸ“¦ rene_test_images.zip
ā”œā”€ā”€ šŸ–¼ļø apple_00_04.png
ā”œā”€ā”€ šŸ–¼ļø apple_00_08.png
ā”œā”€ā”€ šŸ–¼ļø apple_00_15.png
...
ā”œā”€ā”€ šŸ–¼ļø apple_39_04.png
ā”œā”€ā”€ šŸ–¼ļø apple_39_08.png
ā”œā”€ā”€ šŸ–¼ļø apple_39_15.png
ā”œā”€ā”€ šŸ–¼ļø cheetah_00_04.png
...
ā”œā”€ā”€ šŸ–¼ļø cheetah_39_15.png
ā”œā”€ā”€ šŸ–¼ļø cube_00_04.png
...

The format for each image is: {scene_name}_{light_idx}_{cam_idx}.png and they need to be at the root level of the zip file. Each scene will have 111 images for the easy test and 9 for the hard test, for a total of 120 * 20 = 2400 images, your zip archive should contain exactly this number of files. At the time of writing, the link of your zip file should be sent to any email address with the suffix eyecan.ai present in the paper.

šŸ–‹ļø Citation

If you find this dataset useful, please give us a github star, if you were crazy enough to download the dataset and it was useful to you in some way for your work, it would be great if you would cite us:

@InProceedings{Toschi_2023_CVPR,
          author    = {Toschi, Marco and De Matteo, Riccardo and Spezialetti, Riccardo and De Gregorio, Daniele and Di Stefano, Luigi and Salti, Samuele},
          title     = {ReLight My NeRF: A Dataset for Novel View Synthesis and Relighting of Real World Objects},
          booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
          month     = {June},
          year      = {2023},
          pages     = {20762-20772}
        }