当前位置: 首页 > news >正文

【机器人】复现 UniGoal 具身导航 | 通用零样本目标导航 CVPR 2025

UniGoal的提出了一个通用的零样本目标导航框架,能够统一处理多种类型的导航任务。

支持 对象类别导航实例图像目标导航文本目标导航,而无需针对特定任务进行训练或微调。

本文分享UniGoal复现和模型推理的过程~

查找沙发,模型会根据输入的实例图片进行匹配的

目录

1、创建Conda环境

2、 安装habitat仿真环境

3、安装第三方的依赖库

3.1 安装LightGlue依赖

3.2 安装detectron2依赖

3.3 安装Grounded-Segment-Anything依赖

3.4 安装其他依赖库

4、下载模型权重

5、下载HM3D数据集

6、安装Ollama,配置LLM 和 VLM

7、模型推理


1、创建Conda环境

首先创建一个Conda环境,名字为unigoal,python版本为3.8

进行unigoal环境

conda create -n unigoal python=3.8
conda activate unigoal

然后下载unigoal代码,并解压:https://github.com/bagh2178/UniGoal

2、 安装habitat仿真环境

执行下面命令进行安装

cd UniGoal
conda install habitat-sim==0.2.3 -c conda-forge -c aihabitat
pip install -e third_party/habitat-lab

安装过程的打印信息:

安装成功啦~

3、安装第三方的依赖库

3.1 安装LightGlue依赖

pip install git+https://github.com/cvg/LightGlue.git

正常安装打印的信息: 

3.2 安装detectron2依赖

需要cuda>=12.1的,用nvcc --version查询

(unigoal) lgp@lgp-MS-7E07:~/2025_project/UniGoal$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0

如果是cuda11.x或更底版本的,需要安装或切换为cuda>=12.1的

将以下内容添加到 ~/.bashrc 

# 设置 CUDA 12.1 为默认版本
export CUDA_HOME=/usr/local/cuda-12.1
export PATH=/usr/local/cuda-12.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.1/lib64:$LD_LIBRARY_PATH

然后执行:

source ~/.bashrc

再安装detectron2:

pip install git+https://github.com/facebookresearch/detectron2.git

3.3 安装Grounded-Segment-Anything依赖

执行命令进行安装,等待安装完成~

git clone https://github.com/IDEA-Research/Grounded-Segment-Anything.git third_party/Grounded-Segment-Anything
cd third_party/Grounded-Segment-Anything
git checkout 5cb813f
pip install -e segment_anything
pip install --no-build-isolation -e GroundingDINO

3.4 安装其他依赖库

先安装pytorch::faiss-gpu,等待安装完成~

conda install pytorch::faiss-gpu

再安装安装其他依赖库

pip install -r requirements.txt

2025/5/12 补丁安装:

pip install openai mkl faiss-gpu

4、下载模型权重

分别下载sam_vit_h_4b8939.pthgroundingdino_swint_ogc.pth权重,放在data/models目录下

cd ../../
mkdir -p data/models
wget -O data/models/sam_vit_h_4b8939.pth https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth
wget -O data/models/groundingdino_swint_ogc.pth https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth

等待下载完成:

5、下载HM3D数据集

从这里下载 HM3D 场景数据集,从这里下载实例-图像-目标导航事件数据集。

数据集的结构概述如下:

UniGoal/
└── data/
    ├── datasets/
    │   └── instance_imagenav/
    │       └── hm3d/
    │           └── v3/
    │               └── val/
    │                   ├── content/
    │                   │   ├── 4ok3usBNeis.json.gz
    │                   │   ├── 5cdEh9F2hJL.json.gz
    │                   │   ├── ...
    │                   │   └── zt1RVoi7PcG.json.gz
    │                   └── val.json.gz
    └── scene_datasets/
        └── hm3d_v0.2/
            └── val/
                ├── 00800-TEEsavR23oF/
                │   ├── TEEsavR23oF.basis.glb
                │   └── TEEsavR23oF.basis.navmesh
                ├── 00801-HaxA7YrQdEC/
                ├── ...
                └── 00899-58NLZxWBSpk/

6、安装Ollama,配置LLM 和 VLM

分别执行下面命令:

curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.2-vision

成功啦~

7、模型推理

运行main.py,就可以进行模型推理啦

python main.py 

打印信息:

