ROS 2 wrap for Ultralytics YOLOv8 to perform object detection and tracking, instance segmentation and human pose estamation. There are also 3D versions of object detection and human pose estimation based on Point Cloud.
$ cd ~/ros2_ws/src
$ git clone https://github.com/mgonzs13/yolov8_ros.git
$ pip3 install -r yolov8_ros/requirements.txt
$ cd ~/ros2_ws
$ rosdep install --from-paths src --ignore-src -r -y
$ colcon build
$ ros2 launch yolov8_bringup yolov8.launch.py
This is the standard behavior of YOLOv8, which includes object tracking.
$ ros2 launch yolov8_bringup yolov8.launch.py
Instance masks are the borders of the detected objects, not the all the pixels inside the masks.
$ ros2 launch yolov8_bringup yolov8.launch.py model:=yolov8m-seg.pt
Online persons are detected along with their keypoints.
$ ros2 launch yolov8_bringup yolov8.launch.py model:=yolov8m-pose.pt
The 3D bounding boxes are calculated filtering the Point Cloud data from an RGB-D camera using the 2D bounding box. Only objects with a 3D bounding box are visualized in the 2D image.
$ ros2 launch yolov8_bringup yolov8_3d.launch.py
In this, the Point Cloud data is filtered using the max and min values obtained from the instance masks. Only objects with a 3D bounding box are visualized in the 2D image.
$ ros2 launch yolov8_bringup yolov8_3d.launch.py model:=yolov8m-seg.pt
Each keypoint is projected in the Point Cloud and visualized using purple spheres. Only objects with a 3D bounding box are visualized in the 2D image.
$ ros2 launch yolov8_bringup yolov8_3d.launch.py model:=yolov8m-pose.pt