Skip to content

Commit

Permalink
readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Oct 27, 2023
1 parent 0719a3e commit c472c88
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yolov8_ros

ROS 2 wrap for [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics) 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.
ROS 2 wrap for [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics) to perform object detection and tracking, instance segmentation and human pose estimation. There are also 3D versions of object detection and human pose estimation based on depth images.

## Installation

Expand All @@ -15,10 +15,41 @@ $ colcon build

## Usage

### YOLOv8

```shell
$ ros2 launch yolov8_bringup yolov8.launch.py
```

#### Parameters

- model: YOLOv8 model (default: yolov8m.pt)
- tracker: tracker file (default: bytetrack.yaml)
- device: GPU/CUDA (default: cuda:0)
- enable: wether to start YOLOv8 enabled (default: True)
- threshold: detection threshold (default: 0.5)
- input_image_topic: camera topic of RGB images (default: /camera/rgb/image_raw)

### YOLOv8 3D

```shell
$ ros2 launch yolov8_bringup yolov8_3d.launch.py
```

#### Parameters

- model: YOLOv8 model (default: yolov8m.pt)
- tracker: tracker file (default: bytetrack.yaml)
- device: GPU/CUDA (default: cuda:0)
- enable: wether to start YOLOv8 enabled (default: True)
- threshold: detection threshold (default: 0.5)
- input_image_topic: camera topic of RGB images (default: /camera/rgb/image_raw)
- input_depth_topic: camera topic of depth images (default: /camera/depth/image_raw)
- input_depth_info_topic: camera topic for info data (default: /camera/depth/camera_info)
- depth_image_units_divisor: divisor to convert the depth image into metres (default: 1000)
- target_frame: frame to transform the 3D boxes (default: base_link)
- maximum_detection_threshold: maximum detection threshold in the z axis (default: 0.3)

## Demos

## Object Detection
Expand Down Expand Up @@ -53,7 +84,7 @@ $ ros2 launch yolov8_bringup yolov8.launch.py model:=yolov8m-pose.pt

## 3D Object Detection

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.
The 3D bounding boxes are calculated filtering the depth image data from an RGB-D camera using the 2D bounding box. Only objects with a 3D bounding box are visualized in the 2D image.

```shell
$ ros2 launch yolov8_bringup yolov8_3d.launch.py
Expand All @@ -63,7 +94,7 @@ $ ros2 launch yolov8_bringup yolov8_3d.launch.py

## 3D Object Detection (Using Instance Segmentation Masks)

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.
In this, the depth image 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.

```shell
$ ros2 launch yolov8_bringup yolov8_3d.launch.py model:=yolov8m-seg.pt
Expand All @@ -73,7 +104,7 @@ $ ros2 launch yolov8_bringup yolov8_3d.launch.py model:=yolov8m-seg.pt

## 3D Human Pose

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.
Each keypoint is projected in the depth image and visualized using purple spheres. Only objects with a 3D bounding box are visualized in the 2D image.

```shell
$ ros2 launch yolov8_bringup yolov8_3d.launch.py model:=yolov8m-pose.pt
Expand Down
4 changes: 2 additions & 2 deletions yolov8_bringup/launch/yolov8_3d.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ def generate_launch_description():
input_depth_topic = LaunchConfiguration("input_depth_topic")
input_depth_topic_cmd = DeclareLaunchArgument(
"input_depth_topic",
default_value="/camera/aligned_depth_to_color/image_raw",
default_value="/camera/depth/image_raw",
description="Name of the input depth topic")

input_depth_info_topic = LaunchConfiguration("input_depth_info_topic")
input_depth_info_topic_cmd = DeclareLaunchArgument(
"input_depth_info_topic",
default_value="/camera/aligned_depth_to_color/camera_info",
default_value="/camera/depth/camera_info",
description="Name of the input depth info topic")

depth_image_units_divisor = LaunchConfiguration(
Expand Down

0 comments on commit c472c88

Please sign in to comment.