分类:动作捕捉
github地址:https://github.com/openxrlab/xrmocap
所需环境:
Ubuntu18.04,conda22.9.0,CUDA11.4
目录
- 环境配置
环境配置
conda create -n XRmocap python=3.7 -y
conda activate XRmocap
# install ffmpeg for video and images
conda install -y ffmpeg
# install pytorch
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch -y
# install pytorch3d
conda install -y -c fvcore -c iopath -c conda-forge fvcore iopath
conda install -y -c bottler nvidiacub
conda install -y pytorch3d -c pytorch3d
# install mmcv-full
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.12.1/index.html
# install minimal_pytorch_rasterizer
pip install git+https://github.com/rmbashirov/minimal_pytorch_rasterizer.git
# install xrprimer
pip install xrprimer
# install mmhuman3d
pip install git+https://github.com/open-mmlab/mmhuman3d.git
###¥¥¥¥##¥#¥#¥#¥#¥#¥#¥
# install cudnn for mmdeploy
apt-get update && apt-get install -y --no-install-recommends \
libcudnn8=8.2.4.15-1+cuda11.4 \
libcudnn8-dev=8.2.4.15-1+cuda11.4 \
&& apt-mark hold libcudnn8 && \
rm -rf /var/lib/apt/lists/*
# install TensorRT for mmdeploy, please get TensorRT from nvidia official website
cd /opt && \
tar -xzvf TensorRT-8.2.3.0.Linux.x86_64-gnu.cuda-11.4.cudnn8.2.tar.gz && \
rm TensorRT-8.2.3.0.Linux.x86_64-gnu.cuda-11.4.cudnn8.2.tar.gz && \
cd TensorRT-8.2.3.0/python && \
pip install tensorrt-8.2.3.0-cp38-none-linux_x86_64.whl && \
# install mmdeploy and build ops
cd /opt && \
conda install cmake && \
git clone https://github.com/open-mmlab/mmdeploy.git && \
cd mmdeploy && \
git reset --hard 1b048d88ca11782de1e9ebf6f9583259167a1d5b && \
pip install -e . && \
mkdir -p build && cd build && \
cmake -DCMAKE_CXX_COMPILER=g++ -DMMDEPLOY_TARGET_BACKENDS=trt \
-DTENSORRT_DIR=/opt/TensorRT-8.2.3.0 \
-DCUDNN_DIR=/usr/lib/x86_64-linux-gnu .. && \
make -j$(nproc) && make install && \
make clean
# clone xrmocap
git clone https://github.com/openxrlab/xrmocap.git
cd xrmocap
# install requirements for build
pip install -r requirements/build.txt
# install requirements for runtime
pip install -r requirements/runtime.txt
# install requirements for services
pip install -r requirements/service.txt
# install xrmocap
rm -rf .eggs && pip install -e .