All Projects → fangchangma → Sparse To Dense

fangchangma / Sparse To Dense

Licence: other
ICRA 2018 "Sparse-to-Dense: Depth Prediction from Sparse Depth Samples and a Single Image" (Torch Implementation)

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Sparse To Dense

chemicalx
A PyTorch and TorchDrug based deep learning library for drug pair scoring.
Stars: ✭ 176 (-46.5%)
Mutual labels:  torch
Attentionwalk
A PyTorch Implementation of "Watch Your Step: Learning Node Embeddings via Graph Attention" (NeurIPS 2018).
Stars: ✭ 266 (-19.15%)
Mutual labels:  torch
Awesome Gee
A curated list of Google Earth Engine resources
Stars: ✭ 292 (-11.25%)
Mutual labels:  mapping
StrayVisualizer
Visualize Data From Stray Scanner https://keke.dev/blog/2021/03/10/Stray-Scanner.html
Stars: ✭ 30 (-90.88%)
Mutual labels:  mapping
Poiji
🍬 A tiny library converting excel rows to a list of Java objects based on Apache POI
Stars: ✭ 255 (-22.49%)
Mutual labels:  mapping
Mapnik
Mapnik is an open source toolkit for developing mapping applications
Stars: ✭ 3,067 (+832.22%)
Mutual labels:  mapping
vak
a neural network toolbox for animal vocalizations and bioacoustics
Stars: ✭ 21 (-93.62%)
Mutual labels:  torch
Adaptiveattention
Implementation of "Knowing When to Look: Adaptive Attention via A Visual Sentinel for Image Captioning"
Stars: ✭ 303 (-7.9%)
Mutual labels:  torch
Mapper
OpenOrienteering Mapper is a software for creating maps for the orienteering sport.
Stars: ✭ 258 (-21.58%)
Mutual labels:  mapping
Dreampower
DeepNude with DreamNet improvements.
Stars: ✭ 287 (-12.77%)
Mutual labels:  torch
logitech-m720-config
A configuration script for Logitech M720 that remaps mouse buttons (Linux)
Stars: ✭ 59 (-82.07%)
Mutual labels:  mapping
orika-spring-boot-starter
Spring Boot Starter for Orika.
Stars: ✭ 116 (-64.74%)
Mutual labels:  mapping
Deep Learning Model Convertor
The convertor/conversion of deep learning models for different deep learning frameworks/softwares.
Stars: ✭ 3,044 (+825.23%)
Mutual labels:  torch
a-minimalist-guide
Walkthroughs for DSL, AirSim, the Vector Institute, and more
Stars: ✭ 37 (-88.75%)
Mutual labels:  torch
Leaflet.markercluster
Marker Clustering plugin for Leaflet
Stars: ✭ 3,305 (+904.56%)
Mutual labels:  mapping
localization mapping
ROS nodes for outdoor SLAM on a ground robot
Stars: ✭ 39 (-88.15%)
Mutual labels:  mapping
Face Generator
Generate human faces with neural networks
Stars: ✭ 266 (-19.15%)
Mutual labels:  torch
Nonechucks
Deal with bad samples in your dataset dynamically, use Transforms as Filters, and more!
Stars: ✭ 304 (-7.6%)
Mutual labels:  torch
Deep Learning Localization Mapping
A collection of deep learning based localization models
Stars: ✭ 300 (-8.81%)
Mutual labels:  mapping
Tensorflow Model Zoo.torch
InceptionV3, InceptionV4, Inception-Resnet pretrained models for Torch7 and PyTorch
Stars: ✭ 280 (-14.89%)
Mutual labels:  torch

Sparse-to-Dense

This repo implements the training and testing of deep regression neural networks for "Sparse-to-Dense: Depth Prediction from Sparse Depth Samples and a Single Image" by Fangchang Ma and Sertac Karaman at MIT. A video demonstration is available on YouTube. This repo offers the original implementation of the paper in Torch. The PyTorch version can be found here.

photo not available photo not available

This repo can be used for training and testing of

  • RGB (or grayscale image) based depth prediction
  • sparse depth based depth prediction
  • RGBd (i.e., both RGB and sparse depth) based depth prediction

Contents

  1. Requirements
  2. Training
  3. Testing
  4. Trained Models
  5. Benchmark
  6. Citation

Requirements

