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

I wonder how to make the depth file. #81

Open SEJUNHONG opened 1 year ago

SEJUNHONG commented 1 year ago

Hi~ I'm going to apply it to the new data instead of the dataset that provided your great work, dsnerf. So I'd appreciate it if you could tell me how to generate the 'train_depths.npy' file and how to make the information (depth, coord, error). image

dunbar12138 commented 1 year ago

Thanks for your interest!

Regarding running on your own data, you don't have to generate those files exactly. Instead, you can directly use the function here to load the depths after running COLMAP.

Hope it helps!

SEJUNHONG commented 1 year ago

I have one more question about train_depths.npy file. In one view in the file, there are 'depth', 'cord', and 'error', of which 'cord' and 'error' seem to be generated from the load_colmap_depth function as you mentioned above. I printed out the array length of each element in 2 views, the first one was 1310 and the second one was 1539. The size of the image is 4032x3024, and I wonder how the numbers like 1310 and 1539 above came out. Additionally, how do I create an colmap_depth.npy file using the depth image?

dunbar12138 commented 1 year ago

We don’t have depths for every pixel of the whole image while there are only ~1000 keypoints respectively after running colmap and post-processing. If you have depths for the whole image, you can create the train_depths.npy by indexing every possible pixel, which might lead to inefficient data loading. Otherwise, you need to re-write the data loading part for better efficiency.