How do I set the threshold(iou/score) of TFLite Detection PostProcess via interpreter?
Hi @Bajirak 

We don't have any method to set threshold in the interpreter API, however you can run the get the output from the interpreter and applying threshold explicitly as given below
```
def detect_objects(interpreter, image, threshold):
  """Returns a list of detection results, each a dictionary of object info."""

  signature_fn = interpreter.get_signature_runner()

  # Feed the input image to the model
  output = signature_fn(images=image)

  # Get all outputs from the model
  count = int(np.squeeze(output['output_0']))
  scores = np.squeeze(output['output_1'])
  classes = np.squeeze(output['output_2'])
  boxes = np.squeeze(output['output_3'])

  results = []
  for i in range(count):
    if scores[i] >= threshold:
      result = {
        'bounding_box': boxes[i],
        'class_id': classes[i],
        'score': scores[i]
      }
      results.append(result)
  return results
```
Please check this example of postprocessing for TFLite object detetcion and let us know if it helps.
https://www.tensorflow.org/lite/models/modify/model_maker/object_detection#load_the_trained_tflite_model_and_define_some_visualization_functions

Thanks. This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. Hi, @pjpratik 

You responded quickly, but I'm sorry for being late.

Thank you for letting me know that I cannot control the threshold through the interpreter API.

It was very helpful.

Thanks. Hi @Bajirak 

Glad it helped. Please feel free to close the issue since it is resolved.

Thanks.
### 1. System information

- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): 18.04
- TensorFlow installation (pip package or built from source): pip package, python3.8
- TensorFlow library (version, if pip package or github SHA, if built from source): 2.13.0

### 2. Code

Provide code to help us reproduce your issues using one of the following options:
Download tflite model from https://tfhub.dev/iree/lite-model/ssd_mobilenet_v1_100_320/fp32/nms/1?lite-format=tflite

#### Interpreter code
`
import numpy as np
import tensorflow as tf

//TensorFlow Lite model path
tflite_model_file = 'lite-model_ssd_mobilenet_v1_100_320_fp32_nms_1.tflite'

interpreter = tf.lite.Interpreter(model_path=tflite_model_file)
interpreter.allocate_tensors()

input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()

input_shape = input_details[0]['shape']
input_array =  np.array(np.random.random_sample(input_shape), dtype=np.float32)

//HOW TO SET THRESHOLD POST-PROCESS
// is there any method like 'interpreter.set_threshold()' ?

interpreter.set_tensor(input_details[0]['index'], input_array)
interpreter.invoke()

output_data = interpreter.get_tensor(output_details[0]['index'])

print(output_data)
`

### 3. Failure after conversion


### 4. (optional) RNN conversion support
If converting TF RNN to TFLite fused RNN ops, please prefix [RNN] in the title.

### 5. (optional) Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
