I have trained a custom YOLOv5 model for custom object detection. Then exported the trained model to TFlite format. I want to draw bounding box around detected object. To do that, the Location Tensor (see image) should be of shape 4 i.e. return 4 float values as coordinates (as mentioned in Tensorflow docs) but my model’s location tensor is [1, 25200, 6] => 6 float values.
This is making my model incompatible for integration in Android studio.
How to modify my model so that Output Tensor (aka Location Tensor in this case) returns only 4 values ?