Hi @Ramson,
In principle what you said may sound good to me. I trained an object detector model with the eIQ portal based on the ssd_mobilenet_V3 and my own data set. My model considers two possible classes as output (plus the background?). The output data provides consequently a [1,1,7] tensor:
[1,1,4]-> object location
[1,1,5]-> background score as you suggest or class type as suggested here by MarcinChelminsk (09-06-2021 06:45 AM).
[1,1,6-7]-> corresponding to scores of my two main classes

However, after invoking the inference, I am not able to interpret the output at all. My model, same as yours, results on [1,2034,7] 2034 possible objects found.
...
interpreter = tflite.Interpreter('detection-balanced-mcu-2021-11-15T14-20-27.767Z_in-uint8_out-uint8_channel_mlir_ptq.tflite')
interpreter.allocate_tensors()
input_details = interpreter.get_input_details()
print("INPUT DETAILS", input_details)
output_details = interpreter.get_output_details()
print("OUTPUT DETAILS", output_details)
INPUT DETAILS [{'name': 'input_1', 'index': 446, 'shape': array([ 1, 320, 320, 3], dtype=int32), 'shape_signature': array([ -1, 320, 320, 3], dtype=int32), 'dtype': <class 'numpy.uint8'>, 'quantization': (0.007843137718737125, 127), 'quantization_parameters': {'scales': array([0.00784314], dtype=float32), 'zero_points': array([127], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}]
OUTPUT DETAILS [{'name': 'Identity', 'index': 447, 'shape': array([1, 1, 7], dtype=int32), 'shape_signature': array([-1, -1, 7], dtype=int32), 'dtype': <class 'numpy.uint8'>, 'quantization': (0.1662425845861435, 150), 'quantization_parameters': {'scales': array([0.16624258], dtype=float32), 'zero_points': array([150], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}]
# NxHxWxC, H:1, W:2
height = input_details[0]['shape'][1]
width = input_details[0]['shape'][2]
img = Image.open('imgSource/armas(1).jpg').resize((height,width ))
# add N dim
input_data = np.expand_dims(img, axis=0)
interpreter.invoke()
output_details = interpreter.get_output_details()
print("OUTPUT DETAILS", output_details)
OUTPUT DETAILS [{'name': 'Identity', 'index': 447, 'shape': array([ 1, 2034, 7], dtype=int32), 'shape_signature': array([-1, -1, 7], dtype=int32), 'dtype': <class 'numpy.uint8'>, 'quantization': (0.1662425845861435, 150), 'quantization_parameters': {'scales': array([0.16624258], dtype=float32), 'zero_points': array([150], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}]
output_data = interpreter.get_tensor(output_details[0]['index'])
results = np.squeeze(output_data)
#lets print the first 5 result values as an example
for i in range(5):
print(results[i])
[169 120 138 146 152 145 128]
[175 125 125 148 157 148 154]
[168 124 138 151 157 153 137]
[169 125 128 143 141 134 133]
[177 125 126 151 149 141 149]
How should I interpret these values?