[22:03:27:032178]:[Assets] ResourceManager.cpp(2210)::loadMaterials : Idx 26:Flat.
[22:03:27:032183]:[Assets] ResourceManager.cpp(2210)::loadMaterials : Idx 27:Flat.
[22:03:27:062166]:[Sim] Simulator.cpp(442)::instanceStageForSceneAttributes : Successfully loaded stage named : data/scene_datasets/hm3d_v0.2/val/00877-4ok3usBNeis/4ok3usBNeis.basis.glb
[22:03:27:062184]:[Sim] Simulator.cpp(474)::instanceStageForSceneAttributes : 
---
The active scene does not contain semantic annotations : activeSemanticSceneID_ = 0  
---
[22:03:27:062207]:[Sim] Simulator.cpp(208)::reconfigure : CreateSceneInstance success == true for active scene name : data/scene_datasets/hm3d_v0.2/val/00877-4ok3usBNeis/4ok3usBNeis.basis.glb  with renderer.
[22:03:27:067606]:[Nav] PathFinder.cpp(568)::build : Building navmesh with 222 x 162 cells
[22:03:27:121110]:[Nav] PathFinder.cpp(842)::build : Created navmesh with 340 vertices 163 polygons
[22:03:27:121130]:[Sim] Simulator.cpp(898)::recomputeNavMesh : reconstruct navmesh successful
2025-05-12 22:03:27,122 Initializing task InstanceImageNav-v1
[05/12 22:03:27 detectron2]: Arguments: Namespace(confidence_threshold=0.5, config_file='configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml', input=['input1.jpeg'], opts=['MODEL.WEIGHTS', 'detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl', 'MODEL.DEVICE', 'cuda:0'], output=None, video_input=None, webcam=False)
[05/12 22:03:27 d2.checkpoint.detection_checkpoint]: [DetectionCheckpointer] Loading from detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl ...
[22:03:27:595720]:[Sensor] Sensor.cpp(69)::~Sensor : Deconstructing Sensor
Loading episodes from: data/datasets/instance_imagenav/hm3d/v3/val/content/4ok3usBNeis.json.gz
Changing scene: 0/data/scene_datasets/hm3d_v0.2/val/00877-4ok3usBNeis/4ok3usBNeis.basis.glb
rank:0, episode:1, cat_id:0, cat_name:chair

看一下运行效果,查找椅子:

查找不同的椅子,模型会根据输入的实例图片进行匹配的

查找卫生间:

分享完成~

相关文章推荐:

UniGoal 具身导航 | 通用零样本目标导航 CVPR 2025-CSDN博客

【机器人】复现 ECoT 具身思维链推理-CSDN博客

http://www.xdnf.cn/news/398935.html

相关文章:

  • SpringBoot校园失物招领信息平台
  • Shell脚本编程3(函数+正则表达式)
  • [特殊字符] 本地大模型编程实战(29):用大语言模型LLM查询图数据库NEO4J(2)
  • Modbus协议介绍
  • springboot旅游小程序-计算机毕业设计源码76696
  • Unity ML-Agents实战指南:构建多技能游戏AI训练系统
  • 在Ubuntu系统下编译OpenCV 4.8源码
  • react-diff-viewer 如何实现语法高亮
  • 一小时学会Docker使用!
  • 树莓派4基于Debian GNU/Linux 12 (Bookworm)开启VNC,使用MobaXterm连接VNC出现黑屏/灰屏问题
  • 笔记本电脑升级实战手册【扩展篇1】:flash id查询硬盘颗粒
  • 十四、继承与组合(Inheritance Composition)
  • 【Linux网络编程】HTTPS协议原理
  • 杨校老师项目之基于SSM与JSP的鲜花销售系统-【成品设计含文档】
  • node版本.node版本、npm版本和pnpm版本对应
  • 深入理解目标检测中的关键指标及其计算方法
  • 深度 |国产操作系统“破茧而出”:鸿蒙电脑填补自主生态空白
  • WebRTC实时音视频通话技术EasyRTC嵌入式音视频通信SDK,助力智慧物流打造实时高效的物流管理体系
  • Linux服务器管理面板新选择:mdserver-web深度解析与使用指南
  • 容器化-Docker-私有仓库Harbor
  • 【Web前端开发】CSS基础
  • 69、微服务保姆教程(十二)容器化与云原生
  • python打卡day22
  • MySQL 8.0安装(压缩包方式)
  • QMK键盘固件中LED锁定指示灯的配置与使用详解(实操部分+拓展)
  • 如何让rabbitmq保存服务断开重连?保证高可用?
  • 付费专栏·Python潮流周刊电子书合集(epub、pdf、markdown)下载
  • 基于微信小程序的城市特色旅游推荐应用的设计与实现
  • DVWA靶场保姆级通关教程--07SQL注入下
  • 机器学习第七讲:概率统计 → 预测可能性,下雨概率70%就是典型应用