LiDAR-Diffusion icon indicating copy to clipboard operation
LiDAR-Diffusion copied to clipboard

Bug in geometric loss

Open herolada opened this issue 1 year ago • 0 comments

There is the [-1, 1] -> [0, 1] transformation done twice in a row, when transforming from range image to point-cloud in the GeoConverter, which serves the geometric loss. Excerpt from code:

def forward(self, input):
        input = input / 2. + .5  # [-1, 1] -> [0, 1]

        input_coord = self.convert_fn(input)
        ...

Then the convert_fn is either

def batch_range2xyz(self, imgs):
        batch_depth = (imgs * 0.5 + 0.5) * self.depth_scale
        ...

or

def batch_range2bev(self, imgs):
        batch_depth = (imgs * 0.5 + 0.5) * self.depth_scale
        ...

So the input goes through the x * 0.5 + 0.5 transformation twice, leaving its values in the interval [0.5, 1], which to my understanding is not what is desired.

herolada avatar Sep 05 '24 12:09 herolada