See the installation instructions for a step-by-step guide.

  • Install Torch on a machine with CUDA GPU.
  • Install cuDNN(v4 or above) and the Torch cuDNN bindings
  • If you already have both Torch and cuDNN installed, update packages and install dependencies.
     luarocks install nn
     luarocks install cunn
     luarocks install cudnn
     luarocks install optnet
    
  • Install the HDF5 format libraries. Files in our pre-processed datasets are in HDF5 formats.
     sudo apt-get update
     sudo apt-get install -y libhdf5-serial-dev hdf5-tools
     git clone https://github.com/davek44/torch-hdf5.git
     cd torch-hdf5
     luarocks make
     cd ..
    
  • Download the preprocessed NYU Depth V2 and/or KITTI datasets in HDF5 formats and place them under the data folder. The downloading process might take an hour or so. The NYU dataset requires 32G of storage space, and KITTI requires 81G.
     cd data
     wget http://datasets.lids.mit.edu/sparse-to-dense/data/kitti.tar.gz
     tar -xvf kitti.tar.gz && rm -f kitti.tar.gz
     wget http://datasets.lids.mit.edu/sparse-to-dense/data/nyudepthv2.tar.gz 
     tar -xvf nyudepthv2.tar.gz && rm -f nyudepthv2.tar.gz 
     cd ..
    
  • Download the networks pretrained on ImageNet datasets. In particular, use ResNet-50 for the NYU Depth V2 dataset, and ResNet-18 for the KITTI dataset. Place them under the pretrained folder.
     cd pretrained
     wget https://d2j0dndfm35trm.cloudfront.net/resnet-50.t7
     wget https://d2j0dndfm35trm.cloudfront.net/resnet-18.t7
     cd ..
    

Training

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

th main.lua --help

To run the training, simply run main.lua. By default, the script runs the RGB-based prediction network on NYU-Depth-V2 with 1 GPU and 2 data-loader threads without using pretrained weights.

th main.lua 

To train networks with different datasets, input modalities, loss functions, and components, see the example below:

th main.lua -dataset kitti -inputType rgbd -nSample 100 -criterion l1 -encoderType conv -decoderType upproj -pretrain true

Training results will be saved under the results folder.

Model Options

Parameter Options Remarks
datasets nyudepthv2, kitti
inputType rgb, rgbd, d, g, gd d:sparse depth only; g: grayscale
nSample non-negative integer (0 for rgb and g)
criterion l1, l2, berhu
pretrain false, true
rep linear, log, inverse representation of input depth
encoderType conv, depthsep, channeldrop depthsep: depthwise separable convolution
decoderType upproj, upconv, deconv2, deconv3 deconv_n: transposed convolution with kernel size n-by-n

Testing

To test the performance of a trained model, simply run main.lua with the -testOnly true option, along with other model options. For instance,

th main.lua -testOnly true -dataset kitti -inputType rgbd -nSample 100 -criterion l1 -encoderType conv -decoderType upproj -pretrain true

Trained Models

Download our trained models at http://datasets.lids.mit.edu/sparse-to-dense/results/ to the results folder. For instance,

cd results
wget -r -np -nH --cut-dirs=2 --reject "index.html*" http://datasets.lids.mit.edu/sparse-to-dense/results/nyudepthv2.input=rgbd.nsample=200.rep=linear.encoder=conv.decoder=upproj.criterion=l1.lr=0.01.bs=16.pretrained=true/
cd ..

More trained models will be released.

Benchmark

  • Error metrics on NYU Depth v2:

    RGB rms rel delta1 delta2 delta3
    Roy & Todorovic (CVPR 2016) 0.744 0.187 - - -
    Eigen & Fergus (ICCV 2015) 0.641 0.158 76.9 95.0 98.8
    Laina et al (3DV 2016) 0.573 0.127 81.1 95.3 98.8
    Ours-RGB 0.514 0.143 81.0 95.9 98.9
    RGBd-#samples rms rel delta1 delta2 delta3
    Liao et al (ICRA 2017)-225 0.442 0.104 87.8 96.4 98.9
    Ours-20 0.351 0.078 92.8 98.4 99.6
    Ours-50 0.281 0.059 95.5 99.0 99.7
    Ours-200 0.230 0.044 97.1 99.4 99.8
    photo not available
  • Error metrics on KITTI dataset:

    RGB rms rel delta1 delta2 delta3
    Make3D 8.734 0.280 60.1 82.0 92.6
    Mancini et al (IROS 2016) 7.508 - 31.8 61.7 81.3
    Eigen et al (NIPS 2014) 7.156 0.190 69.2 89.9 96.7
    Ours-RGB 6.266 0.208 59.1 90.0 96.2
    RGBd-#samples rms rel delta1 delta2 delta3
    Cadena et al (RSS 2016)-650 7.14 0.179 70.9 88.8 95.6
    Ours-50 4.884 0.109 87.1 95.2 97.9
    Liao et al (ICRA 2017)-225 4.50 0.113 87.4 96.0 98.4
    Ours-100 4.303 0.095 90.0 96.3 98.3
    Ours-200 3.851 0.083 91.9 97.0 98.6
    Ours-500 3.378 0.073 93.5 97.6 98.9
    photo not available

    Note: our networks are trained on the KITTI odometry dataset, using only sparse labels from laser measurements.

Citation

If you use our code or method in your work, please consider citing the following:

@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}
}

Please direct any questions to Fangchang Ma at [email protected].

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].