ConceptGraphs 项目下载及安装教程
1. 项目介绍
ConceptGraphs 是一个开源项目,旨在通过开放词汇的3D场景图来实现感知和规划。该项目由多个研究人员和开发者共同维护,提供了丰富的功能和工具,支持从RGB-D视频中提取和处理3D场景图。ConceptGraphs 项目的主要目标是帮助开发者和研究人员在感知和规划领域进行更深入的研究和应用。
2. 项目下载位置
要下载 ConceptGraphs 项目,请使用以下命令:
git clone https://github.com/concept-graphs/concept-graphs.git
3. 项目安装环境配置
3.1 环境要求
- Python 3.10 或更高版本
- Conda 环境管理工具
- CUDA 11.8(如果使用GPU)
3.2 环境配置步骤
-
创建 Conda 环境
conda create -n conceptgraph anaconda python=3.10 conda activate conceptgraph
-
安装依赖库
pip install tyro open_clip_torch wandb h5py openai hydra-core distinctipy pip install ultralytics conda install -c pytorch faiss-cpu=1.7.4 mkl=2021 blas=1.0=mkl
-
安装 PyTorch
conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia
-
安装 PyTorch3D
conda install https://anaconda.org/pytorch3d/pytorch3d/0.7.4/download/linux-64/pytorch3d-0.7.4-py310_cu118_pyt201.tar.bz2
-
安装 gradslam 包
git clone https://github.com/krrish94/chamferdist.git cd chamferdist pip install . cd .. git clone https://github.com/gradslam/gradslam.git cd gradslam git checkout conceptfusion pip install .
3.3 环境配置示例图片
4. 项目安装方式
-
克隆项目
git clone https://github.com/concept-graphs/concept-graphs.git cd concept-graphs
-
安装项目依赖
pip install -e .
5. 项目处理脚本
5.1 运行3D重建
cd conceptgraph
SCENE_NAME=room0
python scripts/run_slam_rgb.py \
--dataset_root $REPLICA_ROOT \
--dataset_config $REPLICA_CONFIG_PATH \
--scene_id $SCENE_NAME \
--image_height 480 \
--image_width 640 \
--stride 5 \
--visualize
5.2 提取2D分割和区域特征
SCENE_NAME=room0
python scripts/generate_gsa_results.py \
--dataset_root $REPLICA_ROOT \
--dataset_config $REPLICA_CONFIG_PATH \
--scene_id $SCENE_NAME \
--image_height 480 \
--image_width 640 \
--stride 5
通过以上步骤,您可以成功下载、安装并运行 ConceptGraphs 项目。希望这篇教程对您有所帮助!
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考