GithubHelp home page GithubHelp logo

Comments (9)

pataxis avatar pataxis commented on September 24, 2024

Hi @QLinhHub and thanks for the question.

We need you to provide more information.

  • Which Axis product are you running on?
  • I suppose you are building your own ACAP application (not one of the example applications), but which ACAP Native SDK version are you using?
    • If you are basing your application on one of the example applications, that might also be helpful to know.
  • When do you get the error?
    • Is it when building, installing or running the application?
    • Is the error output from the system log or are you running commands in a shell on the Axis device?
  • Can you pin down which function call that gives this output?

from acap-native-sdk-examples.

QLinhHub avatar QLinhHub commented on September 24, 2024

Hi @pataxis,

Thanks for your response !

Here are the information you need:

  • Camera: Axis P1375, chip ARTPEC-7, Memory: 1GB RAM and 512MB Flash, Firmware: 10.11.65, ACAP version: 4.0.
  • I'm building my own object detection application base on your object detection exemple. I'm trying to use yolov5 instead of SSD Mobilenetv2 like in your exemple because yolov5 is more powerful.
  • I tried yolov5s (small) and yolov5n (nano, much smaller) but I always face the same issue that Larod could not allocate tensors when loading the model larodLoadModel. The error occurs when I run the application, which mean that the build and installing phase is going well. Otherwise, the error message that I described appears on the system log. When I jump to the camera terminal and watch the log, that said: [ NOTICE ] systemd[1]: sdkobject_detection.service: Main process exited, code=exited, status=1/FAILURE.
  • The function setupLarod I used is in the object detection exemple.

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 !

from acap-native-sdk-examples.

Corallo avatar Corallo commented on September 24, 2024

@QLinhHub Could you provide the model that you are trying to upload on the camera?

from acap-native-sdk-examples.

QLinhHub avatar QLinhHub commented on September 24, 2024

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:

  • The size of the input is 640x640.
  • The output order of the model is: scores, locations, number of detections, classes.

from acap-native-sdk-examples.

Corallo avatar Corallo commented on September 24, 2024

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

from acap-native-sdk-examples.

QLinhHub avatar QLinhHub commented on September 24, 2024

Thanks for your response! Here is the output of the command:

Screenshot from 2022-08-16 13-58-35

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.

from acap-native-sdk-examples.

Corallo avatar Corallo commented on September 24, 2024

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.

from acap-native-sdk-examples.

QLinhHub avatar QLinhHub commented on September 24, 2024

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!

from acap-native-sdk-examples.

Corallo avatar Corallo commented on September 24, 2024

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.

from acap-native-sdk-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.