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

TextureToTensor only provides a method to use ComputeShader, and cannot be used on devices that do not support ComputeShader #37

Open
dong52008 opened this issue Dec 3, 2024 · 2 comments
Labels
wontfix This will not be worked on

Comments

@dong52008
Copy link

Environment (please complete the following information):

  • OS/OS Version: Android 5.1
  • Source Version: master/v0.2.0
  • Unity Version: Unity 2022.3.46f1

Describe the bug
TextureToTensor only provides a method to use ComputeShader, and cannot be used on devices that do not support ComputeShader.

To Reproduce
Steps to reproduce the behavior:

  1. Open the onnxruntime-unity-examples project and change the Minimum API Level in Player Settings to API level 22.
  2. Build Apk.
  3. Running on devices that don't support ComputeShader.

Expected behavior
error message:
TextureToTensor.compute: Kernel at index (0) is invalid
Microsoft.ML.OnnxRuntime.Unity.TextureToTensor1:Transform(Texture, Matrix4x4&) Microsoft.ML.OnnxRuntime.Unity.TextureToTensor1:Transform(Texture, AspectMode)
Microsoft.ML.OnnxRuntime.Unity.ImageInference1:PreProcess(Texture) Microsoft.ML.OnnxRuntime.Unity.ImageInference1:Run(Texture)d__14:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(TStateMachine&)
Sample:Detect()d__12:MoveNext()

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem and error logs here.

@asus4
Copy link
Owner

asus4 commented Dec 3, 2024

Thank you @dong52008. The TextureToTensor using only the CPU version can solve the issue. Supporting legacy Android devices is a low priority, but we may consider supporting them if there is sufficient demand.

Copy link

stale bot commented Feb 1, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants