tflite-support
tflite-support copied to clipboard
Image postprocessor
Continuation of #679. @lu-wang-g
Made substantial changes. To summarize:
a) I'm storing output_tensor_ in Postprocessor class. So that Postprocess() can access the corresponding output tensor and also find tensor_type.
b) If output metadata doesn't have norm params, fallback to input metadata in Init(). This check is done via FindFirstNormProcessingUnit.
TODO:
Currently, we pass first input tensor into BuildImageTensorSpecs, instead we should get the input_index similar to what was done here. That is out of the scope of this PR, we can create a follow up.
Also need to work on some docs, any suggestions?