From 00e239a5da8b6302de06bf67647b08a8e2165246 Mon Sep 17 00:00:00 2001 From: Francesco Mattioli Date: Fri, 20 Dec 2024 13:32:25 +0100 Subject: [PATCH] ROS Guide, updated YOLO version (#18325) --- docs/en/guides/ros-quickstart.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/en/guides/ros-quickstart.md b/docs/en/guides/ros-quickstart.md index 9d7be734..ac923967 100644 --- a/docs/en/guides/ros-quickstart.md +++ b/docs/en/guides/ros-quickstart.md @@ -88,8 +88,8 @@ import rospy from ultralytics import YOLO -detection_model = YOLO("yolov8m.pt") -segmentation_model = YOLO("yolov8m-seg.pt") +detection_model = YOLO("yolo11m.pt") +segmentation_model = YOLO("yolo11m-seg.pt") rospy.init_node("ultralytics") time.sleep(1) ``` @@ -140,8 +140,8 @@ while True: from ultralytics import YOLO - detection_model = YOLO("yolov8m.pt") - segmentation_model = YOLO("yolov8m-seg.pt") + detection_model = YOLO("yolo11m.pt") + segmentation_model = YOLO("yolo11m-seg.pt") rospy.init_node("ultralytics") time.sleep(1) @@ -200,7 +200,7 @@ from std_msgs.msg import String from ultralytics import YOLO -detection_model = YOLO("yolov8m.pt") +detection_model = YOLO("yolo11m.pt") rospy.init_node("ultralytics") time.sleep(1) classes_pub = rospy.Publisher("/ultralytics/detection/classes", String, queue_size=5) @@ -260,7 +260,7 @@ from ultralytics import YOLO rospy.init_node("ultralytics") time.sleep(1) -segmentation_model = YOLO("yolov8m-seg.pt") +segmentation_model = YOLO("yolo11m-seg.pt") classes_pub = rospy.Publisher("/ultralytics/detection/distance", String, queue_size=5) ``` @@ -313,7 +313,7 @@ while True: rospy.init_node("ultralytics") time.sleep(1) - segmentation_model = YOLO("yolov8m-seg.pt") + segmentation_model = YOLO("yolo11m-seg.pt") classes_pub = rospy.Publisher("/ultralytics/detection/distance", String, queue_size=5) @@ -384,7 +384,7 @@ from ultralytics import YOLO rospy.init_node("ultralytics") time.sleep(1) -segmentation_model = YOLO("yolov8m-seg.pt") +segmentation_model = YOLO("yolo11m-seg.pt") ``` Create a function `pointcloud2_to_array`, which transforms a `sensor_msgs/PointCloud2` message into two numpy arrays. The `sensor_msgs/PointCloud2` messages contain `n` points based on the `width` and `height` of the acquired image. For instance, a `480 x 640` image will have `307,200` points. Each point includes three spatial coordinates (`xyz`) and the corresponding color in `RGB` format. These can be considered as two separate channels of information. @@ -463,7 +463,7 @@ for index, class_id in enumerate(classes): rospy.init_node("ultralytics") time.sleep(1) - segmentation_model = YOLO("yolov8m-seg.pt") + segmentation_model = YOLO("yolo11m-seg.pt") def pointcloud2_to_array(pointcloud2: PointCloud2) -> tuple: @@ -536,7 +536,7 @@ from sensor_msgs.msg import Image from ultralytics import YOLO -detection_model = YOLO("yolov8m.pt") +detection_model = YOLO("yolo11m.pt") rospy.init_node("ultralytics") det_image_pub = rospy.Publisher("/ultralytics/detection/image", Image, queue_size=5) @@ -589,7 +589,7 @@ from sensor_msgs.msg import PointCloud2 from ultralytics import YOLO rospy.init_node("ultralytics") -segmentation_model = YOLO("yolov8m-seg.pt") +segmentation_model = YOLO("yolo11m-seg.pt") def pointcloud2_to_array(pointcloud2):