vietanhdev / anylabeling

Effortless AI-assisted data labeling with AI support from YOLO, Segment Anything (SAM+SAM2), MobileSAM!!
https://anylabeling.nrl.ai
GNU General Public License v3.0
2.2k stars 236 forks source link

All YOLOv8 and YOLOv5 models for object detection supported #18

Closed hdnh2006 closed 1 year ago

hdnh2006 commented 1 year ago

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.

hdnh2006 commented 1 year ago

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"
vietanhdev commented 1 year ago

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