NVlabs / instant-ngp

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

record3d2nerf fail in linalg.py #1223

Open hcynomo opened 1 year ago

hcynomo commented 1 year ago

Can't transfer record3d file to nerf format successful and hit below error log

D:\NVIDIA\NGP\Instant-NGP-for-RTX-2000>python scripts\record3d2nerf.py --scene D:\temp\R3D\Pocari 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 716/716 [00:00<00:00, 39778.03it/s] computing center of attention... 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 716/716 [00:00<00:00, 718278.32it/s] Traceback (most recent call last): File "D:\NVIDIA\NGP\Instant-NGP-for-RTX-2000\scripts\record3d2nerf.py", line 171, in translation, scale = find_transforms_center_and_scale(transforms) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\NVIDIA\NGP\Instant-NGP-for-RTX-2000\scripts\record3d2nerf.py", line 62, in find_transforms_center_and_scale translation = min_line_dist(rays_o, rays_d) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\NVIDIA\NGP\Instant-NGP-for-RTX-2000\scripts\record3d2nerf.py", line 59, in min_line_dist pt_mindist = np.squeeze(-np.linalg.inv((np.transpose(A_i, [0,2,1]) @ A_i).mean(0)) @ (b_i).mean(0)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<__array_function__ internals>", line 200, in inv File "C:\Users\XRSPACE\AppData\Local\Programs\Python\Python311\Lib\site-packages\numpy\linalg\linalg.py", line 538, in inv ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\XRSPACE\AppData\Local\Programs\Python\Python311\Lib\site-packages\numpy\linalg\linalg.py", line 89, in _raise_linalgerror_singular raise LinAlgError("Singular matrix") numpy.linalg.LinAlgError: Singular matrix

jdiazram commented 1 year ago

I have the same problem...can you solve it?

bluelocate commented 1 year ago

Please check using rear camera. I also reproduce that issue while using front camera export data but It resolved when I change data with rear camera output.

nolwad commented 1 year ago

How are you able to use the rear camera? There's no option in the app to switch camera views right?

ZhaoLizz commented 1 year ago

Iphone 14, same issue. And I don't see any button to open the rear camera.