This package provides a ROS wrapper for YOLOv3 based on PyTorch-YOLOv3. For consistency, the messages are based on the darknet_ros package. The package has been tested with Ubuntu 16.04 and ROS Kinetic on a NVIDIA Jetson TX2.
To download the prerequisites for this package (except for ROS itself), navigate to the package folder and run:
$ sudo pip install -r requirements.txt
Installation
Navigate to your catkin workspace and run:
$ catkin build yolov3_pytorch_ros
Basic Usage
First, make sure to put your weights in the models folder. For the training process in order to use custom objects, please refer to the original YOLO page. As an example, to download pre-trained weights from the COCO data set, go into the models folder and run:
Modify the parameters in the launch file and launch it. You will need to change the image_topic parameter to match your camera, and the weights_name, config_name and classes_name parameters depending on what you are trying to do.
The name of the configuration file in the config folder. Use yolov3.cfg for YOLOv3, yolov3-tiny.cfg for tiny YOLOv3, and yolov3-voc.cfg for YOLOv3-VOC.
classes_name (string)
The name of the file for the detected classes in the classes folder. Use coco.names for COCO, and voc.names for VOC.
publish_image (bool)
Set to true to get the camera image along with the detected bounding boxes, or false otherwise.
detected_objects_topic (string)
Published topic with the detected bounding boxes.
detections_image_topic (string)
Published topic with the detected bounding boxes on top of the image.
If you are using this package, please add the following citation to your publication:
@misc{vasilopoulos_pavlakos_yolov3ros_2019,
author = {Vasileios Vasilopoulos and Georgios Pavlakos},
title = {{yolov3_pytorch_ros}: Object Detection for {ROS} using {PyTorch}},
howpublished = {url{https://github.com/vvasilo/yolov3_pytorch_ros}},
year = {2019},
}