In addition to the core metadata recommendations listed in the extensibility documentation there is additional experimental metadata to help provide information for model inputs and outputs.
This metadata applies to all input and output tensors of a given category. The first such category we define is: Image
.
The motivation of such a mechanism is to allow model authors to convey to model consumers enough information for them to consume the model.
In the case of images there are many option for providing valid image data. However a model which consumes images was trained with a particular set of these options which must be used during inferencing.
The goal is this proposal is to provide enough metadata that the model consumer can perform their own featurization prior to running the model and provide a compatible input or retrieve an output and know what its format is.
For every tensor in this model that uses Type Denotation to declare itself an IMAGE
, you SHOULD provide metadata to assist the model consumer. Note that any metadata provided using this mechanism is global to ALL types
with the accompanying denotation.
Keys and values are case insenstive.
Specifically, we define here the following set image metadata:
Key | Value | Description |
---|---|---|
Image.BitmapPixelFormat |
string | Specifies the format of pixel data. Each enumeration value defines a channel ordering and bit depth. Possible values:
|
Image.ColorSpaceGamma |
string | Specifies the gamma color space used. Possible values:
|
Image.NominalPixelRange |
string | Specifies the range that pixel values are stored. Possible values:
|