I noticed that the output_details I get through interpreter.get_output_details() only has one output tensor named ‘StatefulPartitionedCall:0’. If I understand the code correctly, there should be a total of four output tensors. Have you been able to execute a FOMO model using the method run_object_detection_inference from inference.py? Unfortunately, I don’t have an exact standalone reproduction case.
Thanks for using Edge Impulse! We only really provide this Python code for training; it’s not designed for efficient or convenience inference and we recommend users stick to our typical deployment options (C++, etc).
That said, if you are really set on doing FOMO inference in Python you can use the run_segmentation_inference() function for inspiration:
You won’t be able to use run_object_detection_inference() since that is for SSD models.
run_segmentation_inference() does a bunch of things, including evaluation against a labelled input. The important call for you is this one, which takes the raw output of the FOMO model and turns it into bounding boxes:
# convert model output to list of BoundingBoxLabelScores including fusing
# of adjacent boxes. retains class=0 from segmentation output.
y_pred_boxes_labels_scores = convert_segmentation_map_to_object_detection_prediction(
output, minimum_confidence_rating, fuse=True)
You can also use the output “raw” and treat it as a segmentation map showing class probabilities for each region of the image.