NVlabs / instant-ngp

Instant neural graphics primitives: lightning fast NeRF and more
https://nvlabs.github.io/instant-ngp
Other
15.87k stars 1.91k forks source link

Forward motion condition get Nan when compute center of attention #714

Open lfxx opened 2 years ago

lfxx commented 2 years ago

Hi,thanks for your perfect work!Now i want to use your repo to do 3D Reconstruction on forward motion condition which its sequence is below: 00 01 02 As you can see,the pictures above is from front camera which is installed on a car.I get camera's pose with colmap.When i use colmap2nerf.py to get transforms.json,i get the log below:

outputting to transforms.json...
camera:
    res=(1920.0, 1080.0)
    center=(960.0, 540.0)
    focal=(2211.3184502671575, 2211.3184502671575)
    fov=(46.934236163112445, 27.44590930578496)
    k=(0.07704397215412837, 0) p=(0, 0) 
./images/02.jpg sharpness= 323.3120161916389
./images/03.jpg sharpness= 321.0100251535725
./images/01.jpg sharpness= 319.334991375297
./images/06.jpg sharpness= 318.26270785642356
./images/04.jpg sharpness= 324.22634442812256
./images/07.jpg sharpness= 309.6317750120231
./images/00.jpg sharpness= 320.6818831131263
./images/05.jpg sharpness= 319.2162634157281
./images/08.jpg sharpness= 307.8908886276349
./images/09.jpg sharpness= 299.05175168259365
./images/10.jpg sharpness= 295.2141400292049
up vector was [-0.99986248 -0.00152616  0.01651351]
computing center of attention...
../../../scripts/colmap2nerf.py:268: RuntimeWarning: invalid value encountered in true_divide
  totp /= totw
[nan nan nan]
avg camera distance from origin nan
11 frames
writing transforms.json

When computing center of attention,i get Nan.Any suggestions here?

aradhyamathur commented 2 years ago

I receive the same error, seems like totp and totw both contain zeros. Not sure why. @lfxx Were you able to resolve it ?