GQCNN

news2025/1/21 22:00:55

Berkeley AUTOLAB’s GQCNN Package — GQCNN 1.1.0 documentation (berkeleyautomation.github.io)

(3条消息) 机器人抓取(六)—— 抓取点检测(抓取位姿估计) gqcnn代码测试与解读_zxxRobot的博客-CSDN博客


GQ-CNN模型对生成数据集时使用的以下参数很敏感:

  1.         机器人抓手
  2.         深度摄像机
  3.         相机和工作区之间的距离。

因此,我们不能保证我们的预训练模型在其他物理设置上的性能。关于预训练的模型和示例策略的样本输入的更多信息,请参见Pre-trained Models and Sample Inputs.。


 


💚Prerequisites

Python

The gqcnn package has only been tested with Python 3.5, Python 3.6, and Python 3.7.

Ubuntu

The gqcnn package has only been tested with Ubuntu 12.04, Ubuntu 14.04 and Ubuntu 16.04.

Virtualenv

We highly recommend using a Python environment management system, in particular Virtualenv, with the Pip and ROS installations. Note: Several users have encountered problems with dependencies when using Conda.

🎈Pip Installation

The pip installation is intended for users who are only interested in
1) Training GQ-CNNs or
2) Grasp planning on saved RGBD images
, not interfacing with a physical robot.

If you have intentions of using GQ-CNNs for grasp planning on a physical robot, we suggest you install as a ROS package.

1. Clone the repository

$ git clone https://github.com/BerkeleyAutomation/gqcnn.git

2. Run pip installation

Change directories into the gqcnn repository and run the pip installation.

This will install gqcnn in your current virtual environment.

$ pip install .

🎈ROS Installation

Installation as a ROS package is intended for users who wish to use GQ-CNNs to plan grasps on a physical robot.

1. Clone the repository

Clone or download the project from Github.

$ cd <PATH_TO_YOUR_CATKIN_WORKSPACE>/src
$ git clone https://github.com/BerkeleyAutomation/gqcnn.git

2. Build the catkin package

Build the catkin package.

$ cd <PATH_TO_YOUR_CATKIN_WORKSPACE>
$ catkin_make

Then re-source devel/setup.bash for the package to be available through Python.


💚Overview

There are two main use cases of the gqcnn package:

1.在离线数据集中使用GQCNN模型,然后在RGBD图像上进行抓取规划
2.在RGBD图上使用预先训练的GQCNN模型

Prerequisites 先决条件

先下载示例模型和数据集

$ cd /path/to/your/gqcnn
$ ./scripts/downloads/download_example_data.sh
$ ./scripts/downloads/models/download_models.sh

🎈Running Python Scripts 运行python脚本

cd /path/to/your/gqcnn
python /path/to/script.py

💚Training

The gqcnn package can be used to train a Dex-Net 4.0 GQ-CNN model on a custom offline Dex-Net dataset.【软件包可用于在自定义离线模式上训练GQ-CNN模型数据集。】从头训练耗时,所以训练新网络最有效的方法是微调预训练的GQ-CNN模型的权重。Dex-Net 4.0 GQ-CNN model,已经在百万张图像上进行了训练。

若要微调 GQ-CNN ,则运行:

$ python tools/finetune.py <training_dataset_path> <pretrained_network_name> --config_filename <config_filename> --name <model_name>

The args are:

  1. training_dataset_path: Path to the training dataset.

  2. pretrained_network_name: Name of pre-trained GQ-CNN.

  3. config_filename: Name of the config file to use.

  4. model_name: Name for the model


训练GQ-CNN,选择不同的gripper,运行不同的代码

To train a GQ-CNN for a parallel jaw gripper on a sample dataset, run the fine-tuning script:

$ python tools/finetune.py data/training/example_pj/ GQCNN-4.0-PJ --config_filename cfg/finetune_example_pj.yaml --name gqcnn_example_pj

To train a GQ-CNN for a suction gripper run:

$ python tools/finetune.py data/training/example_suction/ GQCNN-4.0-SUCTION --config_filename cfg/finetune_example_suction.yaml --name gqcnn_example_suction

🎈Visualizing Training 训练可视化

