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.
Authors: Vasileios Vasilopoulos ([email protected]), Georgios Pavlakos ([email protected])
Affiliation: University of Pennsylvania, GRASP Lab
To download the prerequisites for this package (except for ROS itself), navigate to the package folder and run:
$ sudo pip install -r requirements.txt
Navigate to your catkin workspace and run:
$ catkin build yolov3_pytorch_ros
- 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:
wget http://pjreddie.com/media/files/yolov3.weights
- Modify the parameters in the launch file and launch it. You will need to change the
image_topic
parameter to match your camera, and theweights_name
,config_name
andclasses_name
parameters depending on what you are trying to do.
-
image_topic
(string)Subscribed camera topic.
-
weights_name
(string)Weights to be used from the models folder.
-
config_name
(string)The name of the configuration file in the config folder. Use
yolov3.cfg
for YOLOv3,yolov3-tiny.cfg
for tiny YOLOv3, andyolov3-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, andvoc.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.
-
confidence
(float)Confidence threshold for detected objects.
-
image_topic
(sensor_msgs::Image)Subscribed camera topic.
-
detected_objects_topic
(yolov3_pytorch_ros::BoundingBoxes)Published topic with the detected bounding boxes.
-
detections_image_topic
(sensor_msgs::Image)Published topic with the detected bounding boxes on top of the image (only published if
publish_image
is set to true).
The YOLO methods used in this software are described in the paper: You Only Look Once: Unified, Real-Time Object Detection.
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},
}