Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All YOLOv8 and YOLOv5 models for object detection supported #18

Merged
merged 20 commits into from
Apr 14, 2023

Conversation

hdnh2006
Copy link
Contributor

This PR supports all the YOLOv5 v7.0 models and all the YOLOv8 for object detection from Ultralytics.

Screenshot from 2023-04-14 11-47-20

A new class YOLOv8 has been created inside the code yolov8.py. This class will deal with the post process of YOLOv8 which is a bit different of YOLOv5.

Models must be exported with opset=12 with the code:

pip install ultralytics
yolo export model=yolov8n.pt imgsz=640 format=onnx opset=12

However, they are available in my assets: https://github.com/hdnh2006/anylabeling-assets/releases/tag/v0.0.0.

The models must be added to @vietanhdev repo, otherwise, they need to be downloaded manually.

Copy link
Owner

@vietanhdev vietanhdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -107,14 +116,21 @@ def _load_model(self, model_name):

if model_info["type"] == "yolov5":
from .yolov5 import YOLOv5

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these spaces.

@hdnh2006
Copy link
Contributor Author

hdnh2006 commented Apr 14, 2023

I added the onnnruntime-gpu to requirements-mac.txt but I am not too used to pyproject.toml files, so please, if you can be more specific, I would thank you.

Check the changes I made here, maybe it is what you required but I am not pretty sure:

[build-system]
requires = ["setuptools", "wheel", "onnxruntime-gpu"]
build-backend = "setuptools.build_meta"

@hdnh2006 hdnh2006 requested a review from vietanhdev April 14, 2023 18:28
@vietanhdev vietanhdev merged commit 1d271d1 into vietanhdev:master Apr 14, 2023
@vietanhdev
Copy link
Owner

@hdnh2006 "onnxruntime-gpu" is not supported on mac m1. Therefore I removed it from pyproject.toml and requirements-macos.txt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants