dunbar12138 / DSNeRF

Code release for DS-NeRF (Depth-supervised Neural Radiance Fields)
https://www.cs.cmu.edu/~dsnerf/
MIT License
746 stars 126 forks source link

Application on other dataset:Replica room0 bad convergence #83

Open thua919 opened 1 year ago

thua919 commented 1 year ago

Hi there, Thanks for sharing this excellent code. I am trying to have this applied to the Replica dataset: https://github.com/facebookresearch/Replica-Dataset

The experiment configuration is like this: Hardware: Tesla V100 32.768G Ubuntu1604 Dataset: Replica room0: pick 21 views from the first 200 frames, processed by colmap Training: train/test 18:3 for 50k iteration replica room 20v

parameter config expname = replica_20v basedir = ./logs/release datadir = ./data/replica_room0_20v dataset_type = llff factor = 4 llffhold = 8 N_rand = 4096 N_samples = 64 N_importance = 128 use_viewdirs = True raw_noise_std = 1e0 no_ndc = True colmap_depth = True depth_loss = True depth_lambda = 0.1 i_testset = 5000 i_video = 10000 N_iters = 50000

When evaluated on 3 test images, the results are PSNR=16.997, 19.288 and 20.136 for RGB inference, respectively. The rendered videos are visually not recognizable as the original scenes, and the depth is not converged.

image image image

I have tried the exact dataset on NeRF and trained for 50k iterations as well, it works fine for RGB rendering (PSNR around 30), but the disparity hardly converges, either.

image

This synthetic dataset resembles the office room scene you demonstrated on your project homepage for the field of views and pose divergence. I am wondering what the problem is, and many thanks for any kind comments!

thua919 commented 1 year ago

There is three part of changes I made to suppress the error:

In run_nerf.py ,line 1081:

test_loss = img2mse(torch.Tensor(rgbs).to(device), images[i_test].to(device))

In load_llf.py, line 365, 380 and 383:

error_list=[] error_list.append(err) data_list.append({"depth":np.array(depth_list), "coord":np.array(coord_list), "weight":np.array(weight_list),"error":np.array(error_list)})

In load_llf.py, line 52:

args = ' '.join(['mogrify', '-resize', resizearg, '-format', 'jpg', '*.{}'.format(ext)])

dunbar12138 commented 1 year ago

Hi, thanks for your interest!

I suspect it's because COLMAP didn't get a reasonable reconstruction because the walls and floor are relatively textureless.