All Projects → atapour → Monoculardepth Inference

atapour / Monoculardepth Inference

Licence: mit
Inference pipeline for the CVPR paper entitled "Real-Time Monocular Depth Estimation using Synthetic Data with Domain Adaptation via Image Style Transfer" (http://www.atapour.co.uk/papers/CVPR2018.pdf).

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Monoculardepth Inference

Transferlearning
Transfer learning / domain adaptation / domain generalization / multi-task learning etc. Papers, codes, datasets, applications, tutorials.-迁移学习
Stars: ✭ 8,481 (+7274.78%)
Mutual labels:  domain-adaptation, style-transfer
ganslate
Simple and extensible GAN image-to-image translation framework. Supports natural and medical images.
Stars: ✭ 17 (-85.22%)
Mutual labels:  style-transfer, domain-adaptation
Ddc Transfer Learning
A simple implementation of Deep Domain Confusion: Maximizing for Domain Invariance
Stars: ✭ 83 (-27.83%)
Mutual labels:  domain-adaptation
Convolutional Handwriting Gan
ScrabbleGAN: Semi-Supervised Varying Length Handwritten Text Generation (CVPR20)
Stars: ✭ 107 (-6.96%)
Mutual labels:  domain-adaptation
Neural Style Transfer Papers
✏️ Neural Style Transfer: A Review
Stars: ✭ 1,372 (+1093.04%)
Mutual labels:  style-transfer
Adaptive Style Transfer
Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization
Stars: ✭ 85 (-26.09%)
Mutual labels:  style-transfer
Style transfer
Data-parallel image stylization using Caffe.
Stars: ✭ 106 (-7.83%)
Mutual labels:  style-transfer
Htcn
Implementation of "Harmonizing Transferability and Discriminability for Adapting Object Detectors" (CVPR 2020)
Stars: ✭ 82 (-28.7%)
Mutual labels:  domain-adaptation
Opencompounddomainadaptation Ocda
Pytorch implementation for "Open Compound Domain Adaptation" (CVPR 2020 ORAL)
Stars: ✭ 114 (-0.87%)
Mutual labels:  domain-adaptation
Lsd Seg
Learning from Synthetic Data: Addressing Domain Shift for Semantic Segmentation
Stars: ✭ 99 (-13.91%)
Mutual labels:  domain-adaptation
Fast Style Transfer
TensorFlow CNN for fast style transfer ⚡🖥🎨🖼
Stars: ✭ 10,240 (+8804.35%)
Mutual labels:  style-transfer
Detectron Self Train
A PyTorch Detectron codebase for domain adaptation of object detectors.
Stars: ✭ 99 (-13.91%)
Mutual labels:  domain-adaptation
Deep Image Analogy
The source code of 'Visual Attribute Transfer through Deep Image Analogy'.
Stars: ✭ 1,296 (+1026.96%)
Mutual labels:  style-transfer
Pytorch Neural Style Transfer
Reconstruction of the original paper on neural style transfer (Gatys et al.). I've additionally included reconstruction scripts which allow you to reconstruct only the content or the style of the image - for better understanding of how NST works.
Stars: ✭ 106 (-7.83%)
Mutual labels:  style-transfer
Frostnet
FrostNet: Towards Quantization-Aware Network Architecture Search
Stars: ✭ 85 (-26.09%)
Mutual labels:  style-transfer
Fast Style Transfer Coreml
Stars: ✭ 109 (-5.22%)
Mutual labels:  style-transfer
Imagenet R
ImageNet-R(endition) and DeepAugment
Stars: ✭ 82 (-28.7%)
Mutual labels:  domain-adaptation
Awesome Transfer Learning
Best transfer learning and domain adaptation resources (papers, tutorials, datasets, etc.)
Stars: ✭ 1,349 (+1073.04%)
Mutual labels:  domain-adaptation
Mxnet Gluon Style Transfer
Neural Style and MSG-Net
Stars: ✭ 105 (-8.7%)
Mutual labels:  style-transfer
Sketch To Art
🖼 Create artwork from your casual sketch with GAN and style transfer
Stars: ✭ 115 (+0%)
Mutual labels:  style-transfer

Real-Time Monocular Depth Estimation using Synthetic Data with Domain Adaptation via Image Style Transfer

Requires an NVIDIA GPU, Python 2 or 3, CUDA CuDNN, PyTorch 0.3.1 or PyTorch 0.4.0, and OpenCV,

General Pipeline                                                                                     General pipeline of the approach

Method:

"Monocular depth estimation using learning-based approaches has become relevant and promising in recent years. However, most monocular depth estimators either need to rely on large quantities of ground truth depth data, which is extremely expensive and difficult to obtain or predict disparity as an intermediary step using a secondary supervisory signal, leading to blurring and other artefacts. Training a depth estimation model using pixel-perfect synthetic environment data can resolve most of these issues, but introduces the problem of domain bias. This is the inability to apply a model trained on synthetic data to real-world scenarios. With recent advances in image style transfer and its connections with domain adaptation (Maximum Mean Discrepancy), our approach takes advantage of style transfer and adversarial training to predict pixel perfect depth from a single real-world color image based on training over a large corpus of synthetic environment data. Experimental results indicate the efficacy of our approach compared to contemporary state-of-the-art."

[Atapour-Abarghouei and Breckon, Proc. CVPR, 2018]


Reference implementation:

Produces a depth map output image based on a monocular color image input.

  • The input RGB image will first be transformed into the style of the images captured from a highly realistic synthetic virtual environment, on which the depth prediction network is trained.
  • The provided color image is used as the input to CycleGAN, which transforms the style of the image. Image style transfer is used as a method of domain adaptation.
  • The style transferred image is used as the input to a model trained on synthetic images and can produce pixel-perfect depth outputs.
  • The code provides an inference pipeline and can be run using the test harness: run_test.py
  • Example images are provided in the 'Examples' directory.
  • The training was in part performed based on the code from https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix, and we would like to thank the authors and contributors.

                                                                          Example of the results of the approach


Instructions to run the inference code using PyTorch 0.3.1:

$ git clone https://github.com/atapour/monocularDepth-Inference.git
$ cd monocularDepth-Inference
$ chmod +x ./download_pretrained_models.sh
$ ./download_pretrained_models.sh
$ python run_test.py --data_directory=./Examples --checkpoints_dir=./checkpoints --results_dir=./results

Instructions to run the inference code using PyTorch 0.4.0:

$ git clone https://github.com/atapour/monocularDepth-Inference.git
$ cd monocularDepth-Inference
$ chmod +x ./download_pretrained_models.sh
$ ./download_pretrained_models.sh
$ python remove_running_stats.py
$ python run_test.py --data_directory=./Examples --checkpoints_dir=./checkpoints --results_dir=./results

The output results are written in a directory taken as an argument to the test harness ('./results' by default):

  • the script entitled "download_pretrained_models.sh" will download the required pre-trained models and checks the downloaded file integrity using MD5 checksum.
  • the checkpoints that are available for direct download were created using pyTorch 0.3.1 and will not work if you are using pyTorch 0.4.0. The provided python script named ' remove_running_stats.py' will remedy the situation.
  • the file with the suffix "_original" is the original input image.
  • the file with the suffix "_restyled" is the style transferred image.
  • the file with the suffix "_depth" is the output depth image.

Example:

Video Example

                                                                          Video Example - click image above to play.


Reference:

Real-Time Monocular Depth Estimation using Synthetic Data with Domain Adaptation via Image Style Transfer (A. Atapour-Abarghouei, T.P. Breckon), In Proc. Conf. Computer Vision and Pattern Recognition, 2018. [pdf] [demo]

@InProceedings{abarghouei18monocular,
  author = 		{Atapour-Abarghouei, A. and Breckon, T.P.},
  title = 		{Real-Time Monocular Depth Estimation using Synthetic Data with Domain Adaptation},
  booktitle = 	{Proc. Computer Vision and Pattern Recognition},
  pages =		{1-8},
  year = 		{2018},
  month = 		{June},
  publisher = 	{IEEE},
  keywords = 		{monocular depth, generative adversarial network, GAN, depth map, disparity, depth from single image},
}


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].