NVlabs / instant-ngp

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

Cannot use the interactive tools/gui in testbed #135

Closed wangjksjtu closed 2 years ago

wangjksjtu commented 2 years ago

Hi, Thanks for the amazing works!! I have the following issue when I run ./build/testbed xxx

00:15:20 INFO     Loading NeRF dataset from
00:15:20 INFO       data/nerf/fox/transforms.json
00:15:20 SUCCESS  Loaded 50 images of size 1080x1920 after 0s
00:15:20 INFO       cam_aabb=[min=[0.5,8154.02,0.5], max=[0.5,8154.02,0.5]]
00:15:20 INFO     Loading network config from: configs/nerf/base.json
00:15:20 INFO     GridEncoding:  Nmin=16 b=1.51572 F=2 T=2^19 L=16
00:15:20 INFO     Density model: 3--[HashGrid]-->32--[FullyFusedMLP(neurons=64,layers=3)]-->1
00:15:20 INFO     Color model:   3--[SphericalHarmonics]-->16+16--[FullyFusedMLP(neurons=64,layers=4)]-->3
00:15:20 INFO       total_encoding_params=13074912 total_network_params=10240
Segmentation fault (core dumped)

Basically, the window cannot be opened correctly then the program crashed. Any thoughts/suggestions for debugging/resolving this issue? Many thanks for your great help!

The building/compilation is succeed:

[ 47%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/osmesa_context.c.o
[ 49%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/linux_joystick.c.o
[ 49%] Built target glfw_objects
...
[ 87%] Building CXX object CMakeFiles/ngp.dir/src/tinyobj_loader_wrapper.cpp.o
[ 89%] Building CUDA object CMakeFiles/ngp.dir/src/triangle_bvh.cu.o
[ 90%] Linking CUDA device code CMakeFiles/ngp.dir/cmake_device_link.o
[ 92%] Linking CXX static library libngp.a
[ 92%] Built target ngp
[ 94%] Building CUDA object CMakeFiles/testbed.dir/src/main.cu.o
[ 96%] Building CUDA object CMakeFiles/pyngp.dir/src/python_api.cu.o
[ 98%] Linking CXX executable testbed
[ 98%] Built target testbed
[100%] Linking CXX shared library pyngp.cpython-39-x86_64-linux-gnu.so
[100%] Built target pyngp

and I can run the testbed without gui (./build/testbed --scene data/nerf/fox --no_gui):

00:15:23 INFO     Loading NeRF dataset from
00:15:23 INFO       data/nerf/fox/transforms.json
00:15:23 SUCCESS  Loaded 50 images of size 1080x1920 after 0s
00:15:23 INFO       cam_aabb=[min=[0.5,2.08929e+28,0.5], max=[0.5,2.08929e+28,0.5]]
00:15:23 INFO     Loading network config from: configs/nerf/base.json
00:15:23 INFO     GridEncoding:  Nmin=16 b=1.51572 F=2 T=2^19 L=16
00:15:23 INFO     Density model: 3--[HashGrid]-->32--[FullyFusedMLP(neurons=64,layers=3)]-->1
00:15:23 INFO     Color model:   3--[SphericalHarmonics]-->16+16--[FullyFusedMLP(neurons=64,layers=4)]-->3
00:15:23 INFO       total_encoding_params=13074912 total_network_params=10240
00:15:24 INFO     iteration=16 loss=0.0306192
00:15:24 INFO     iteration=32 loss=0.0108214
00:15:24 INFO     iteration=48 loss=0.00559076
00:15:24 INFO     iteration=64 loss=0.00397174
00:15:24 INFO     iteration=80 loss=0.00673684
00:15:24 INFO     iteration=96 loss=0.00842872
00:15:25 INFO     iteration=112 loss=0.00739926
00:15:25 INFO     iteration=128 loss=0.0059811
00:15:25 INFO     iteration=144 loss=0.00504266
00:15:25 INFO     iteration=160 loss=0.00443394

The system info:

GTX Geforce 3090
cuda-11.3
cudnn-8.3.1

Looking forward to your reply!

wkailiu commented 2 years ago

I have the same problem, how did you solve it?

wangjksjtu commented 2 years ago

Hi, I found that using the gui needs the OpenGL components. For me, I just reinstalled the Nvidia driver without the config --no-opengl-files. Hope it help in your case!