microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.05k stars 2.83k forks source link

DirectML returning empty result with ObjectDetection (Mobilinet V2 FPN Keras) #20386

Open willianwrm opened 4 months ago

willianwrm commented 4 months ago

Describe the issue

Result is empty when using DirectML but works as expected when using only CPU. Tested for ObjectDection with ssd_mobilenet_v2_fpn_keras model.

I first reported it in tensorflow-onnx but it seems like a runtime issue. There is another issue that looks like similar to this one but I don't know for sure so I did open as a new issue.

To reproduce

Use this C# .NET 8.0 Windows Forms App, select a file image and wait for the result, the CPU result is printed in blue and DirectML result in red. The project contains the onnx model and image examples can be found here. Tested opset 18 to 13, no change.

08b87f1b-c6aa-4654-a53b-1e9da3b3369a

I did notice that the _detectionboxes are in fact OK but the _numdetections and _detectionscores are not -- _raw_detectionscores is surprising OK.

Training configuration, data set, command lines and tensorflow exported graph can be found here

Urgency

Low since the CPU result is fine.

Platform

Windows

OS Version

11 23H2 22631.3447

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.17.3

ONNX Runtime API

C#

Architecture

X64

Execution Provider

DirectML

Execution Provider Library Version

No response

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

willianwrm commented 3 months ago

Update: tested with DirectML version 1.18.0 but the problem persists.

willianwrm commented 15 hours ago

Update: tested with DirectML version 1.19.2 but the problem persists.