ashawkey / nerf2mesh

[ICCV2023] Delicate Textured Mesh Recovery from NeRF via Adaptive Surface Refinement
https://me.kiui.moe/nerf2mesh/
MIT License
898 stars 88 forks source link

cannot run with --gui #82

Closed garrisonz closed 1 year ago

garrisonz commented 1 year ago

Hi, I can run nerf2mesh withou --gui correctly, but fail with --gui option.

This is the error when run with --gui

$ python main.py data/nerf_synthetic/lego/ --workspace trial_syn_lego/ -O --bound 1 --scale 0.8 --dt_gamma 0 --stage 0 --lambda_tv 1e-8 --iters 600 --gui
......
[INFO] Loading latest checkpoint ...
checkpoint: None
[WARN] No checkpoint found, abort loading latest model.
libGL: MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: /lib/x86_64-linux-gnu/libLLVM-12.so.1: undefined symbol: ffi_type_sint32, version LIBFFI_BASE_7.0
libGL: MESA-LOADER: failed to open \$${ORIGIN}/dri/swrast_dri.so: \$${ORIGIN}/dri/swrast_dri.so: cannot open shared object file: No such file or directory
libGL: MESA-LOADER: failed to open /usr/lib/dri/swrast_dri.so: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
Glfw Error 65543: GLX: Failed to create context: GLXBadFBConfig
python: /home/runner/work/DearPyGui/DearPyGui/thirdparty/glfw/src/window.c:533: glfwSetWindowPos: Assertion `window != NULL' failed.
Aborted (core dumped)

the error changes after set export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libffi.so.7.

$ python main.py data/nerf_synthetic/lego/ --workspace trial_syn_lego/ -O --bound 1 --scale 0.8 --dt_gamma 0 --stage 0 --lambda_tv 1e-8 --iters 600 --gui
......
[INFO] Loading latest checkpoint ...
checkpoint: None
[WARN] No checkpoint found, abort loading latest model.
libGL: MESA-LOADER: dlopen(/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so)
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /data/zhangyupeng/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /data/zhangyupeng/.drirc: No such file or directory.
register_dpg.9
in NeRFGUI.3
opt.gui1
Pass 'Combine redundant instructions' is not initialized.
Verify if there is a pass dependency cycle.
Required Passes:
Segmentation fault (core dumped)

can you help to solve this error? thanks.

garrisonz commented 1 year ago

The reason of first error undefined symbol: ffi_type_sint32, version LIBFFI_BASE_7.0 is that: libffi.so.7 links to libffi.so.8 link libffi.so.7 in ~/miniconda3/envs/nerf2mesh2/lib to system libffi.so.7.1.0 will solve this problem.

ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7.1.0 libffi.so.7
ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7.1.0 libffi.7.so

but not initialized error still appears

$ python main.py data/nerf_synthetic/lego/ --workspace trial_syn_lego/ -O --bound 1 --scale 0.8 --dt_gamma 0 --stage 0 --lambda_tv 1e-8 --iters 600 --gui
.......
Pass 'Combine redundant instructions' is not initialized.
Verify if there is a pass dependency cycle.
Required Passes:
Segmentation fault (core dumped)

any comment for help? thanks.

garrisonz commented 1 year ago

rebuild conda environment, above errors disappears