microsoft / Windows-Machine-Learning

Samples and Tools for Windows ML.
https://docs.microsoft.com/en-us/windows/ai/
MIT License
1.02k stars 445 forks source link

[WinMLDashboard] Image.NomimalPixelRange edit have no impact #415

Closed aungthetnaing closed 3 years ago

aungthetnaing commented 3 years ago

I'm submitting a…

Bug report (I searched for similar issues and did not find one

Current behavior

I used WinML Dashboard to overwrite Image.NomimalPixelRange to range [-1.1]. But it has no effect in WinML wiml::NominalRangeConverter::NominalRangeConverter (still defaulting to 0-255). No meta data values if loaded in Netro too.

Expected behavior

Metadata values shall be correctly injected.

Minimal reproduction of the problem with instructions

Take a ONNX model. Edit and overwrite Image.NomimalPixelRange to range [-1.1. Then, load into a sample (for example, BatchSupport), Add a breakpoint in wiml::NominalRangeConverter::NominalRangeConverter and check which value is loaded in pixelRange.

Environment

Windows Build Number: 19043.1237

App min and target version: commit: 9a39f9ea (0.7 pre-release) OS Version (Server, IoT Core, Desktop, etc):

Graphics Driver version:

DxDiag:

WinMLTools specific:

Visual Studio

zhangxiang1993 commented 3 years ago

It looks like Image.NomimalPixelRange metadata is not saved to the model, which caused WinML take the default NomimalPixelRange.