• Stars
    star
    135
  • Rank 269,297 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 2 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Official code of VolRecon (CVPR 2023)

VolRecon

Code of paper 'VolRecon: Volume Rendering of Signed Ray Distance Functions for Generalizable Multi-View Reconstruction' (CVPR 2023)

Project | arXiv

teaser

Abstract: The success of the Neural Radiance Fields (NeRF) in novel view synthesis has inspired researchers to propose neural implicit scene reconstruction. However, most existing neural implicit reconstruction methods optimize per-scene parameters and therefore lack generalizability to new scenes. We introduce VolRecon, a novel generalizable implicit reconstruction method with Signed Ray Distance Function (SRDF). To reconstruct the scene with fine details and little noise, VolRecon combines projection features aggregated from multi-view features, and volume features interpolated from a coarse global feature volume. Using a ray transformer, we compute SRDF values of sampled points on a ray and then render color and depth. On DTU dataset, VolRecon outperforms SparseNeuS by about 30% in sparse view reconstruction and achieves comparable accuracy as MVSNet in full view reconstruction. Furthermore, our approach exhibits good generalization performance on the large-scale ETH3D benchmark.

If you find this project useful for your research, please cite:

@misc{ren2022volrecon,
      title={VolRecon: Volume Rendering of Signed Ray Distance Functions for Generalizable Multi-View Reconstruction}, 
      author={Yufan Ren and Fangjinhua Wang and Tong Zhang and Marc Pollefeys and Sabine SΓΌsstrunk},
      journal={CVPR},
      year={2023}
}

Installation

Requirements

  • python 3.8
  • CUDA 10.2
conda create --name volrecon python=3.8 pip
conda activate volrecon

pip install -r requirements.txt

Reproducing Sparse View Reconstruction on DTU

  • Download pre-processed DTU dataset. The dataset is organized as follows:
root_directory
β”œβ”€β”€cameras
    β”œβ”€β”€ 00000000_cam.txt
    β”œβ”€β”€ 00000001_cam.txt
    └── ...  
β”œβ”€β”€pair.txt
β”œβ”€β”€scan24
β”œβ”€β”€scan37
      β”œβ”€β”€ image               
      β”‚   β”œβ”€β”€ 000000.png       
      β”‚   β”œβ”€β”€ 000001.png       
      β”‚   └── ...                
      └── mask                   
          β”œβ”€β”€ 000.png   
          β”œβ”€β”€ 001.png
          └── ...                

Camera file cam.txt stores the camera parameters, which includes extrinsic, intrinsic, minimum depth and depth range interval:

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

intrinsic
K00 K01 K02
K10 K11 K12
K20 K21 K22

DEPTH_MIN DEPTH_INTERVAL

pair.txt stores the view selection result. For each reference image, 10 best source views are stored in the file:

TOTAL_IMAGE_NUM
IMAGE_ID0                       # index of reference image 0 
10 ID0 SCORE0 ID1 SCORE1 ...    # 10 best source images for reference image 0 
IMAGE_ID1                       # index of reference image 1
10 ID0 SCORE0 ID1 SCORE1 ...    # 10 best source images for reference image 1 
...
  • In script/eval_dtu.sh, set DATASET as the root directory of the dataset, set OUT_DIR as the directory to store the rendered depth maps. CKPT_FILE is the path of the checkpoint file (default as our model pretrained on DTU). Run bash eval_dtu.sh on GPU. By Default, 3 images (--test_n_view 3) in image set 0 (--set 0) are used for testing.
  • In tsdf_fusion.sh, set ROOT_DIR as the directory that stores the rendered depth maps. Run bash tsdf_fusion.sh on GPU to get the reconstructed meshes in mesh directory.
  • For quantitative evaluation, download SampleSet and Points from DTU's website. Unzip them and place Points folder in SampleSet/MVS Data/. The structure looks like:
SampleSet
β”œβ”€β”€MVS Data
      └──Points
  • Following SparseNeuS, we clean the raw mesh with object masks by running:
python evaluation/clean_mesh.py --root_dir "PATH_TO_DTU_TEST" --n_view 3 --set 0
  • Get the quantitative results by running evaluation code:
python evaluation/dtu_eval.py --dataset_dir "PATH_TO_SampleSet_MVS_Data"
  • Note that you can change --set in eval_dtu.sh and --set during mesh cleaning to use different image sets (0 or 1). By default, image set 0 is used. The average chamfer distance of sets 0 and 1 is what we reported in Table 1.

Evaluation on Custom Dataset

We provide some helpful scripts for evaluation on custom datasets, which consists of a set of images. As discussed in the limitation section, our method is not suitable for very large-scale scenes because of the coarse global feature volume. The main steps are as follows:

  • Run COLMAP for sparse reconstruction.
  • Use colmap_input.py to convert COLMAP's sparse reconstruction results into the similar format as the datasets that we use. The dataset should be organized as:
root_directory
β”œβ”€β”€scene_name1
β”œβ”€β”€scene_name2 
      β”œβ”€β”€ images                 
      β”‚   β”œβ”€β”€ 00000000.jpg       
      β”‚   β”œβ”€β”€ 00000001.jpg       
      β”‚   └── ...                
      β”œβ”€β”€ cams                   
      β”‚   β”œβ”€β”€ 00000000_cam.txt   
      β”‚   β”œβ”€β”€ 00000001_cam.txt   
      β”‚   └── ...                
      └── pair.txt  

This step is mainly to get camera files and view selection (pair.txt). As discussed previously, the view selection will pick out best source views for a reference view, which also helps to further reduce the volume size. The camera file stores the camera parameters, which includes extrinsic, intrinsic, minimum depth and maximum depth:

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

intrinsic
K00 K01 K02
K10 K11 K12
K20 K21 K22

DEPTH_MIN DEPTH_MAX
  • The file code/dataset/general_fit.py is the dataset loader. The parameter self.offset_dist is the distance offset w.r.t. the reference view to generate a virtual viewpoint for rendering, which can be adjusted (set to 25mm by default).
  • Use script/eval_general.sh for image and depth rendering.

Training on DTU

root_directory
β”œβ”€β”€Cameras
β”œβ”€β”€Rectified
└──Depths_raw
  • In train_dtu.sh, set DATASET as the root directory of dataset; set LOG_DIR as the directory to store the checkpoints.

  • Train the model by running bash train_dtu.sh on GPU.

Acknowledgement

Part of the code is based on SparseNeuS and IBRNet.

More Repositories

1

GANLocalEditing

Jupyter Notebook
145
star
2

Kernel-Modeling-Super-Resolution

Official Implementation for Kernel Modeling Super-Resolution on Real Low-Resolution Images
MATLAB
92
star
3

MulT

(CVPR 2022) MulT: An End-to-End Multitask Learning Transformer
Jupyter Notebook
48
star
4

w2s

(ECCVW 2020) Joint Denoising and SR in Microscopy Imaging
MATLAB
48
star
5

Dunit

(CVPR 2020) DUNIT: Detection-Based Unsupervised Image-to-Image Translation
Python
25
star
6

ComicsDepth

(WACV 2022) Estimating Image Depth in the Comics Domain
Python
16
star
7

Fast-Zero-Learning-Fusion

Jupyter Notebook
15
star
8

VTAGML

(ICCV 2023) Vision Transformer Adapters for Generalizable Multitask Learning
Python
15
star
9

signal-leak-bias

Official implementation of "Exploiting the Signal-Leak Bias in Diffusion Models" (WACV 2024)
Jupyter Notebook
14
star
10

LELSD

Python
12
star
11

DSR

(ECCVW 2022) Towards Drone Image Super-Resolution
Python
12
star
12

Multi-Modal-Spectral-Image-Super-Resolution

Winner of PIRM2018 Challenge
Python
11
star
13

Tempsal

Official repository for the paper "TempSAL - Uncovering Temporal Information for Deep Saliency Prediction" (CVPR 2023)
Jupyter Notebook
10
star
14

MeshNCA

Official implementation of the paper titled "Mesh Neural Cellular Automata"
Jupyter Notebook
10
star
15

Cluster

Instructions on how to set-up the runAI cluster environment
Shell
9
star
16

DyNCA

Jupyter Notebook
9
star
17

PoGaIN

(SP Letters 2022) PoGaIN: Poisson-Gaussian Image Noise Modeling from Paired Samples
Jupyter Notebook
9
star
18

FG-NIC

(IEEE SPL 2021) Fidelity-Guided Noisy Image Classification
Python
6
star
19

BUIFD

(TIP 2020) Blind Universal Image Fusion Denoiser
Jupyter Notebook
6
star
20

Zero-Learning-Medical-Fusion

Official Implementation for Zero-Learning Medical Fusion, FUSION 2019
Jupyter Notebook
6
star
21

NoiseNCA

Official implementation of the paper titled "NoiseNCA: Noisy Seed Improves Spatio-Temporal Continuity of Neural Cellular Automata"
Jupyter Notebook
6
star
22

DEU

(ICIP 2021) Denoiser Epistemic Uncertainty
Jupyter Notebook
6
star
23

CCID

(EI 2022) Controllable Confidence-Based Image Denoising
Python
5
star
24

AI4VA

This is the GitHub repository for AI for Visual Arts Workshop and Challenges (AI4VA) in conjunction with ECCV 2024, Milano, Italy.
Jupyter Notebook
5
star
25

FastAdvL1

Python
5
star
26

AugSal

This is the GitHub repository for Data Augmentation for Saliency Prediction via Latent Diffusion paper in ECCV 2024, Milano, Italy
Python
4
star
27

Multispectral_Deblurring

MATLAB
4
star
28

DisSal

(TMLR 2022) Modeling Object Dissimilarity for Deep Saliency Prediction https://ivrl.github.io/DisSal
3
star
29

AdversaryLossLandscape

(NeurIPS 2020) On the Loss Landscape of Adversarial Training: Identifying Challenges and How to Overcome Them
Python
3
star
30

RobustBinarySubNet

Python
3
star
31

Drone-Shadow-Tracking

Official Implementation of "Drone Shadow Tracking"
Python
3
star
32

NEMTO

(ICCV 2023) NEMTO: Neural Environment Matting for Novel View and Relighting Synthesis of Transparent Objects
Python
3
star
33

NIRdehazing

Official Implementation of "Near-Infrared Fusion for Photorealistic Image Dehazing"
Python
2
star
34

InNeRF360

(CVPR 2024) InNeRF360: Text-Guided 3D-Consistent Object Inpainting on 360-degree Neural Radiance Fields
Python
2
star
35

dsi2i

DSI2I: Dense Style for Unpaired Exemplar-based Image-to-Image Translation
Python
1
star
36

diffusion-in-style

JavaScript
1
star
37

CS413-ComputationalPhotography

Jupyter Notebook
1
star
38

PolyEnvelope

(IEEE TNNLS 2021) Training Provably Robust Models by Polyhedral Envelope Regularization.
Python
1
star
39

Frequency_Tuned_Saliency

Python implementation of: "Frequency-tuned salient region detection" (CVPR 2009)
Python
1
star