Giter Club home page Giter Club logo

yolov8_onnx_ros2's Introduction

YOLOv8_ONNX_ROS2

ROS2 Ubuntu Python

This repository is a ROS2 package that performs object detection using YOLOv8 with ONNX.

euroc2

ROS Package Configuration

Subscribed Topic:

  • Image-stream : sensor_msgs/msg/Image

Published Topic:

  • Image-stream with bounding box around detected objects : sensor_msgs/msg/Image

image

Installation

You can easily convert using the ultralytics python library.

pip install ultralytics

Please write down a Python file to convert a PyTorch model to ONNX format.

from ultralytics import YOLO

model_name = 'yolov8m' #@param ["yolov8n", "yolov8s", "yolov8m", "yolov8l", "yolov8x"]
input_width = 640 #@param {type:"slider", min:32, max:4096, step:32}
input_height = 480 #@param {type:"slider", min:32, max:4096, step:32}
optimize_cpu = True

model = YOLO(f"{model_name}.pt") 
model.export(format="onnx", imgsz=[input_height,input_width], optimize=optimize_cpu)

Move the ONNX file into the resource folder of the ROS2 package.

mv (yolov8m.onnx) (your_ws)/src/yolo_v8/resources

Usage

ros2 launch yolo_v8 detection.xml

Results

  • EUROC dataset experiment with Workstation CPU

  • Real-life situation experiment with Raspi5-robot (real-time)

    • TBD

References

Developers

yolov8_onnx_ros2's People

Contributors

minje-kim avatar

Stargazers

 avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.