View source on GitHub |
A container for input image tensor metadata information.
Inherits From: TensorMd
tflite_support.metadata_writers.metadata_info.InputImageTensorMd(
name: Optional[str] = None,
description: Optional[str] = None,
norm_mean: Optional[List[float]] = None,
norm_std: Optional[List[float]] = None,
color_space_type: Optional[tflite_support.metadata_schema_py_generated.ColorSpaceType
] = _metadata_fb.ColorSpaceType.UNKNOWN,
tensor_type: Optional[_schema_fb.TensorType] = None
)
Args | |
---|---|
name
|
name of the tensor. |
description
|
description of what the tensor is. |
norm_mean
|
the mean value used in tensor normalization 1. |
norm_std
|
the std value used in the tensor normalization 1. norm_mean and norm_std must have the same dimension. |
color_space_type
|
the color space type of the input image 2. |
tensor_type
|
data type of the tensor. |
Raises | |
---|---|
ValueError
|
if norm_mean and norm_std have different dimensions. |
Attributes | |
---|---|
norm_mean
|
the mean value used in tensor normalization 1. |
norm_std
|
the std value used in the tensor normalization 1. norm_mean and norm_std must have the same dimension. |
color_space_type
|
the color space type of the input image 2. |
Methods
create_metadata
create_metadata() -> tflite_support.metadata_schema_py_generated.TensorMetadataT
Creates the input image metadata based on the information.
Returns | |
---|---|
A Flatbuffers Python object of the input image metadata. |