Ubuntu 20.04 下DeepSDF环境配置笔记

根据官方 github 教程: https://github.com/facebookresearch/DeepSDF

下面详细讲解下列Dependencies的配置:

CLI11

git clone https://github.com/CLIUtils/CLI11.git

修改DeepSDF/CMakeLists.txt添加:

# find_package(CLI11 CONFIG REQUIRED)

set(CLI11_DIR "/home/xxx//libraries/CLI11/")

include_directories(${CLI11_DIR}/include)

注意需要修改当前CLI11的clone目录。

Eigen3

sudo apt install libeigen3-dev

Nanoflann

git clone https://github.com/jlblancoc/nanoflann.git

修改DeepSDF/CMakeLists.txt

# find_package(nanoflann REQUIRED)

set(nanoflann_DIR "/home/xxx/workspace/object/xxx/DeepSDF/libraries/nanoflann)

include_directories(${nanoflann_DIR}/include)

Pangolin

  • 注意需要 0.6 版本 Pangolin

重点: 若在没有显示器的情况下使用远程服务器,需要考虑 headless mode 做 preprocessing.

git clone https://github.com/stevenlovegrove/Pangolin.git

git checkout v0.6

根据 DeepSDF 介绍

The preprocessing script requires an OpenGL context, and to acquire one it will open a (small) window for each shape using Pangolin. If Pangolin has been compiled with EGL support, you can use the "headless" rendering mode to avoid the windows stealing focus. Pangolin's headless mode can be enabled by setting the PANGOLIN_WINDOW_URI environment variable as follows:

调查如何使用 headless 编译 Pangolin

  • Replace GLX with EGL for X11 by christian-rauch · Pull Request #389 · stevenlovegrove/Pangolin · GitHub

注意安装下列 Dependencies

Wayland

* pkg-config: sudo apt install pkg-config

* Wayland and EGL:sudo apt install libegl1-mesa-dev libwayland-dev libxkbcommon-dev wayland-protocols

EGL 安装完毕似乎就自动检查了

-- Checking for module 'wayland-egl'

--   Found wayland-egl, version 18.1.0

DeepSDF/CMakeLists.txt中修改无需要的 CLI, Nano Link libraries,将出现的下列两项删除:

nanoflann::nanoflann

CLI11::CLI11

--

开始编译 DeepSDF

mkdir build

cd build

cmake ..

make -j

编译成功。

--

开始运行预处理

为了开启 headless mode,首先在控制台输入:

export PANGOLIN_WINDOW_URI=headless://

接着正常执行preprocessing

python preprocess_data.py --data_dir data --source /home/xxx/ShapeNetCore.v2/ --name ShapeNetV2 --split examples/splits/sv2_chairs_test.json --skip

成功了!!!

你可能感兴趣的:(Ubuntu/Linux,3D,Vision,ubuntu,linux)