gqcnn模型包含对通过Tensorboard可视化训练进度的支持。当训练脚本运行时,Tensorboard会自动启动,可以通过在网络浏览器中导航到localhost:6006来访问。

在那里你会发现类似下面的内容:

其中显示有用的训练统计数据,如验证误差、最小批量损失和学习率

Tensorflow摘要存储在model/<model_name>/tensorboard_summaries/


💚Analysis

检查训练和验证损失和分类的错误,有助于确保网络训练成功。想分析经过训练的GQ -CNN的性能,请运行:

$ python tools/analyze_gqcnn_performance.py <model_name>

The args are:

  1. model_name: Name of a trained model.


To analyze the networks we just trained, run:

$ python tools/analyze_gqcnn_performance.py gqcnn_example_pj
$ python tools/analyze_gqcnn_performance.py gqcnn_example_suction

💚Grasp Planning

抓取计划包括在给定的点云中寻找具有最高预测成功概率的抓取方式。在gqcnn软件包中,这被实现为通过最大化GQ-CNN的输出将RGBD图像映射到6-DOF抓取姿势的策略。最大化可以用迭代方法实现,如交叉熵法(CEM),它用于Dex-Net 2.0、Dex-Net 2.1、Dex-Net 3.0、Dex-Net 4.0,或者更快的全卷积网络,这在FC-GQ-CNN中使用。

我们在examples/中提供了策略的例子。特别是,我们提供了一个Python策略示例和一个ROS策略示例。注意,ROS策略需要安装ROS gqcnn,可以在这里找到。我们强烈建议使用Python策略,除非你需要使用ROS对物理机器人进行抓取规划。

Sample Inputs

Sample inputs from our experimental setup are provided with the repo:

  1. data/examples/clutter/phoxi/dex-net_4.0: Set of example images from a PhotoNeo PhoXi S containing objects used in Dex-Net 4.0 experiments arranged in heaps.

  2. data/examples/clutter/phoxi/fcgqcnn: Set of example images from a PhotoNeo PhoXi S containing objects in FC-GQ-CNN experiments arranged in heaps.

  3. data/examples/single_object/primesense/: Set of example images from a Primesense Carmine containing objects used in Dex-Net 2.0 experiments in singulation.

  4. data/examples/clutter/primesense/: Set of example images from a Primesense Carmine containing objects used in Dex-Net 2.1 experiments arranged in heaps.

请注意,在尝试这些样本输入时,你必须确保你所使用的GQ-CNN模型是为相应的摄像机和输入类型(单一化/杂乱化)训练的。


Pre-trained Models

Dex-Net 4.0的预训练的平行颚和吸力模型会随着gqcnn包的安装自动下载。如果你确实希望尝试旧的结果的模型(或我们的实验模型FC-GQ-CNN),所有预训练的模型都可以用下载:

$ ./scripts/downloads/models/download_models.sh

The models are:

  1. GQCNN-2.0: For Dex-Net 2.0, trained on images of objects in singulation with parameters for a Primesense Carmine.

  2. GQCNN-2.1: For Dex-Net 2.1, a Dex-Net 2.0 model fine-tuned on images of objects in clutter with parameters for a Primesense Carmine.

  3. GQCNN-3.0: For Dex-Net 3.0, trained on images of objects in clutter with parameters for a Primesense Carmine.

  4. GQCNN-4.0-PJ: For Dex-Net 4.0, trained on images of objects in clutter with parameters for a PhotoNeo PhoXi S.

  5. GQCNN-4.0-SUCTION: For Dex-Net 4.0, trained on images of objects in clutter with parameters for a PhotoNeo PhoXi S.

  6. FC-GQCNN-4.0-PJ: For FC-GQ-CNN, trained on images of objects in clutter with parameters for a PhotoNeo PhoXi S.

  7. FC-GQCNN-4.0-SUCTION: For FC-GQ-CNN, trained on images of objects in clutter with parameters for a PhotoNeo PhoXi S.

请注意,GQ-CNN模型对数据集生成过程中使用的参数很敏感,特别是:1)抓手的几何形状,我们所有的预训练模型都使用ABB YuMi平行颚式抓手;2)相机的内在结构,我们所有的预训练模型都使用Primesense Carmine或PhotoNeo Phoxi S(关于哪一个见上文);3)渲染时相机和工作区之间的距离,我们所有的预训练模型都是50-70厘米。因此,我们不能保证我们的预训练模型在其他物理设置上的性能。如果你有一个特定的使用案例,请联系我们。**我们正在积极研究如何生成更强大的数据集,可以跨机器人、相机和视角进行通用化!


