acap-computer-vision-sdk-examples
acap-computer-vision-sdk-examples copied to clipboard
How to process the output of a yolov5n model
My axis camera is AXIS P1467-LE Bullet Camera, and I was able to successfully upload the yolov5n tflite model to it. I want to use that yolov5n tflite model, but I am struggling with post-processing the output. The exported tflite model output has only 1 element instead of the usual 4 (which can be found in SSD mobilenetv4 model. These 4 stand for bounding boxes, classes, scores for each class, and overall confidence). How can I extract the things mentioned before from the output of the inference and display the bounding boxes correctly on my image? I already tried exporting the yolov5n with nms to get the 4 outputs but then the model becomes unsupported by the camera as it can't allocate the tensors.
I have tried implementing the solution provided here: https://stackoverflow.com/questions/65824714/process-output-data-from-yolov5-tflite with the Inference client instead of the tflite interpreter but with no luck as the output image still didn't have the bounding boxes. Can you please provide me with an example code on how to actually use the yolov5n tflite model on an axis Camera.
On another note: I tried the SSD mobilenetv2 tflite model provided in the acap model zoo, and it had a different architecture than the one I trained from the tensorflow model zoo which made the acap tflite model significantly faster than tensorflow's tflite model on my axis camera. I just wanted to ask where can I get the tensorflow weights for the SSD mobilenetv2 tflite model, so that I can train it on my custom data.