microsoft / microsoft/onnxruntime-inference-examples
My with_pre_post_processing.onnx by yolov8n.pt transfored to onnx can't work
@wejoncy is already working on this.
Since Aug 29, 2024.
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 414
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 14
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.