city-super / Scaffold-GS

[CVPR 2024 Highlight] Scaffold-GS: Structured 3D Gaussians for View-Adaptive Rendering

Home Page:https://city-super.github.io/scaffold-gs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error about SIBR_viewer

boxuLibrary opened this issue · comments

hello, it's an excellent work. However, when I compile the render tools in the SIBR_viewer, I encounter a problem that I can not find the torch. Do you know how I can solve this problem? Thank you so much.

Screenshot from 2024-03-17 20-23-34

You need to download and configure libtorch(1.10) and choose the correct version according to your build mode (Debug or Release).

After downloading, compile according to the following process https://github.com/city-super/Scaffold-GS/tree/main/SIBR_viewers

Thanks, are there instructions for Linux? Because I am not familiar with windows.

When I run the original Gaussian Splatting, there is no similar problem. So I think the problem may be the Cmakelists?

Due to equipment reasons, we have not compiled it in linux before, but we will improve the Linux instructions in the near future.

Also, we figure out the cause of the problem. We'll work it out as soon as possible.

Hello! have you already figure out the linux version? I meet the same problem, and I've tried for a long time.

commented

I met the same error and this could be solved appropriately using this compile command:

Torch_DIR=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` cmake -Bbuild . -DCMAKE_BUILD_TYPE=Release

if you have installed the pytorch package.

I encounter another problem that:

undefined reference to `cv::imread(std::string const&, int)'

image

I compiler this viewer using the following Dockerfile:

ARG CUDA_VERSION=11.7.1
ARG OS_VERSION=22.04
#编译viewers的时候需要使用CUDNN
ARG CUDNN_VERSION=8
FROM nvidia/cuda:${CUDA_VERSION}-cudnn${CUDNN_VERSION}-devel-ubuntu${OS_VERSION} as baseimage 

# Set environment variables.
## Set non-interactive to prevent asking for user inputs blocking image creation.
ENV DEBIAN_FRONTEND=noninteractive
## Set timezone as it is required by some packages.
ENV TZ=Asia/Shanghai
## CUDA Home, required to find CUDA in some packages.
ENV CUDA_HOME="/usr/local/cuda"

#换源
RUN sed -i "s/archive.ubuntu.com/mirrors.cqu.edu.cn/g" /etc/apt/sources.list \
    && sed -i "s/security.ubuntu.com/mirrors.cqu.edu.cn/g" /etc/apt/sources.list

#安装必要的软件
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
    curl \
    git \
    build-essential \
    cmake \
    && rm -rf /var/lib/apt/lists/*

FROM baseimage as buildimage
#安装依赖
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
    libglew-dev \
    libassimp-dev \
    libboost-all-dev \
    libgtk-3-dev \
    libopencv-dev \
    libglfw3-dev \
    libavdevice-dev \
    libavcodec-dev \
    libeigen3-dev \
    libxxf86vm-dev \
    libembree-dev \
    && rm -rf /var/lib/apt/lists/*

# 安装python以及python包
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
    python3-dev \
    python3-pip \
    python-is-python3 \
    && rm -rf /var/lib/apt/lists/*
#换源
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
#安装torch
RUN pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 \
    -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html

#添加源码
COPY . /sibr_core

#开始编译
WORKDIR /sibr_core

#设置环境变量,编译的时候会用到torch相关的库
# Variables used at build time.
ARG TORCH_CUDA_ARCH_LIST="3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX"

# cmake这一步会下载extlibs,与编译分开,便于进去调试
RUN mkdir build \
    && Torch_DIR=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` \
    cmake -Bbuild . -DCMAKE_BUILD_TYPE=Release
RUN  cmake --build build --target install

ENTRYPOINT [ "/sibr_core/install/bin/SIBR_gaussianViewer_app" ]

# how to build:
# docker build -t sibr_viewer:cudnn8-scaffold-gs -f docker/Dockerfile .

You can try to add -D_GLIBCXX_USE_CXX11_ABI=1 or -D_GLIBCXX_USE_CXX11_ABI=0 to your command.

commented

You can try to add -D_GLIBCXX_USE_CXX11_ABI=1 or -D_GLIBCXX_USE_CXX11_ABI=0 to your command.

I tried both options, but neither worked. Additionally, when I added the option, the following warning appeared:

CMake Warning:
  Manually-specified variables were not used by the project:

    _GLIBCXX_USE_CXX11_ABI