LLNeRF icon indicating copy to clipboard operation
LLNeRF copied to clipboard

About smooth loss

Open XLR-man opened this issue 3 months ago • 5 comments

Hi, thanks for your great work!

I am trying to replicate your work using pytorch framework. Following your form of code, I get preliminary results: image

It is obvious that there is an error in obtaining the enhanced image part. I initially found that my understanding was wrong in the smooth loss part. In your code, you first define three types of rays to calculate the loss by taking the raw pixels, horizontal and vertical pixels. So in my understanding, the ray origin or ray direction dimension of each batch should be (batch, 3,3)?

However, in my pytorch code, I defined the ray origin or ray direction dimension of each batch as (batch, 3), so I ignored the middle dimension, that is, I didn't get the three types of rays, which made smooth loss invalid.

So how should I fix it? Simply add a grid of extra pixels to get three types of rays? However, in the input network, its dimension needs to be changed into two-dimensional (batch* 3,3) to pass through the linear layers, and finally the reshape into (batch, 3,3) to calculate the smooth loss. Can such a method successfully obtain enhanced images?

I will appreciate for your help!

XLR-man avatar Apr 06 '24 15:04 XLR-man