GithubHelp home page GithubHelp logo

abdo-eldesokey / nconv-nyu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fangchangma/sparse-to-dense.pytorch

6.0 2.0 3.0 81 KB

NConv-CNN "Confidence Propagation through CNNs for Guided Sparse Depth Regression" on NYU-Depth-v2 dataset

Python 100.00%

nconv-nyu's Introduction

NConv-CNN on NYU-Depth-v2

The repo provides an implementation to train/test our method "Confidence Propagation through CNNs for Guided Sparse Depth Regression" on the "NYU-Depth-v2 dataset"

This repo is forked from the PyTorch implementation for "Sparse-to-Dense: Depth Prediction from Sparse Depth Samples and a Single Image" by Fangchang Ma and Sertac Karaman.

We provide training for both networks Enc-Dec-Net[EF] and MS-Net[LF] on the RGB-D input of the dataset. as they were described in the paper.

Contents

  1. Requirements
  2. Training
  3. Testing
  4. Citation

Requirements

This code was tested with Python 3 and PyTorch 1.0.

  • Install PyTorch on a machine with CUDA GPU.
  • Install the HDF5 and other dependencies (files in our pre-processed datasets are in HDF5 formats).
     sudo apt-get update
     sudo apt-get install -y libhdf5-serial-dev hdf5-tools
     pip3 install h5py matplotlib imageio scikit-image opencv-python
  • Download the preprocessed NYU Depth V2 dataset in HDF5 formats, and specify the path to the datasets in create_data_loaders() in main.py The downloading process might take an hour or so. The NYU dataset requires 32G of storage space.
     wget http://datasets.lids.mit.edu/sparse-to-dense/data/nyudepthv2.tar.gz
     tar -xvf nyudepthv2.tar.gz && rm -f nyudepthv2.tar.gz	

Training

The training scripts come with several options, which can be listed with the --help flag.

python main.py --help

For instance, run the following command to train the network Enc-Dec-Net[EF], and both RGB and 100 random sparse depth samples as the input to the network.

python main.py -a guided_enc_dec -m rgbd -s 100 --data nyudepthv2 --optimizer adam --lr 0.001 --lr-decay 10

Training results will be saved under the results folder. To resume a previous training, run

python main.py --resume [path_to_previous_model]

Testing

To test the performance of a trained model without training, simply run main.py with the -e option. For instance,

python main.py --evaluate [path_to_trained_model]

Citation

If you use the code or method in your work, please consider citing the original authors of the code:

@article{Ma2017SparseToDense,
	title={Sparse-to-Dense: Depth Prediction from Sparse Depth Samples and a Single Image},
	author={Ma, Fangchang and Karaman, Sertac},
	booktitle={ICRA},
	year={2018}
}
@article{ma2018self,
	title={Self-supervised Sparse-to-Dense: Self-supervised Depth Completion from LiDAR and Monocular Camera},
	author={Ma, Fangchang and Cavalheiro, Guilherme Venturelli and Karaman, Sertac},
	journal={arXiv preprint arXiv:1807.00275},
	year={2018}
}

And our paper:

@article{eldesokey2018confidence,
  title={Confidence Propagation through CNNs for Guided Sparse Depth Regression},
  author={Eldesokey, Abdelrahman and Felsberg, Michael and Khan, Fahad Shahbaz},
  journal={arXiv preprint arXiv:1811.01791},
  year={2018}
}

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.