Python Policy

The example Python policy can be queried on saved images using:

$ python examples/policy.py <model_name> --depth_image <depth_image_filename> --segmask <segmask_filename> --camera_intr <camera_intr_filename>

The args are:

  1. model_name: Name of the GQ-CNN model to use.

  2. depth_image_filename: Path to a depth image (float array in .npy format).

  3. segmask_filename: Path to an object segmentation mask (binary image in .png format).

  4. camera_intr_filename: Path to a camera intrinsics file (.intr file generated with BerkeleyAutomation’s perception package).

To evaluate the pre-trained Dex-Net 4.0 parallel jaw network on sample images of objects in heaps run:

$ python examples/policy.py GQCNN-4.0-PJ --depth_image data/examples/clutter/phoxi/dex-net_4.0/depth_0.npy --segmask data/examples/clutter/phoxi/dex-net_4.0/segmask_0.png --camera_intr data/calib/phoxi/phoxi.intr

To evaluate the pre-trained Dex-Net 4.0 suction network on sample images of objects in heaps run:

$ python examples/policy.py GQCNN-4.0-SUCTION --depth_image data/examples/clutter/phoxi/dex-net_4.0/depth_0.npy --segmask data/examples/clutter/phoxi/dex-net_4.0/segmask_0.png --camera_intr data/calib/phoxi/phoxi.intr

FC-GQ-CNN Policy

Our most recent research result, the FC-GQ-CNN, combines novel fully convolutional network architectures with our prior work on GQ-CNNs to increase policy rate and reliability. Instead of relying on the Cross Entropy Method (CEM) to iteratively search over the policy action space for the best grasp, the FC-GQ-CNN instead densely and efficiently evaluates the entire action space in parallel. It is thus able to consider 5000x more grasps in 0.625s, resulting in a MPPH (Mean Picks Per Hour) of 296, compared to the prior 250 MPPH of Dex-Net 4.0.

FC-GQ-CNN architecture.

You can download the pre-trained FC-GQ-CNN parallel jaw and suction models along with the other pre-trained models:

$ ./scripts/downloads/models/download_models.sh

Then run the Python policy with the --fully_conv flag.

To evaluate the pre-trained FC-GQ-CNN parallel jaw network on sample images of objects in heaps run:

$ python examples/policy.py FC-GQCNN-4.0-PJ --fully_conv --depth_image data/examples/clutter/phoxi/fcgqcnn/depth_0.npy --segmask data/examples/clutter/phoxi/fcgqcnn/segmask_0.png --camera_intr data/calib/phoxi/phoxi.intr

To evaluate the pre-trained FC-GQ-CNN suction network on sample images of objects in heaps run:

$ python examples/policy.py FC-GQCNN-4.0-SUCTION --fully_conv --depth_image data/examples/clutter/phoxi/fcgqcnn/depth_0.npy --segmask data/examples/clutter/phoxi/fcgqcnn/segmask_0.png --camera_intr data/calib/phoxi/phoxi.intr

💚Replicating Results

有两种方法来复制结果:

1.使用预先训练过的模型: 下载一个预先训练好的GQ-CNN模型,并运行一个例子政策。

2.从头开始训练: 下载原始数据集,训练一个GQ-CN模型,并使用你刚刚训练的模型运行一个例子策略。

我们鼓励使用方法1。因为2计算昂贵,原始数据集太大。


方法1:Using a Pre-trained Model

First download the pre-trained models.

$ ./scripts/downloads/models/download_models.sh

Dex-Net 2.0

Evaluate the pre-trained GQ-CNN model.

$ ./scripts/policies/run_all_dex-net_2.0_examples.sh

Dex-Net 2.1

Evaluate the pre-trained GQ-CNN model.

$ ./scripts/policies/run_all_dex-net_2.1_examples.sh

Dex-Net 3.0

Evaluate the pre-trained GQ-CNN model.

$ ./scripts/policies/run_all_dex-net_3.0_examples.sh

Dex-Net 4.0

To evaluate the pre-trained parallel jaw GQ-CNN model.

$ ./scripts/policies/run_all_dex-net_4.0_pj_examples.sh

To evaluate the pre-trained suction GQ-CNN model.

$ ./scripts/policies/run_all_dex-net_4.0_suction_examples.sh

FC-GQ-CNN

To evaluate the pre-trained parallel jaw FC-GQ-CNN model.

$ ./scripts/policies/run_all_dex-net_4.0_fc_pj_examples.sh

To evaluate the pre-trained suction FC-GQ-CNN model.

$ ./scripts/policies/run_all_dex-net_4.0_fc_suction_examples.sh

方法2:Training from Scratch 从0开始训练

Dex-Net 2.0

First download the appropriate dataset.

$ ./scripts/downloads/datasets/download_dex-net_2.0.sh

Then train a GQ-CNN from scratch.

$ ./scripts/training/train_dex-net_2.0.sh

Finally, evaluate the trained GQ-CNN.

$ ./scripts/policies/run_all_dex-net_2.0_examples.sh

Dex-Net 2.1

First download the appropriate dataset.

$ ./scripts/downloads/datasets/download_dex-net_2.1.sh

Then train a GQ-CNN from scratch.

$ ./scripts/training/train_dex-net_2.1.sh

Finally, evaluate the trained GQ-CNN.

$ ./scripts/policies/run_all_dex-net_2.1_examples.sh

Dex-Net 3.0

First download the appropriate dataset.

$ ./scripts/downloads/datasets/download_dex-net_3.0.sh

Then train a GQ-CNN from scratch.

$ ./scripts/training/train_dex-net_3.0.sh

Finally, evaluate the trained GQ-CNN.

$ ./scripts/policies/run_all_dex-net_3.0_examples.sh

Dex-Net 4.0

To replicate the Dex-Net 4.0 parallel jaw results, first download the appropriate dataset.

$ ./scripts/downloads/datasets/download_dex-net_4.0_pj.sh

Then train a GQ-CNN from scratch.

$ ./scripts/training/train_dex-net_4.0_pj.sh

Finally, evaluate the trained GQ-CNN.

$ ./scripts/policies/run_all_dex-net_4.0_pj_examples.sh

To replicate the Dex-Net 4.0 suction results, first download the appropriate dataset.

$ ./scripts/downloads/datasets/download_dex-net_4.0_suction.sh

Then train a GQ-CNN from scratch.

$ ./scripts/training/train_dex-net_4.0_suction.sh

Finally, evaluate the trained GQ-CNN.

$ ./scripts/policies/run_all_dex-net_4.0_suction_examples.sh

FC-GQ-CNN

To replicate the FC-GQ-CNN parallel jaw results, first download the appropriate dataset.

$ ./scripts/downloads/datasets/download_dex-net_4.0_fc_pj.sh

Then train a FC-GQ-CNN from scratch.

$ ./scripts/training/train_dex-net_4.0_fc_pj.sh

Finally, evaluate the trained FC-GQ-CNN.

$ ./scripts/policies/run_all_dex-net_4.0_fc_pj_examples.sh

To replicate the FC-GQ-CNN suction results, first download the appropriate dataset.

$ ./scripts/downloads/datasets/download_dex-net_4.0_fc_suction.sh

Then train a FC-GQ-CNN from scratch.

$ ./scripts/training/train_dex-net_4.0_fc_suction.sh

Finally, evaluate the trained FC-GQ-CNN.

$ ./scripts/policies/run_all_dex-net_4.0_fc_suction_examples.sh

💚Benchmarks

Dex-Net 2.0

Below are the highest classification accuracies achieved on the Dex-Net 2.0 dataset on a randomized 80-20 train-validation split using various splitting rules:

The current leader is a ConvNet submitted by nomagic.ai.

GQ is our best GQ-CNN for Dex-Net 2.0.


 API Documentation

GQ-CNN — GQCNN 1.1.0 documentation

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/468861.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

C#,OpenCv开发指南(02)——OpenCvSharp编程入门与矩阵Mat的基础知识

在 Visual Studio 中很方便搭建与使用 OpenCV 的 C# 的开发环境&#xff0c;几乎不用键盘输入。 使用 C# 开发 OpenCV 可以直接成为工业软件产品&#xff0c;而不是实验室程序。世界上几乎所有的视频厂家都提供 C# OpenCV 开发接口。 C#&#xff0c;人工智能&#xff0c;深度学…

常见jvm调优操作详细记录

最近很多小伙伴跟我说&#xff0c;自己学了不少JVM的调优知识&#xff0c;但是在实际工作中却不知道何时对JVM进行调优。今天&#xff0c;我就为大家介绍几种JVM调优的场景。 cpu占用过高 cpu占用过高要分情况讨论&#xff0c;是不是业务上在搞活动&#xff0c;突然有大批的流…

SpringBoot整合ELK做日志(超完整)

SpringBoot整合ELK日志系统 SpringBoot整合ELK做日志环境准备安装包准备ELK安装包Java11安装包 软件安装安装java11安装ElasticSearch安装Kibana安装Logstash 编写SpringBoot项目初始化SpringBoot项目修改代码编写Controller SpringBoot整合ELK做日志 环境准备 提前准备一台C…

SpringBoot+Linux操作系统与项目部署(这一篇就够了|超详细)

&#x1f648;作者简介&#xff1a;练习时长两年半的Java up主 &#x1f649;个人主页&#xff1a;程序员老茶 &#x1f64a; ps:点赞&#x1f44d;是免费的&#xff0c;却可以让写博客的作者开兴好久好久&#x1f60e; &#x1f4da;系列专栏&#xff1a;Java全栈&#xff0c;…

华为联合openEuler发布全新NFS+协议,实现NAS存储性能与可靠性倍增

在openEuler开发者大会2023上&#xff0c;华为携手openEuler发布NFS协议&#xff0c;实现单客户端访问NAS存储可靠性提升3倍、性能提升6倍&#xff0c;助力NAS存储全面满足新型生产核心场景下苛刻要求。 在数字转型的新时代&#xff0c;非结构化数据价值持续提升。金融、大企业…

一种IPC通信机制Gdbus详解

一、DBus介绍 常规进程间通信有管道&#xff0c;消息队列&#xff0c;共享内存&#xff0c;以及socket等&#xff0c;每个都有优劣&#xff0c;这次我们介绍一种高阶的进程间通信方式DBus。 DBus通信是IPC通信机制的一种方式&#xff0c;本身是建立在socket机制之上&#xff0…

计算机网络——快速了解常见应用层协议体系

文章目录 〇、加密算法对称加密非对称加密 一、远程登录——TELNET、SSH1.Telnet2.SSH 二、文件传输——FTP、SFTP、FTPS1.FTP2.SFTP3.FTPSSSL工作原理 三、电子邮件——SMTP、POP、IMAP1.SMTP&#xff08;推送邮件&#xff09;2.POP&#xff08;接收邮件&#xff09;3.IMAP 四…

计算机中的数据存储

计算机的存储规则&#xff1a; 文本、图片、声音所有的数据存储 在计算机当中一般会有三类数据&#xff1a;文本数据、图片数据以及声音数据其中文本它又包含了数字、字母以及汉字视频的本质是图片和声音的组合体。在计算机当中&#xff0c;任意的数据都是以二进制的形式来存储…

【Matlab】基于偏格式动态线性化的无模型自适应控制

例题来源&#xff1a;侯忠生教授的《无模型自适应控制&#xff1a;理论与应用》&#xff08;2013年科学出版社&#xff09;。 &#x1f449;对应书本 4.3 单输入单输出系统(SISO)偏格式动态线性化(PFDL)的无模型自适应控制(MFAC) 上一篇博客介绍了基于紧格式动态线性化的无模型…

K8S---Service

服务原理 容器化的问题&#xff1a; 1.自动调度 无法预知pod所在节点&#xff0c;pod的IP地址 2.有故障时&#xff0c;换新节点新ip进行部署 service就是解决这些问题 自动跟踪 clusterip不变 都能找到对应pod 主要靠后端pod的标签 负载均衡 通过iptables/LVS规则将访问的请…

MySQL 数据库概述

数据&#xff08;Data&#xff09; 描述事物的符号记录包括数字&#xff0c;文字、图形、图像、声音、档案记录等以“记录”形式按统一的格式进行存储 表 将不同的记录组织在一起用来存储具体数据 记录&#xff1a;行 字段&#xff08;属性&#xff09;&#xff1a;列 数…

[Gitops--7]Kubesphere 配置镜像仓库

Kubesphere 配置镜像仓库 1. Harbor https证书配置 1.1 生成Harbor证书 mkdir /apps/harbor/cert -p cd /apps/harbor/cert openssl genrsa -out ca.key 2048 openssl req -x509 -new -nodes -key ca.key -subj "/CCN/STShanghai/LShanghai/Opana/OUDevops/CNharbor.i…

HBase(3):集群搭建

1 基础环境需求 jdk1.8以上Hadoopzookeeper 2 下载HBase安装包 Apache Downloads 3 安装 3.1 上传解压HBase安装包 tar -xvzf hbase-3.0.0-alpha-3-bin.tar.gz -C /opt/ 3.2 修改HBase配置文件 &#xff08;1&#xff09;修改hbase-env.sh cd /opt/hbase-3.0.0-alpha-3-bi…

【音视频第21天】RTP、RTCP结合wireshark抓包详解

感觉单纯看理论没啥意思&#xff0c;结合RTCP、RTP来看一看抓包详解 RTP 实时传输协议RTP&#xff08;Realtime Transport Protocol&#xff09;&#xff1a;是针对Internet上多媒体数据流的一个传输协议, 由IETF作为RFC1889发布&#xff0c;现在最新的为RFC3550。RTP被定义为…

基于PyQt5的图形化界面开发——自制Redis图形化客户端(文末附源码)

基于PyQt5的图形化界面开发——自制Redis图形化客户端 前言1. Python第三方库安装及Redis学习1.1 Python第三方库安装1.2 Redis数据库安装和基础命令 2. 登录界面2.1 login.py2.2 image_login.py 3. 主界面3.1 main_ui.py3.2 image_main.py 4.界面切换5. 写在最后(附下载链接) …

软件测试笔记(三):黑盒测试

1 黑盒测试概述 黑盒测试也叫功能测试&#xff0c;通过测试来检测每个功能是否都能正常使用。在测试中&#xff0c;把程序看作是一个不能打开的黑盒子&#xff0c;在完全不考虑程序内部结构和内部特性的情况下&#xff0c;对程序接口进行测试&#xff0c;只检查程序功能是否按…

Java——把数组排成最小的数

题目链接 牛客网在线oj题——把数组排成最小的数 题目描述 输入一个非负整数数组numbers&#xff0c;把数组里所有数字拼接起来排成一个数&#xff0c;打印能拼接出的所有数字中最小的一个。 例如输入数组[3&#xff0c;32&#xff0c;321]&#xff0c;则打印出这三个数字能…

汇编语言(第3版)- 学习笔记 - 第1章-基础知识

汇编语言&#xff08;第3版&#xff09;- 学习笔记 - 第1章-基础知识 1.1 机器语言1.2 汇编语言的产生1.3 汇编语言的组成1.4 存储器1.5 指令和数据1.6 存储单元1.7 CPU对存储器的读写1.8 地址总线1.9 数据总线1.10 控制总线1.11 内存地址空间(概述)1.12 主板1.13 接口卡1.14 各…

NSSCTF-[NSSRound#X Basic]ez_z3 [MoeCTF 2022]Art [HDCTF2023]basketball

目录 NSSCTF-[NSSRound#X Basic]ez_z3 [MoeCTF 2022]Art [HDCTF2023]basketball NSSCTF-[NSSRound#X Basic]ez_z3 题目下载&#xff1a;下载 查壳&#xff1a; 发现有upx壳&#xff0c;但是使用upx -d命令不能脱壳&#xff0c;载入十六进制编辑器查看 把XYU改为UPX&#x…

netty/websocket服务器配置阿里云SSL证书安全访问配置,亲测有效

背景&#xff1a;java 微服务包括https访问和websocket访问&#xff0c;当https接口访问ws请求时报错,因为https能访问wss。 申请阿里云免费证书后&#xff0c;搜索各种教程比如nginx配置方式、netty访问证书等。走了不少弯路&#xff0c;终于走通一种。 关键点&#xff1a;1…