Ubuntu20.04下GraspNet复现流程

Ubuntu20.04中GraspNet复现流程

🚀非常重要的环境配置🚀

  • ubuntu 20.04
  • cuda 11.0.1
  • cudnn v8.9.7
  • python 3.8.19
  • pytorch 1.7.0
  • numpy 1.23.5

详细的信息如下:

Image

笔者在复现的过程中遇到了许多的坑,现在记录一下,来帮助希望也能够复现的同学。

1.安装cuda和cudnn

具体可以参考这篇:ubuntu配置多版本cuda+cudnn环境,及版本切换方法

2.安装pytorch

具体可以参考这篇:【Linux】Ubuntu20.04版本配置pytorch环境2023.09.05【教程】

3.编译graspnetAPI

直接参考官方给的流程就好,参考这里:graspnet-baseline

然后下载官方给的预训练权重,运行demo

如果出现问题:

ImportError: numpy.core.multiarray failed to import ( auto-generated, because you didn’t call ‘numpy.import _array()’ after cimporting numpy; use ‘numpy.import array’ to disable if you are certain you don’t need it)

或者其他numpy相关的问题,我们可以把numpy的版本换成numpy==1.23.5,而不是默认的numpy==1.20.3

直接在你的虚拟环境中

pip install numpy==1.23.5

即可完成替换,然后再运行demo

sh command_demo.sh

即可出现以下的结果:

Image

Reference

[1]复现GraspNet遇到的问题-解决方法!
[2]GraspNet-baseline复现----Linux-Ubuntu

### 配置环境 为了在 Windows 环境下成功复现 GraspNet 项目,需先安装 Python 和必要的依赖项。推荐使用 Anaconda 或 Miniconda 来管理虚拟环境和包。 #### 创建并激活 Conda 虚拟环境 创建名为 `graspnet` 的新环境,并指定 Python 版本: ```bash conda create -n graspnet python=3.8 ``` 激活该环境: ```bash conda activate graspnet ``` #### 安装 PyTorch 及其他依赖项 通过清华镜像源加速下载过程,确保更快获取所需软件包。对于 PyTorch 1.8.0,在国内环境中可以这样安装[^1]: ```bash pip install torch torchvision torchaudio -f https://download.pytorch.org/whl/torch_stable.html ``` 接着按照需求安装 TensorFlow 和 JupyterLab: ```bash pip install tensorflow==2.2.0 -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn pip install --user jupyterlab -i https://pypi.tuna.tsinghua.edu.cn/simple ``` ### 获取 GraspNet 代码仓库 克隆 GitHub 上的 GraspNet 仓库至本地计算机: ```bash git clone https://github.com/graspnet/graspness_unofficial.git cd graspness_unofficial ``` 由于官方未提供预训练权重文件,可考虑从 anygrasp-sdk 中获得这些资源,不过这可能涉及到授权协议的问题[^2]。 ### 运行测试脚本验证设置是否正确 进入项目的根目录后尝试运行一些简单的例子来确认一切正常工作。如果遇到任何错误消息,则应仔细阅读文档或查阅社区支持寻求帮助。 ### 下载数据集 根据具体应用情况准备相应的输入数据。通常情况下,GraspNet 数据集可以通过其官方网站或其他公开渠道下载得到。
评论 13
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

木心

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值