Coder Social home page Coder Social logo

volare1996 / snerf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from esa/snerf

0.0 0.0 0.0 10.72 MB

Code for ''Shadow Neural Radiance Fields for Multi-View Photogrammetry'' Derksen Dawa, Dario Izzo

License: GNU General Public License v3.0

Python 95.79% Jupyter Notebook 4.21%

snerf's Introduction

banner

Shadow Neural Radiance Fields

This project shows the application of Shadow Neural Radiance Fields (S-NeRF) to Very High Spatial Resolution RGB imagery from WorldView-3. This code was used for the paper called Shadow Neural Radiance Fields for Multi-view Satellite Photogrammetry presented at CVPR 2021 - Workshop on Earth Vision. This is the result of a joint research collaboration between the Advanced Concepts Team (ESTEC) and the ฯ†-lab (ESRIN). This repository is intended as a means to reproduce the results shown in the paper, and to stimulate further research in this direction. Links to the paper and video are provided here:

Paper - Video (10 minutes)

Installation

The code is heavily based on TensorFlow-2.2.0, but also makes use of matplotlib, scikit-image, and gdal for image utilities. The conda environment required to run the code is contained in the snerf_env.yml file. The code is intended for use on a single CUDA-enabled GPU.

Contents

This repository contains:

  1. The source code of the project in the snerf folder, including training and plotting scripts train.py and plots.py.
  2. A demonstration Jupyter notebook, to reproduce some of the results shown in the paper, snerf/snerf_demo.ipynb based on a pre-trained model.
  3. The data that was used to generate the results shown in the paper, in the data folder.
  4. Pre-trained models in the models folder, four areas in Jacksonville were selected for this study : 004, 068, 214 and 260. S-NeRF requires a unique model to be trained for each area.

Data

The original images were kindly collected and provided in open access by the IEEE GRSS organization, for the Data Fusion Competition 2019. For the paper, only four scenes over Jacksonville were used. The original scenes have been cropped and rotated using the sat_data_handling.py script, located in the scripts folder. This script pre-processes the DFC2019 data and is provided for reference. The pre-processed images are available for download here. After decompression the images should be placed in the data/ folder (e.g. data/068/JAX_068_010_RGB_crop.tif). If placed in a different directory than data/, the configuration files in config/ should be adapted to point to the appropriate location.

Usage

Training a S-NeRF requires a configuration file defining the model parameters, training procudure, shading model, and logging parameters. The description of the configuration parameters can be found in snerf/train.py. Training is run via the training script train.py as follows (replace "XXX" with the area index 004, 068, 214 or 260).

python train.py --config ../configs/XXX_config.txt

This will produce a file called model.npy as well as the scores and loss logs in the outputs folder (as specified in the configuration). Once finished, the various outputs and scores are plotted with snerf/plots.py.

python plots.py --config ../configs/XXX_config.txt

Acknowledgements

Thank you to Dario Izzo, Marcus Maertens, Anne Mergy, Pablo Gomez and Gurvan Lecuyer from Advanced Concepts Team, and Bertrand Le Saux from ฯ†-lab for collaboration on this project.

The authors would like to thank the Johns Hopkins University Applied Physics Laboratory and IARPA for providing the data used in this study, and the IEEE GRSS Image Analysis and Data Fusion Technical Committee for organizing the Data Fusion Contest.

The code is based on the Tensorflow implementation of the authors of Neural Radiance Fields, https://github.com/bmild/nerf (distributed under MIT Licence), thanks to Ben Mildenhall, Daniel Duckworth, Matthew Tancik for their ground-breaking work.

The code for SIREN networks with the special initialization procedure is from https://github.com/titu1994/tf_SIREN, (distributed under MIT Licence), thanks to Somshubra Majumdar and other contributors.

snerf's People

Contributors

derksend avatar darioizzo 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.