I'm uploading a model yolo8l.pt in the pycharm script. I train this model on my user data. Then I export using the export function from the YOLO package to the .onnx format. File.I use onnx in the barracuda module in unity. But the processing results are different from the results in pycharm. The accuracy is getting lower.
Function train():
def train():
YOLO_MODEL_PATH = r"C:\Users\andr\OneDrive\Documents\Blog_post\YOLO-FAMILY\YOLOv8-Article\yolov8l.pt"
model = YOLO(YOLO_MODEL_PATH)
results = model.train(
data="C:/Users/andr/PycharmProjects/YOLO8_segmentation/parts_of_pitch/data.yaml",
imgsz=1280,
epochs=100,
batch=4
)
Function export():
def export():
export_path = r"C:\Users\andr\PycharmProjects\YOLO8_segmentation\runs\detect\train\weights\best.pt"
model = YOLO(export_path)
model.export(format='onnx', opset=10, imgsz=1280)
I tried to export the model using torch.onnx.export, but it didn't work out.