基于深度学习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
相关推荐
Oliver_NI1 天前
RAG 检索为什么需要 Hybrid Search?从 Dense、BM25 到 Reranker
人工智能·agent
众人皆醒我独醉1 天前
分布式训练与 Ring AllReduce:从单卡绝望到多卡协同
人工智能·面试·llm
昭阳1 天前
4 个 vibe coding 项目,一个普通前端的半年
前端·人工智能·设计
阿古大王1 天前
Youtube视频笔记工具怎么选:NoteAi、billNotes、NoteGPT 横向对比
人工智能
科技新资讯1 天前
AIGC重构工业设计 一号设计解锁智造新势能
人工智能·重构·aigc
东方小月1 天前
从零开发一个 Coding Agent(八):如何使用 Agent 类管理对话状态
前端·人工智能
这张生成的图像能检测吗1 天前
(论文速读)基于鸡群算法变分模式分解的超低温振动传感器去噪
人工智能·信号处理·信号去噪·鸡群算法·模态分解
AI即插即用1 天前
即插即用系列 | IEEE TMI PLG-HN:原型学习引导的 CNN-Transformer 混合网络,攻克乳腺肿瘤分割难题
人工智能·深度学习·神经网络·学习·目标检测·cnn·transformer
AIyy8661 天前
2026小红书封面AI绘图工具横评:实测各平台出图质感与平台适配度
人工智能