基于深度学习CenterPoint的3D目标检测部署实战

1.所用硬件

硬件:英伟达 Jetson AGX

环境:ubuntu 20.04

2.安装依赖

yaml 复制代码
CUDA Toolkit: 11.4
python: 3.8
numpy: 1.23.1
pytorch: 2.0.0
ros: notic
rospkg
ros_numpy:  (sudo apt-get install ros-$ros_release-ros-numpy)
pyyaml
argparse

2.拉取代码

bash 复制代码
git clone https://gitee.com/uuuu_qqq/livox_detection.git

cd livox_detection

python3 setup.py develop

3.解决部署过程遇到的bug

3.1 EasyInstallDeprecationWarning: easy_install command is deprecated.

解决EasyInstallDeprecationWarning: easy_install command is deprecated.

3.2 torch cuda版本安装

NVIDIA 优化框架:Jetson 平台 PyTorch 安装指南

3. 3 ModuleNotFoundError: No module named 'ros_numpy'

sudo apt-get install ros-noetic-ros-numpy

遇到下面问题:

bash 复制代码
http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/pool/main/r/ros-noetic-ros-numpy/ros-noetic-ros-numpy_0.0.5-2focal.20250510.062009_arm64.deb

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

于是直接复制下载链接,到官网下载,然后本地安装:

sudo dpkg -i ros-noetic-ros-numpy_0.0.5-xxxxx_arm64.deb

3. 4 AttributeError: module 'numpy' has no attribute 'float'.

bash 复制代码
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.

只需要找到对应代码,把np.float改为float或者np.int改为int;

4.开始执行

  1. 运行 ROS.

    bash 复制代码
    roscore
  2. 进入 'tools' 目录并运行 test_ros.py(预训练模型:.../pt/livox_model_1.pt 或 .../pt/livox_model_2.pt)

    bash 复制代码
    cd tools
    python3 test_ros.py --pt ../pt/livox_model_1.pt
  3. 播放rosbag。 (pointcloud 2的主题应该是/livox/lidar,或者自己在代码里改一下,直接接雷达数据也可以,话题类型要一致)

    bash 复制代码
    rosbag play [bag path]
  4. rviz可视化.

    bash 复制代码
    rviz -d rviz.rviz
相关推荐
天涯海风27 分钟前
检索增强生成(RAG) 缓存增强生成(CAG) 生成中检索(RICHES) 知识库增强语言模型(KBLAM)
人工智能·缓存·语言模型
跟着珅聪学java2 小时前
Apache OpenNLP简介
人工智能·知识图谱
AwhiteV3 小时前
利用图数据库高效解决 Text2sql 任务中表结构复杂时占用过多大模型上下文的问题
数据库·人工智能·自然语言处理·oracle·大模型·text2sql
Black_Rock_br3 小时前
AI on Mac, Your Way!全本地化智能代理,隐私与性能兼得
人工智能·macos
☺����3 小时前
实现自己的AI视频监控系统-第一章-视频拉流与解码2
开发语言·人工智能·python·音视频
fsnine4 小时前
机器学习——数据清洗
人工智能·机器学习
小猿姐4 小时前
KubeBlocks AI:AI时代的云原生数据库运维探索
数据库·人工智能·云原生·kubeblocks
算法_小学生5 小时前
循环神经网络(RNN, Recurrent Neural Network)
人工智能·rnn·深度学习
吱吱企业安全通讯软件5 小时前
吱吱企业通讯软件保证内部通讯安全,搭建数字安全体系
大数据·网络·人工智能·安全·信息与通信·吱吱办公通讯