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

[Mobile] Issue with Importing YOLOv8 Pose Model into Unity using Sentis #21253

Closed
aakash94 opened this issue Jul 4, 2024 · 1 comment
Closed
Assignees
Labels
platform:mobile issues related to ONNX Runtime mobile; typically submitted using template

Comments

@aakash94
Copy link

aakash94 commented Jul 4, 2024

Describe the issue

I followed the pose estimation tutorial to obtain the yolov8n-pose.with_pre_post_processing.onnx model. The model passes validation using ONNX's checker and is confirmed to be valid.

However, when importing the model into Unity, I encounter the following error from Unity's Sentis:

Asset import failed, "Assets/Models/pose_pre_post.onnx" > KeyNotFoundException: The given key '_ppp0_bgr_data' was not present in the dictionary.

Upon inspecting the model in Netron, I discovered that _ppp0_bgr_data is located between the pre_process_0 and pre_process_1 nodes.

Do note that the model that is generated without the pre and post processing steps baked in works just fine.

How can I resolve this issue? If this is not the appropriate place to seek a solution, could you please direct me to the correct platform or resource where I can get assistance?

Thank you.

To reproduce

Follow the pose estimation tutorial to obtain the yolov8n-pose.with_pre_post_processing.onnx model.

Drag and drop the model into Unity(6, with Sentis 1.5) as an asset to observe an error in importing the model.

Urgency

No response

Platform

Other / Unknown

OS Version

Sentis 1.5, Unity 6,

ONNX Runtime Installation

Released Package

Compiler Version (if 'Built from Source')

No response

Package Name (if 'Released Package')

None

ONNX Runtime Version or Commit ID

onnxruntime-1.18.1-cp310

ONNX Runtime API

C++/C

Architecture

X64

Execution Provider

Default CPU

Execution Provider Library Version

No response

@aakash94 aakash94 added the platform:mobile issues related to ONNX Runtime mobile; typically submitted using template label Jul 4, 2024
@skottmckay
Copy link
Contributor

This seems like an issue for the Unity/Sentis folks.

_ppp0_bgr_data is an internal value of the model. I don't know what dictionary they're checking values against or why that is not in it, but given it's an internal value a user would never directly touch it.

I do note this: https://discussions.unity.com/t/error-importing-onnx-model/370378

When the input is an image we use a custom operator called DecodeImage to convert it from jpg/png to RGB. That custom operator is implemented in the onnxruntime_extensions library as you would have seen in the tutorial. Maybe Unity/Sentis doesn't handle custom operators or requires some extra configuration to do so.

When the input is RGB we do not need to use the custom operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:mobile issues related to ONNX Runtime mobile; typically submitted using template
Projects
None yet
Development

No branches or pull requests

2 participants