https://github.com/ar-ray-code/yolov5-ros
YOLOv5 + ROS2 object detection package (Does not circumvent the AGPL)
https://github.com/ar-ray-code/yolov5-ros
humble object-detection rclpy ros2 yolov5
Last synced: 2 months ago
JSON representation
YOLOv5 + ROS2 object detection package (Does not circumvent the AGPL)
- Host: GitHub
- URL: https://github.com/ar-ray-code/yolov5-ros
- Owner: Ar-Ray-code
- License: gpl-3.0
- Created: 2022-02-09T00:55:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T07:49:00.000Z (8 months ago)
- Last Synced: 2025-02-24T05:01:40.440Z (3 months ago)
- Topics: humble, object-detection, rclpy, ros2, yolov5
- Language: Python
- Homepage:
- Size: 13.3 MB
- Stars: 63
- Watchers: 2
- Forks: 22
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# YOLOv5-ROS
[YOLOv5](https://github.com/ultralytics/yolov5) + ROS2 object detection package
This program changes the input of detect.py (ultralytics/yolov5) to `sensor_msgs/Image` of ROS2.
Maybe [this one](https://github.com/Alpaca-zip/ultralytics_ros) is easier to use.
## Installation
```bash
mkdir -p ws_yolov5/src
cd ws_yolov5/srcgit clone https://github.com/Ar-Ray-code/YOLOv5-ROS.git
git clone https://github.com/Ar-Ray-code/bbox_ex_msgs.gitpip3 install -r ./YOLOv5-ROS/requirements.txt
colcon build --symlink-install
```
## Demo
```bash
cd ws_yolov5/
source ./install/setup.bash
ros2 launch yolov5_ros yolov5s_simple.launch.py
```
## Requirements
- ROS2 Foxy
- OpenCV 4
- PyTorch
- bbox_ex_msgs## Topic
### Subscribe
- image_raw (`sensor_msgs/Image`)### Publish
- yolov5/image_raw : Resized image (`sensor_msgs/Image`)
- yololv5/bounding_boxes : Output BoundingBoxes like darknet_ros_msgs (`bboxes_ex_msgs/BoundingBoxes`)※ If you want to use `darknet_ros_msgs` , replace `bboxes_ex_msgs` with `darknet_ros_msgs`.
## About YOLOv5 and contributers
- [YOLOv5 : GitHub](https://github.com/ultralytics/yolov5)
- [Glenn Jocher : GitHub](https://github.com/glenn-jocher)### What is YOLOv5 🚀
YOLOv5 is the most useful object detection program in terms of speed of CPU inference and compatibility with PyTorch.
> Shortly after the release of YOLOv4 Glenn Jocher introduced YOLOv5 using the Pytorch framework.
The open source code is available on GitHub## About writer
- Ar-Ray : Japanese student.
- Blog (Japanese) : https://ar-ray.hatenablog.com/
- Twitter : https://twitter.com/Ray255Ar