Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

My with_pre_post_processing.onnx by yolov8n.pt transfored to onnx can't work

Open
#458 6 comments 0 reactions 1 assignee View on GitHub

@wejoncy is already working on this.

Since Aug 29, 2024.

Assessment

This issue has not been assessed yet.

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

Dominant language
C++
Stars
1.7k
Forks
418
PR merge metrics
No merged PRs in 30d

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/onnxruntime-inference-examples

All issues in microsoft/onnxruntime-inference-examples

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.