mobilenetv2
简介
mobilenetv2 图片分类算法示例使用图片或视频作为输入,通过 SpacemiT 智算核执行算法推理,发布物体类别的 ROS2 消息。
mobilenetv2 支持的目标类型包括人、动物、水果、交通工具等共1000种类型。具体支持的类别详见 COCO的官方标签。
应用场景:mobilenetv2 能够预测给定图片的类别,可实现数字识别、物体识别等功能,主要应用于文字识别、图像检索等领域。
平台要求
SpacemiT RISC-V:
- 已烧录 Bianbu ROS 系统镜像
环境准备
安装依赖项
sudo apt install python3-opencv ros-humble-cv-bridge ros-humble-camera-info-manager \
ros-humble-image-transport python3-spacemit-ort python3-yaml libyaml-dev python3-numpy
确保所有终端均导入:
source /opt/bros/humble/setup.bash
查看当前支持的模型配置
查看已经支持的更多 config_path
ros2 launch br_perception infer_info.launch.py | grep 'classification'
输出示例:
- config/classification/resnet18.yaml
- config/classification/resnet50.yaml
- config/classification/mobilenet_v2.yaml
当你在后续教程中设置 config_path:=config/classification/resnet18.yaml
,即可使用resnet18
模型