training_extensions icon indicating copy to clipboard operation
training_extensions copied to clipboard

Post processing of image classification model

Open raushani2v opened this issue 2 years ago • 2 comments

Hi,

I have trained MobileNet-V3-large-1x classifier for 2 classes using openvino training extensions. While inferring the trained onnx model, I get the result as something similar to this vector [[-1.5802931e-10 1.1259661e-10]].

Can you please tell me what these 2 values represent?

How to post-process these values to get meaningful information i.e, class label and confidence score?

raushani2v avatar Nov 15 '23 07:11 raushani2v

The values might be the logits for each class, which could be transformed to class probability via softmax operation. Currently, direct inference of ONNX format is not supported on OTX. You can try to parse label_schema.json along with the ONNX file to map output index to the label name. @sovrasov Could you help?

goodsong81 avatar Nov 20 '23 07:11 goodsong81

Hi! Indeed, OTX generates models that produce logits. I recommend ModelAPI as a default tool for inference: https://pypi.org/project/openvino-model-api/ It supports inference of ONNX models via OpenVINO or ONNXRuntime

sovrasov avatar Nov 20 '23 13:11 sovrasov