Closed QLinhHub closed 2 years ago
Hi @QLinhHub and thanks for the question.
We need you to provide more information.
setupLarod
is not a function in the larod API documentation.setupLarod
as in vdo-larod.c or any of the other examples?Hi @pataxis,
Thanks for your response !
Here are the information you need:
I don't know if this is due to the camera capacity limit (because yolov5 input is 640x640, while for the Mobilenet SSD is 300x300) or larod constraints (maybe there are layers in yolov5 that larod doesn't support) or maybe I made some stupid codes ^^.
Thanks in advance !
@QLinhHub Could you provide the model that you are trying to upload on the camera?
Hi @Corallo, yes you can download the model that I've already converted to .tflite format here. Just a note, because the input and output of this model is different from SSD MobilenetV2, so you have to make some modifications:
Thanks, Did you update the input size in the manifest? It should go from 300 300 to 640 640.
After you run your example on the camera and it fails, can you ssh into the camera and run
journalctl -u larod
and share the output
Thanks for your response! Here is the output of the command:
I think there is a problem with my tflite conversion. As a result, it produces some nodes in the graph that larod can't handle.
Right, so your camera does not support the full Tensorflow op set. And it seems that your model uses some that are not supported. You can find the list of the supported ops here.
Hi, I think the problem is that I used combined_non_max_removal which is not a TFLite operation but a TF operation. Therefore, it is not compatible.
After doing some research, I realized that there are a few ways to include the TF operation by enabling the Flex delegate by linking a TensorFlow Lite Flex delegate shared library. Here are some useful sources: ops_select, github.
Can you take a look at these and maybe provide a solution with cmake? This would be very useful as it would allow to install more types of models on the Axis camera!
Thanks in advance!
Hi @QLinhHub If are you going to use the model only on cpu, the approach of rebuilding the full tensorflow in an acap should work. However, we can not provide assistance for it at the moment. If your camera supports the computer vision sdk, you could try installing it as a python library, which might be easier.
Hello AXIS ACAP developers,
Actually, I try to integrate yolov5s (tflite) into my camera and I get the error from larod: "setupLarod: Unable to load model: Could not allocate tensors".
I haven't found the solution yet. But I think maybe the yolov5s is too big for my camera (ARTPEC-7 chip, 1GB RAM) or maybe there are some layers in the yolov5s that larod does not support (larod custom layers).
Please let me know your ideas, it would be very helpful !
Thanks in advance !