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

Yolov5 converted model throws error during detection #2

Open
lizozom opened this issue Jun 12, 2022 · 1 comment
Open

Yolov5 converted model throws error during detection #2

lizozom opened this issue Jun 12, 2022 · 1 comment

Comments

@lizozom
Copy link

lizozom commented Jun 12, 2022

I have followed the YOLOv5-Custom-Training tutorial and trained a model to detect some custom objects.
The object works properly detecting objects.

I then exported the model to onnx using the following command:
python export.py --include onnx --weight ./runs/train/exp/weights/best.pt --data {dataset.location}/data.yaml --img 640

The exported onnx model also properly detects objects.

I then took the onnxruntime-nextjs-template and I am trying to adjust it to run my YOLO model.

I adjusted the model name and the image size in utils/predict.ts, and I'm getting the following error:

Uncaught (in promise) Error: resize (packed) does not support mode: 'nearest'
    at l (ort-web.min.js?f1d4:formatted:18144:282536)
    at Object.get (ort-web.min.js?f1d4:formatted:18144:281666)
    at t.WebGLInferenceHandler.executeProgram (ort-web.min.js?f1d4:formatted:18144:209391)
    at t.WebGLInferenceHandler.run (ort-web.min.js?f1d4:formatted:18144:209690)
    at Object.t.resize [as impl] (ort-web.min.js?f1d4:formatted:18144:281598)
    at eval (ort-web.min.js?f1d4:formatted:18144:350066)
    at t.Profiler.event (ort-web.min.js?f1d4:formatted:18144:365260)
    at eval (ort-web.min.js?f1d4:formatted:18144:350026)

Any thing to do to work around this?

@lizozom
Copy link
Author

lizozom commented Jun 12, 2022

This forked repo can be used to reproduce the issue
https://github.com/lizozom/onnxruntime-nextjs-template

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

No branches or pull requests

1 participant