GDAOSU / vis2mesh

Vis2Mesh: Efficient Mesh Reconstruction from Unstructured Point Clouds of Large Scenes with Learned Virtual View Visibility ICCV2021
100 stars 16 forks source link

Installation issue and inference running #12

Closed quicktwit closed 2 years ago

quicktwit commented 2 years ago

Hi I installed the repo on my computer (Ubuntu 20)

Method 1: I followed all the steps. When it tried to build_openmvs, then I am getting cmake error:

[ 22%] Linking CXX static library ../../lib/libCommon.a
[ 22%] Built target Common
[100%] Linking C static library libzstd.a
[100%] Built target libzstd_static
[ 23%] No install step for 'zstd_ext'

[ 25%] Completed 'zstd_ext'
[ 25%] Built target zstd_ext
Makefile:148: recipe for target 'all' failed

I kept continue and then I launched the docker container. When I execute default example: python inference.py example/example1.ply

After getting all views, and pressing Q, nothing happening.

#Available Toolset#
vvtool: vvtool
o3d_vvcreator.py: o3d_vvcreator.py
ReconstructMesh: ReconstructMesh
#Project Settings#
Input Cloud: /workspace/example/example1.ply Exists: True
Input Mesh:  Exists: False
Input Textured Mesh:  Exists: False
Input Textured Mesh:  Exists: False
Base Cam:  Exists: False
Input Cam: /workspace/example/example1.ply_WORK/cam0.json Exists: False
Work Folder: /workspace/example/example1.ply_WORK Exists: True
Cam: cam0    ToolChain: NET.POINT_DELAY
ToolChain Work Folder: /workspace/example/example1.ply_WORK/VDVNet_cam0 Exists:True
Output Folder: /workspace/example/example1.ply_WORK/VDVNet_cam0/out Exists:True
/workspace/tools/bin/o3d_vvcreator.py:72: MatplotlibDeprecationWarning: 
The set_window_title function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use `.FigureManagerBase.set_window_title` or GUI-specific methods instead.
  fig.canvas.set_window_title(f"Num of Virtual Views: {len(camjson)}")
/workspace/tools/bin/o3d_vvcreator.py:103: MatplotlibDeprecationWarning: 
The set_window_title function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use `.FigureManagerBase.set_window_title` or GUI-specific methods instead.
  fig.canvas.set_window_title(f"Num of Virtual Views: {len(camjson)}")
-- CamCreator Cmd:
o3d_vvcreator.py --output_list=/workspace/example/example1.ply_WORK/cam0.json --width=512 --height=512 /workspace/example/example1.ply
INFO:root:Valid Cams:31
vvtool: /opt/conda/lib/libtiff.so.5: no version information available (required by /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.3.2)
vvtool: /opt/conda/lib/libtiff.so.5: no version information available (required by /usr/lib/x86_64-linux-gnu/libvtkIOImage-6.3.so.6.3)
vvtool: /opt/conda/lib/libtiff.so.5: no version information available (required by /usr/lib/libgdal.so.20)
vvtool: /opt/conda/lib/libtiff.so.5: no version information available (required by /usr/lib/x86_64-linux-gnu/libpoppler.so.73)
vvtool: /opt/conda/lib/libtiff.so.5: no version information available (required by /usr/lib/x86_64-linux-gnu/libgeotiff.so.2)
libEGL warning: DRI2: failed to authenticate
  0%|                                                                                                                                                                               | 0/31 [00:00<?, ?it/s]/opt/conda/lib/python3.7/site-packages/torch/cuda/__init__.py:106: UserWarning: 
NVIDIA GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37.
If you want to use the NVIDIA GeForce RTX 3090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

  warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))

I think i am stucking here: https://github.com/GDAOSU/vis2mesh/blob/master/inference.py#L306

How do I get the final mesh reconstruction? What am I missing? I tried all ways but couldn't succeed.

quicktwit commented 2 years ago

I downgrade the torch version and no more stuck. And then it gives me this error:

Traceback (most recent call last):
  File "inference.py", line 388, in <module>
    main()
  File "inference.py", line 383, in main
    config=RunProcess(config)
  File "inference.py", line 325, in RunProcess
    p = subprocess.Popen(cmdArr, stdout=subprocess.PIPE)
  File "/opt/conda/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/opt/conda/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ReconstructMesh': 'ReconstructMesh'

I am guessing this error is may be because build_openmvs did not build it correctly. How do I fix this build issue?

quicktwit commented 2 years ago

I fixed the issue by changing zlib version.

Sapium59 commented 2 years ago

I met the same problem of No such file or directory: 'ReconstructMesh': 'ReconstructMesh'.

vvtool: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "tools/lib/network_predict.py", line 9, in <module>
    from model import *
ModuleNotFoundError: No module named 'model'
vvtool: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "inference.py", line 381, in <module>
    main()
  File "inference.py", line 376, in main
    config=RunProcess(config)
  File "inference.py", line 318, in RunProcess
    p = subprocess.Popen(cmdArr, stdout=subprocess.PIPE)
  File "/opt/conda/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/opt/conda/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ReconstructMesh': 'ReconstructMesh'

Howevert, when I check my zlib version with whereis zlib and vi /usr/include/zlib.h commandline, I find zlib-1.2.11. I think it is the expected version. So, do you have any suggestion about what I should do to deal with such issue? Thank you! @quicktwit

impaidk commented 2 years ago

@zhu-yuefeng I had to change the zlib version to 1.2.12 because the download link for zlib-1.2.11 doesn't exist anymore. They have officially replaced it with the newer version. So if you change the version to 1.2.12 it should work

Sapium59 commented 2 years ago

@zhu-yuefeng I had to change the zlib version to 1.2.12 because the download link for zlib-1.2.11 doesn't exist anymore. They have officially replaced it with the newer version. So if you change the version to 1.2.12 it should work

Thank you for quick reply! Do you mean I can simply assign zlib=1.2.12 in conan recipe, or there are other changes to make?

quicktwit commented 2 years ago

Hi @zhu-yuefeng This version change should be available only in this branch: https://github.com/GDAOSU/vis2mesh/blob/master/tools/build_openmvs.sh#L7

And then I think you can change the zlib version (for example: http://zlib.net/zlib-1.2.12.tar.gz) here: https://github.com/GDAOSU/openMVS_mvasupport/blob/09fdd45e23c4b4fd3a0a4258f8294aae6e9fe8d9/build/Modules/import_zlib.cmake#L4

Let me know if that works. Thank you

Sapium59 commented 2 years ago

Somehow I get vis2mesh working with zlib 1.2.11. Here is a brief summary:

  1. The fatal error to me was not zlib version. It was failure to imported model. The cause was that I changed project structured but forgot to edit PATH environment variable. After editing PATH everything went well.
  2. One way to use zlib 1.2.11 is to get a zlib-1.2.11.tar.gz file somehow, move it to /openMVS_build/libs/MVArchive/zlib/src/', and comment the command of downloading it from remote (these lines are right after...perform download...in.../openMVS_build/libs/MVArchive/CMakeFiles/zlib_ext.dir/build.cmake`), and just go on. This is probably a wild and UNRECOMMENDED way but works for me.
  3. Perhaps I will try quicktwit's suggestion later and update. It depends. But thank you anyway!