-
Notifications
You must be signed in to change notification settings - Fork 348
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
My with_pre_post_processing.onnx by yolov8n.pt transfored to onnx can't work #458
Comments
hi, @9479421 The model used in this example has two outputs, 1) image with bounding-box, 2) the coordinate |
@wejoncy The figure shows my changes to "add_pre_post_processing_to_model": Please help me. |
@iamxiaojuan Is your model a object detection model? |
Yes, the model was downloaded from the yolo website @wejoncy |
@iamxiaojuan |
@wejoncy My problem is solved. Thank you very much! |
The onnx file in the examples is work:
https://github.com/microsoft/onnxruntime-inference-examples/tree/main/mobile/examples/object_detection/android
but I use oridinal yolov8n.pt to transfor yolov8n.onnx, and transfor .onnx to with_pre_post_processing.onnx can't work. When execute
'val inputTensor = OnnxTensor.createTensor(
ortEnv,
ByteBuffer.wrap(rawImageBytes),
shape,
OnnxJavaType.UINT8
)
'
it will throw Exception
'Exception caught when perform ObjectDetection
ai.onnxruntime.OrtException: Unexpected number of requestedOutputs & pinnedOutputs, expected [1,1) found 2
at ai.onnxruntime.OrtSession.run(OrtSession.java:341)
at ai.onnxruntime.OrtSession.run(OrtSession.java:242)
at ai.onnxruntime.example.objectdetection.ObjectDetector.detect(ObjectDetector.kt:45)
at ai.onnxruntime.example.objectdetection.MainActivity.performObjectDetection(MainActivity.kt:123)
at ai.onnxruntime.example.objectdetection.MainActivity.onCreate$lambda$0(MainActivity.kt:61)'
who can help me , My English is not good, thanks for every friends who can help me
The text was updated successfully, but these errors were encountered: