🚀 非常重要的环境配置 🚀
详细信息如下所示:
具体可以参考这篇:ubuntu配置多版本cuda+cudnn环境,及版本切换方法
git clone https://github.com/NVlabs/FoundationPose.git
weights/
目录中demo_data/
目录中model-free
的小样本版本。首先安装anaconda
或者miniconda
,具体可以参考这篇:【Linux】Ubuntu20.04版本配置pytorch环境2023.09.05【教程】
eigen3
到系统cd $HOME && wget -q https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz && \
tar -xzf eigen-3.4.0.tar.gz && \
cd eigen-3.4.0 && mkdir build && cd build
cmake .. -Wno-dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-std=c++14 ..
sudo make install
cd $HOME && rm -rf eigen-3.4.0 eigen-3.4.0.tar.gz
conda
环境并安装依赖# create conda environment
conda create -n foundationpose python=3.9
# activate conda environment
conda activate foundationpose
# Install Eigen3 3.4.0 under conda environment
conda install conda-forge::eigen=3.4.0
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH:/eigen/path/under/conda"
# install dependencies
python -m pip install -r requirements.txt
# Install NVDiffRast
python -m pip install --quiet --no-cache-dir git+https://github.com/NVlabs/nvdiffrast.git
# Kaolin (Optional, needed if running model-free setup)
python -m pip install --quiet --no-cache-dir kaolin==0.15.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.0.0_cu118.html
# PyTorch3D
python -m pip install --quiet --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py39_cu118_pyt200/download.html
# Build extensions
CMAKE_PREFIX_PATH=$CONDA_PREFIX/lib/python3.9/site-packages/pybind11/share/cmake/pybind11 bash build_all_conda.sh
如果配置过程中都没有问题,那么可以直接运行demo
python rum_demo.py
效果如下所示:
首先下载ycbv
数据集,链接如下:https://huggingface.co/datasets/bop-benchmark/datasets/tree/main/ycbv,数据集的大小是100GB左右
…待补充…
[1]FoundationPose: Unified 6D Pose Estimation and Tracking of Novel Objects
[2]FoundationPose复现及Realsense应用
[3]【6D位姿估计】数据集汇总 BOP