bennyguo / instant-nsr-pl

Neural Surface reconstruction based on Instant-NGP. Efficient and customizable boilerplate for your research projects. Train NeuS in 10min!
MIT License
851 stars 83 forks source link

Clamped input points before scaling in finite_difference #85

Closed alvaro-budria closed 1 year ago

alvaro-budria commented 1 year ago

Hi, I don't understand why the points_d_ are clamped to range (0, 1), and then scaled to the range (0, 1), rather than first clamped to range (-radius, radius) and then scaled from range (-radius, radius) to (0, 1).

The current approach is causing inputs in the [-1, 0] range to be mapped to 0 and thus have no associated gradient.

https://github.com/bennyguo/instant-nsr-pl/blob/fb0f174b96848abf245e5dd3243243f1533a1cc8/models/geometry.py#L174-L183

alvaro-budria commented 1 year ago

@bennyguo In case you have not encountered this error already, this will have get fixed for the Neuralangelo approach to work correctly.

bennyguo commented 1 year ago

Yes it's a bug 😅 I also noticed this when I implemented Neuralangelo. I'll fix this when I finish my experiments about Neuralangelo, and you can also open a PR to fix this.

bennyguo commented 1 year ago

Glad to hear you've also implemented Neuralangelo! I'm still experimenting on the DTU dataset and would love to chat about the implementation details if you're interested.

alvaro-budria commented 1 year ago

I was just starting to get my hands on the code, and so far I haven't implemented anything really. But I am happy to chat about the details with you if I can be of any help.

bennyguo commented 1 year ago

Great! How about a PR to get this bug fixed? I'll upload the Neuralangelo code very soon (hopefully tomorrow).

alvaro-budria commented 1 year ago

Sure, I'll have an open PR on this before you upload the code.