Skip to content

A complete pipeline for generating scene point clouds and meshes only from images.

Notifications You must be signed in to change notification settings

QiukuZ/Image-3DRecon

Repository files navigation

Image-3D-Reconstrction

A complete pipeline for generating scene point clouds and meshes.

Before starting, I assume that you have completed the installation of colmap and the configuration of the required python environment for cascade-stereo/casmvsnet_pl/ConvONet.

1.Register Image Pose[COLMAP]

Use My Desk data for example.

image1

Sparse Reconstruction

Use imgs2poses.py(from llff) to call COLMAP to run structure from motion to get 6DoF image poses and near/far depth bounds for the scene.

python imgs2poses.py --scenedir xxx/xxx/xxx 

Result will be saved in scenedir, and sparse model will be saved in scenedir/sparse/0

Dense Reconstruction

python sparse2dense.py --scenedir xxx/xxx/xxx

In this example, 6.6mins for stereo patch and 0.02mins for stereo fusion.

The results show that in low temperature textured regions, traditional depth restoration methods cannot achieve satisfactory results:

image2

CasMVSNet input from COLMAP SfM

In order to use CasMVSNet, the data needs to be transformed by(from casmvsnet/CasMVSNet)) :

python colmap2mvsnet.py --dense_folder xxx/dense --save_folder xxx/casmvsnet

Note: Before converting the colmap results, you need make sure that images are undistorted by COLMAP and saved in xxx/dense folder.

2.Generate Depth Image and Fusion[CasMVSNet]

Use CasMVSNet to generate depth map, pretrained model download here.

python test.py --dataset=general_eval --batch_size=1 --testpath_single_scene=xxx/casmvsnet --loadckpt=xxx/casmvsnet.ckpt --testlist=all --outdir=xxx/mvs --interval_scale=1.06

Only use 2mins to get fusion pointcloud.

image3

Also, you can use CasMVSNet_pl to get depth and fusion.[TODO]

3.Generate Mesh[ConvONet]

[TODO]

4.Easy Use

Just run the scripts to do all things!

# CasMVSNet depth pre
bash scripts/run_genpoints_casmvsnet.sh
# COLMAP depth pre
bash scripts/run_genpoints_colmap.sh

5.More Results

image3

image5

6.Acknowledgements

Thanks excellent work COLMAP.Thanks to Xiaodong Gu for his excellent work Cascade-Stereo.Thanks to kwea123 for his excellent work CasMVSNet_pl.Thanks to Songyou Peng for his excellent work Convolutional Occupancy Networks.Finally, thanks to Yao Yao for his excellent work MVSNet for its contribution to deep learning deep reconstruction.

About

A complete pipeline for generating scene point clouds and meshes only from images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published