ROS package for running yolov3 with USB_CAM_node
- Ubuntu 18.04, Python 2.7, torch=1.4.0
- Python 2.7 and torch 1.4.0, the recommended compatible version of CUDA toolkit is 10.x (10.0, 10.1 or 10.2) and cudnn is 7.6.5
Download the required packages by
# In your catkin_ws/src/ git clone https://github.com/hjinnkim/yolov3-pytorch-ros.git cd yolov3_pytorch_ros/weights sh download_weights.shand go to your catkin_ws and catkin_make
Also, you need cv_bridge packages.
sudo apt install ros-melodic-cv-bridgerospy code needs execution previliege.
roscd yolov3-ros/src/ chmod +x yolov3_ros.py
If you have your custom trained weights, place the weights file in the weights directory and place the .names file in the data directory. Change the parameters in launch directory according to your files.
You can run the yolov3 by:
roslaunch yolov3-ros yolov3-[corresponding file].launchThe yolov3_node will publish two topics:
/yolov3_detect/compressed /yolov3_detect/objectsYou can see the detected images by
rqt_image_view