YOLO

 

cd catkin_ws/src
git clone http://gitee.com/kay2020/darknet_ros.git
cd ../

  

catkin_make -DCMAKE_BUILD_TYPE=Release

  

检查{catkin_ws}/darknet_ros/darknet_ros/yolo_network_config/weights文件下有没有yolov2-tiny.weights和yolov3.weights两个模型文件

 

 查看openCV版本

pkg-config --modeversion opencv

  

 

 安装单目USB相机

sudo apt-get install ros-$ROS_DISTRO-usb-cam

  

运行相机

roslaunch usb_cam usb_cam-test.launch

  

 

 

 打开darknet_ros/config/ros.yaml文件,修改

vim darknet_ros/config/ros.yaml

  

subscribers:
  camera_reading:
    topic: /usb_cam/image_raw
    queue_size: 1

  

 

source devel/setup.bash
roslaunch darknet_ros darknet_ros.launch

  

 修改 darknet_ros.launch

 

arg name="network_param_file"         default="$(find darknet_ros)/config/yolov2-tiny.yaml"/
 
改为
 
arg name="network_param_file"         default="$(find darknet_ros)/config/yolov3.yaml"/

  

 

roslaunch darknet_ros darknet_ros.launch

  

 

 

 

曲线救国

 

下载预训练模型权重yolov3.weights

下载地址:https://pjreddie.com/media/files/yolov3.weights

 

 

 

重点参考

https://blog.csdn.net/f290131665/article/details/81012556

 

posted @ 2022-01-18 09:49  kay880  阅读(45)  评论(0编辑  收藏  举报