基于深度学习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
相关推荐
新加坡内哥谈技术19 分钟前
OpenAI完成了其盈利结构的重组
人工智能
新智元30 分钟前
「美队」老黄深夜扔出地表最强 GPU!算力百倍狂飙,下次改演雷神
人工智能·openai
奋斗的蛋黄35 分钟前
SRE 进阶:AI 驱动的集群全自动化排查指南(零人工干预版)
运维·人工智能·kubernetes·自动化
大模型知识官38 分钟前
在智能体开发框架——Langgraph中的执行流程分析
人工智能
新智元38 分钟前
维基百科,终结了!马斯克开源版上线,用 AI 重写「真相」
人工智能·openai
来让爷抱一个38 分钟前
技术文档搭建实战:基于PandaWiki的五步自动化方案
运维·人工智能·自动化
WHFENGHE1 小时前
输电线路防外破在线监测装置是什么
人工智能·物联网
asfdsfgas1 小时前
从加载到推理:Llama-2-7b 昇腾 NPU 全流程性能基准
人工智能·llama
猿代码_xiao1 小时前
大模型微调完整步骤( LLama-Factory)
人工智能·深度学习·自然语言处理·chatgpt·llama·集成学习
文火冰糖的硅基工坊1 小时前
[创业之路-708]:华为不仅仅是传统的通信设备提供商
人工智能·华为