I created a dataset on Roboflow, downloaded it and used the CLI:
!yolo task=detect mode=train model=yolov8s.pt data={dataset.location}/data.yaml epochs=100 imgsz=640 plots=True
command executed OK, I checked the results with
!yolo task=detect mode=predict model={HOME}/runs/detect/train/weights/best.pt conf=0.25 source={dataset.location}/test/images save=True
which also produced the expected results
.PT FILE converted with tools.luxonis.com works. However if you could help me understand why onnx conversion doesn't work for me, see below:
I then converted the best.pt weight into onnx with the following (also tried with the half=True option):
from ultralytics import YOLO
model = YOLO('runs/detect/train/weights/best.pt') # load a custom trained model
model.export(format='onnx')
then loaded the onnx into blobconverter.luxonis.com
When the pipeline runs, I always get this message (note it is yolo8):
[18443010C1245D1200] [172.34.0.148] [11.853] [DetectionNetwork(1)] [error] Mask is not defined for output layer with width '8400'. Define at pipeline build time using: 'setAnchorMasks' for 'side8400'.
Any help?