Totoro97 / f2-nerf

Fast neural radiance field training with free camera trajectories
https://totoro97.github.io/projects/f2-nerf/
Apache License 2.0
933 stars 69 forks source link

Run into nan when training on ScanNet images #33

Open likojack opened 1 year ago

likojack commented 1 year ago

I followed all data preprocessing required and then ran f2-nerf on a short snippet (i.e. 50 frames with a 10 frame interval) of a ScanNet sequence and run into nan. Could you look into this please? The images are attached for your reference. The processed data is unfortunately too large to upload. images.zip

Totoro97 commented 1 year ago

Hi, thanks for your interest in this project! the Nan issue here might mainly be due to the black strips of the image borders. I crop the image by 15 pixels, removing the black strips, and the Nan disappears.

By the way, for more general cases, Nan is mainly due to the gradient scaling of the half-precision data type. https://pytorch.org/docs/stable/amp.html#gradient-scaling