Stephen Cow Chau
1 min readFeb 8, 2024

--

Thank you for reading, to answer direct, I suspect the detected object count is not output in the tflite model, it depends on the onnx to tflite library and it might decide to drop that. The way to “hack” that is changing that bit to an operation that can connect back to the graph instead of using python operation like len(tensor) [I realize that when converting YOLOv8, I should have another article on that]

I vaguely remember what I did during the coding is the run a sample image against each model (the PyTorch YOLO, the ONNX, the tflite and finally using the Tensorflow Object Detection API)

As well using the graph visualization to check the output graph to make sure the data flow is as expected.

Lastly, I really do not like the Tensorflow Object Detection API as it’s very rigid, I would tends to directly use PyTorch mobile, if possible, but it sure depends on your own project constraint and your own preference.

Wish you can solve it!

--

--

No responses yet