Skip to content

Problem when creating a model.bin and model.param  #10

@LorenzoCatarsi

Description

@LorenzoCatarsi

I've tried these two methods to get the ncnn model:

  • The python yolov8 method:
from ultralytics import YOLO
import ncnn

model=YOLO('yolov8n.pt')

model.train(data="data.yaml", epochs=100, batch=8)  
path = model.export(format="ncnn")
  • Converting from onnx to ncnn
from ultralytics import YOLO

model=YOLO('yolov8n.pt')

model.train(data="data.yaml", epochs=100, batch=8)  
path = model.export(format="onxx")

After running this code i've done the steps in this guide to obtain ncnn model https://github.com/Tencent/ncnn/wiki/use-ncnn-with-pytorch-or-onnx

None of these methods worked for me and both create a segmentation fault error when running the program.
I'm asking how u have obtained the .bin and .param available in the repo because only them seem to work.
I've tried also to convert not a custom trained model but the standard yolov8nano one but it doesn't work either.
I'll be grateful if someone can explain more in depth how to rearrange the code to work with custom trained model

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions