Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depth grad, and add test #126

Open
wants to merge 3 commits into
base: grad_depth
Choose a base branch
from

Conversation

chenyuntc
Copy link

Test depth grad on xyz and alpha.
Note: I found the initialization of alpha is important:

  1. To optimize the alpha: if there are too many points, the initial alpha value need to be very small.
  2. To optimize the xyz coordinates, the initial alpha value need to be large enough.

Results: Optimize pts alpha only (red are all points, blue are points with high alpha,)
image

Results: Optimize pts coords only
image

Comment on lines 629 to 632
alpha_grad_from_depth = (T_i * (depth_i-d_pixel) + 1.0/(1.0-alpha) * \
(depth_w_i - acc_alpha_w_i* d_pixel)) / \
(org_accumulated_alpha+0.00001) * pixel_depth_grad
alpha_grad_from_accumulated_alpha = (T_i- 1.0/(1.0-alpha) * acc_alpha_w_i) * _accumulated_alpha_grad
Copy link
Owner

@wanmeihuali wanmeihuali Sep 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format your code. I haven't looked deep into your formula so I'm not sure if it is correct, but for implementation, it seems to be the same as your formula. Have you gotten it to converge on alpha in some more complex tests? e.g. as an extra loss?

Copy link
Author

@chenyuntc chenyuntc Sep 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formated the code, hopefully it's now easier to understand.

Have you gotten it to converge on alpha in some more complex tests? e.g. as an extra loss?

What do you mean as an "extra loss"? Do you mean train with RGB and depth loss together?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants