Where do you use mono_depth?
mks0601 opened this issue · 7 comments
Hi, thanks for your amazing work.
I was wondering where do you use depthmaps from mono_depth.
I can't find it in both of your pre-processing files including 1) https://github.com/apple/ml-neuman/blob/main/preprocess/export_alignment.py and 2) https://github.com/apple/ml-neuman/blob/main/preprocess/optimize_smpl.py.
Could you clarify where and how do you use the depthmaps from mono_depth?
The depth values are used for regularizing the background nerf, and you can find it inside the dataloader:
ml-neuman/datasets/background_rays.py
Line 51 in 0149d25
Hi, I backtraced your code, and it seems you're not using mono_depth
, but only use depth_maps
.
- Read depth data with from this code (https://github.com/apple/ml-neuman/blob/0149d258b2afe6ef65c91557bba9f874675871e4/train.py#L37C26-L37C26).
read_data_to_ram
can be found in here:Line 24 in 0149d25
read_data_to_ram
function callsread_image_to_ram
andread_depth_to_ram
function for each cap, where cap is an instance of this class (ml-neuman/data_io/neuman_helper.py
Line 22 in 0149d25
read_image_to_ram
first readsmono_depth
with this code (ml-neuman/data_io/neuman_helper.py
Line 52 in 0149d25
- But it overwrites the depth data with
read_depth_to_ram
again from the above 3rd stage, where theread_depth_to_ram
calls this function (Line 110 in 0149d25
- As
captured_depth
is defined withdepth_path
, notmono_depth_path
, it overwrites mono_depth data of the above 4th stage with depth data of the 5th stage. FYI,depth_path
refers to MVS depth data.
Could you check am I right? Thanks!
Sorry for the over complicated pipeline... It was inherited from a sfm project.
I think what happens to mvs depth and monocular depth is that we used monocular depth to fill the holes in mvs depth maps. see:
ml-neuman/data_io/neuman_helper.py
Lines 77 to 86 in 0149d25
Then the fused depth map is used to regularize the bkg nerf:
ml-neuman/datasets/background_rays.py
Line 82 in 0149d25
Great thanks! Now I got it. BTW, are you using other geometry data, such as densepose and keypooints when training NeRF (not for preprocessing)? It seems NeuManCapture
loads them but not use them
We didn't use densepose/keypoints during nerf training stage, iirc. You can double check by setting them to None manually.
Awesome. thanks!
Hi jianwei221, two follow-up questions.
- Why do you use mono_depth only for background? Why not use it for foreground?
- Why do you adjust scale and translation only based on human area like this (
ml-neuman/data_io/neuman_helper.py
Line 83 in 0149d25
Thanks in advance!