Git Product home page Git Product logo

rednet's Introduction

REDNet

implementation of REDNet

“A Novel Recurrent Encoder-Decoder Structure for Large-Scale Multi-view Stereo Reconstruction from An Open Aerial Dataset”(arxiv:https://arxiv.org/abs/2003.00637)

The proposed network was trained and tested on a single NVIDIA TITAN RTX 2080Ti (24G).

Requirements

CUDA 10.0
cudnn 7.6
python 3.6
tensorflow-gpu 1.13.1
numpy 1.18
opencv-python 4.1

Data Preparation

  1. Download the WHU MVS dataset. http://gpcv.whu.edu.cn/data/WHU_dataset/WHU_MVS_dataset.zip.
  2. Unzip the dataset to the WHU_MVS_dataset folder.

Train

  1. In train.py, set data_root to your train data path YOUR_PATH/WHU_MVS_dataset/train
  2. Train REDNet (TITAN RTX 2080Ti 24G):
python train.py

Test

  1. Download the pre-trained REDNet model (http://gpcv.whu.edu.cn/data/download/MODEL_FOLDER.zip)
    Unzip it to MODEL_FOLDERfolder.
  2. In test.py, set dense_folder to your test data path YOUR_PATH/WHU_MVS_dataset/test, set model_dir to your model path MODEL_FOLDER, set depth sample number max_d.
  3. Run REDNet:
python test.py 

The test outputs are stored in YOUR_PATH/WHU_MVS_dataset/test/depths_rednet/, including depth map XXX_init.pfm, probability map XXX_prob.pfm, scaled images XXX.jpg and camera parameters XXX.txt.

Predict

If you want to apply REDNet to your own data, please structure your data into such a folder.

Image Files

All image files are stored in the Images folder.

Camera files

All camera files are stored in the Camsfolder.
The text file contains the camera extrinsic, intrinsic and the depth range:

extrinsic
E00 E01 E02 E03
E10 E11 E12 E13
E20 E21 E22 E23
E30 E31 E32 E33

f(pixel)  x0(pixel)  y0(pixel)

DEPTH_MIN   DEPTH_MAX   DEPTH_INTERVAL
IMAGE_INDEX 0 0 0 0 WIDTH HEIGHT

Make sure the camera extrinsic is Twc [Rwc|twc], camera orientation is XrightYup.

  1. In viewselection.py, set dense_folder to your data path.
  2. Run:
python viewselection.py

The output file viewpair.txt is stored in your data path.

  1. In predict.py, set dense_folder to your data path. Set model_dir to your model path MODEL_FOLDER, set depth sample number max_d and image size max_w, max_h.
  2. Run:
python predict.py

The outputs are stored in YOUR_DATA_PATH/depths_rednet/.

We provided the script fusion.py to apply depth map filter for post-processing, which converted the per-view depth maps to 3D point cloud.

  1. In fusion.py, set dense_folder to your data path.
  2. Run:
python fusion.py

Final point clouds are stored in YOUR_DATA_PATH/rednet_fusion/.

Reference

This project is based on the implementation of R-MVSNet. Thank Yao, Yao for providing the source code (https://github.com/YoYo000/MVSNet)

rednet's People

Contributors

gpcv-liujin avatar

Watchers

 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.