All Projects → kwea123 → MVSNet_pl

kwea123 / MVSNet_pl

Licence: other
MVSNet: Depth Inference for Unstructured Multi-view Stereo using pytorch-lightning

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to MVSNet pl

Meshroom
3D Reconstruction Software
Stars: ✭ 7,254 (+14704.08%)
Mutual labels:  multi-view-stereo, 3d-reconstruction
NerfingMVS
[ICCV 2021 Oral] NerfingMVS: Guided Optimization of Neural Radiance Fields for Indoor Multi-view Stereo
Stars: ✭ 253 (+416.33%)
Mutual labels:  multi-view-stereo, 3d-reconstruction
adareg-monodispnet
Repository for Bilateral Cyclic Constraint and Adaptive Regularization for Unsupervised Monocular Depth Prediction (CVPR2019)
Stars: ✭ 22 (-55.1%)
Mutual labels:  3d-reconstruction, depth-prediction
Openmvs
open Multi-View Stereo reconstruction library
Stars: ✭ 1,842 (+3659.18%)
Mutual labels:  multi-view-stereo, 3d-reconstruction
StructuredLight
Creating a 3D reconstruction of an object using multiple images
Stars: ✭ 42 (-14.29%)
Mutual labels:  3d-reconstruction
New-View-Synthesis
Collecting papers about new view synthesis
Stars: ✭ 437 (+791.84%)
Mutual labels:  3d-reconstruction
semantic-tsdf
Semantic-TSDF for Self-driving Static Scene Reconstruction
Stars: ✭ 14 (-71.43%)
Mutual labels:  3d-reconstruction
cv-arxiv-daily
🎓Automatically Update CV Papers Daily using Github Actions (Update Every 12th hours)
Stars: ✭ 216 (+340.82%)
Mutual labels:  3d-reconstruction
quickvision
An Easy To Use PyTorch Computer Vision Library
Stars: ✭ 49 (+0%)
Mutual labels:  pytorch-lightning
ShapeFormer
Official repository for the ShapeFormer Project
Stars: ✭ 97 (+97.96%)
Mutual labels:  3d-reconstruction
3d-recon
Implementation for paper "Learning Single-View 3D Reconstruction with Limited Pose Supervision".
Stars: ✭ 59 (+20.41%)
Mutual labels:  3d-reconstruction
PaiConvMesh
Official repository for the paper "Learning Local Neighboring Structure for Robust 3D Shape Representation"
Stars: ✭ 19 (-61.22%)
Mutual labels:  3d-reconstruction
temporal-depth-segmentation
Source code (train/test) accompanying the paper entitled "Veritatem Dies Aperit - Temporally Consistent Depth Prediction Enabled by a Multi-Task Geometric and Semantic Scene Understanding Approach" in CVPR 2019 (https://arxiv.org/abs/1903.10764).
Stars: ✭ 20 (-59.18%)
Mutual labels:  depth-prediction
labml
🔎 Monitor deep learning model training and hardware usage from your mobile phone 📱
Stars: ✭ 1,213 (+2375.51%)
Mutual labels:  pytorch-lightning
RfDNet
Implementation of CVPR'21: RfD-Net: Point Scene Understanding by Semantic Instance Reconstruction
Stars: ✭ 150 (+206.12%)
Mutual labels:  3d-reconstruction
map-floodwater-satellite-imagery
This repository focuses on training semantic segmentation models to predict the presence of floodwater for disaster prevention. Models were trained using SageMaker and Colab.
Stars: ✭ 21 (-57.14%)
Mutual labels:  pytorch-lightning
FastMVSNet
[CVPR'20] Fast-MVSNet: Sparse-to-Dense Multi-View Stereo With Learned Propagation and Gauss-Newton Refinement
Stars: ✭ 193 (+293.88%)
Mutual labels:  multi-view-stereo
pyRANSAC-3D
A python tool for fitting primitives 3D shapes in point clouds using RANSAC algorithm
Stars: ✭ 253 (+416.33%)
Mutual labels:  3d-reconstruction
weasel
Weakly Supervised End-to-End Learning (NeurIPS 2021)
Stars: ✭ 117 (+138.78%)
Mutual labels:  pytorch-lightning
SGDepth
[ECCV 2020] Self-Supervised Monocular Depth Estimation: Solving the Dynamic Object Problem by Semantic Guidance
Stars: ✭ 162 (+230.61%)
Mutual labels:  depth-prediction

MVSNet_pl

Unofficial implementation of MVSNet: Depth Inference for Unstructured Multi-view Stereo using pytorch-lightning

An improved version of MVSNet: CasMVSNet is available!

References & Credits

Official implementation: MVSNet

A pytorch implementation: MVSNet_pytorch. This code is heavily borrowed from his implementation. Thank xy-guo for the effortful contribution! Two main difference w.r.t. his repo:

  1. homo_warping function is rewritten in a more concise and slightly faster way.
  2. Use Inplace-ABN in the model to reduce GPU memory consumption (about 10%).

Installation

Hardware

  • OS: Ubuntu 16.04 or 18.04
  • NVIDIA GPU with CUDA>=10.0 (tested with 1 RTX 2080Ti)

Software

  • Python>=3.6.1 (installation via anaconda is recommended, use conda create -n mvsnet_pl python=3.6 to create a conda environment and activate it by conda activate mvsnet_pl)
  • Python libraries
    • Install core requirements by pip install -r requirements.txt
    • Install Inplace-ABN by pip install git+https://github.com/mapillary/[email protected]

Data download

Download the preprocessed DTU training data from original MVSNet repo and unzip. For the description of how the data is created, please refer to the original paper.

Training

Run

python train.py \
  --root_dir $DTU_DIR \
  --num_epochs 6 --batch_size 1 \
  --n_depths 192 --interval_scale 1.06 \
  --optimizer adam --lr 1e-3 --lr_scheduler cosine

Note that the model consumes huge GPU memory, so the batch size is generally small. For reference, the above command requires 5901MB of GPU memory.

IMPORTANT : the combination of --n_depths and --interval_scale is important: you need to make sure 2.5 x n_depths x interval_scale is roughly equal to 510. The reason is that the actual depth ranges from 425 to 935mm, which is 510mm wide. Therefore, you need to make sure all the depth can be covered by the depth planes you set. Some common combinations are: --n_depths 256 --interval_scale 0.8, --n_depths 192 --interval_scale 1.06 and --n_depths 128 --interval_scale 1.6.

See opt.py for all configurations.

Example training log

log1 log2 log3

Metrics

The metrics are collected on the DTU val set.

abs_err 1mm acc 2mm acc 4mm acc
Paper 7.25mm* N/A N/A N/A
This repo 6.374mm 54.43% 74.23% 85.8%

*From P-MVSNet Table 2.

Some observations on training

  1. Larger n_depths theoretically gives better results, but requires larger GPU memory, so basically the batch_size can just be 1 or 2. However at the meanwhile, larger batch_size is also indispensable. To get a good balance between n_depths and batch_size, I found that n_depths 128 batch_size 2 performs better than n_depths 192 batch_size 1 given a fixed GPU memory of 11GB. Of course to get even better results, you'll definitely want to scale up the batch_size by using more GPUs, and that is easy under pytorch-lightning's framework!
  2. Longer training epochs produces better results. The pretrained model I provide is trained for 16 epochs, and it performs better than the model trained for only 6 epochs as the paper did.
  3. Image color augmentation worsen the result, and normalization seems to have little to no effect. However, BlendedMVS claims otherwise, they obtain better results using augmentation.

Testing

  1. Download pretrained model from release.
  2. Use test.ipynb for a simple depth inference for an image.

The repo is only for training purpose for now. Please refer to the other repositories mentioned at the beginning if you want to evaluate the model.

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