• DepthAI
  • Model compilation fails -err 500

Hi,
I'm trying to compile an available OpenVino nn <asl-recognition-0004>.
I installed the depthai_demo. That demo works with the provided nn's.
I created a new folder <asl-recognition-0004> under resources/nn that contains model.yml file with content:
https://raw.githubusercontent.com/openvinotoolkit/open_model_zoo/master/models/intel/asl-recognition-0004/model.yml
When I try to run the depthai_demo for this new nn, I get a fail message. I have no clue what it's trying to say, or what I have to do to make it work:
{"exit_code":1,"message":"Command failed with exit code 1, command: /opt/intel/openvino2020_1/deployment_tools/inference_engine/lib/intel64/myriad_compile -m /tmp/blobconverter/a3e50085c775442bb213f041a1852fea/asl-recognition-0004.xml -o /tmp/blobconverter/a3e50085c775442bb213f041a1852fea/asl-recognition-0004.blob -ip U8 -VPU_MYRIAD_PLATFORM VPU_MYRIAD_2480 -VPU_NUMBER_OF_SHAVES 14 -VPU_NUMBER_OF_CMX_SLICES 14","stderr":"Cannot create ShapeOf layer 755/Shape id:522\n","stdout":"Inference Engine: \n\tAPI version ............ 2.1\n\tBuild .................. 37988\n\tDescription ....... API\n"}

Please, help :-)

    Sorry TeeFix42 for the trouble here (and the delay in response).

    So we have seen in other cases that models that fail to compile in 2020.1 actually work fine in newer versions, like 2021.2. A recent example is here actually.

    So I'd recommend giving 2021.2 a shot. So on that, as you I think already know, our Gen1 API is actually set on 2020.1. But our Gen2 API (which we intend to formally release this month to replace Gen1) supports all OpenVINO versions. It simply auto-detects which version was used to compile the model.

    The Gen2 API is more flexible, so instead of doing one demo program (like we did in Gen1: depthai_demo.py), we instead have a slew of simpler examples along with examples of more complicated multi-stage flows.

    Below is one basic example:
    https://docs.luxonis.com/projects/api/en/gen2_develop/samples/08_rgb_mobilenet/.

    And there are more complicated examples here:

    https://github.com/luxonis/depthai-experiments/tree/master/gen2-age-gender
    https://github.com/luxonis/depthai-experiments/tree/master/gen2-gaze-estimation

    So anyway, try OpenVINO 2021.2 and see if the problem goes away. If it does not, let's involve PINTO0309 in our Discord as he'll likely be able to make it work.

    Thoughts?

    Thanks,
    Brandon

    Thanks for the answer Brandon.
    I installed the new Openvino toolkit to do the compilation. That brought me to:
    https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Device-with-quot-CPU-quot-name-is-not-registered-in-the/td-p/1241148
    Where it is mentioned that "The 'asl-recognition' model and 'person-detection-asl' model are not supported on MYRIAD. The models are only supported on CPU and GPU. I apologize for the inconvenience."
    I need to find another way to make my robot (as a hobby) recognises hand gestures. 😀

      Oh so TeeFix42 my bad I didn't realize that the ASL in the model name literally meant American Sign Language (and I should have). So actually there is a tutorial on RoboFlow for training just this for depthai/OAK-D:
      https://blog.roboflow.com/luxonis-oak-d-custom-model/

      And for other hand gesture recognition, see here: https://opencv.org/opencv-spatial-al-competition-winners-announced/

      So geax/PINTO0309 have converted a bunch of hand models to work on MYRIAD:
      https://github.com/geaxgx/UniversalHandControl

      And also more broadly speaking, PINTO0309 has a great model zoo and is very responsive:

      https://github.com/PINTO0309/PINTO_model_zoo

      This reminds me I should make a resources post about these things. Just set that as an action item for next week.

      Thanks and sorry for not realizing at first what you were meaning to do here.
      -Brandon

      Tnx Brandon for all your interesting feedback.
      I do this for a hobby, I'm not a pro.
      I decided to train my own network. (3 hand gestures: 'stop', 'point_left', 'point_right')
      There a few good tutorials (Pyimagesearch and Youtube), but I remain struggling with the fact that, besides creating a dataset and labelling images, the whole process from training up to having a workable .blob file is an extensive and manual process. f.e.: One you have your imageset, you can use the Tensorflow API in python to train a network. Which Tensorflow API is recommended for further use in Openvino conversion and conversion for depthai?)
      The Tensorflow API creates multiple files (checkpoint, index, meta, pb, pbtxt ...) : one tutorial creates file x, another tutorial creates file y. But for openvino, you need file z... And each time, I have to search for a piece of code or script that does the job.
      On top of that, I encounter limitations for specific features.
      Why isn't there a one-way-process: going from a labelled imageset to a blob file? I can understand that a user wants to tune parameters in the whole process. But tuning parameters is something different than finding the right script s and using the correct versions to reach the goal.
      Perhaps a good idea: create a framework that goes from labeled images to a blob file? Is that possible?
      I ask those questions to you, because you know a lot more than I do 😀

        Hello TeeFix42,
        that is a great idea, and I believe it's already somewhere on todo list. I agree it's a bit complicated especially the first time trying it out, that's why we also have a web compiler, which can save you some time:
        http://69.164.214.171:8083/
        Thanks, Erik

        Hi Erik,
        Something is wrong with the webcompiler page: I cannot scroll on that page. I can see 2 choices that need to be done: <choose openvino version> and <choose model source> But I can't scroll down and go below those 2 choices. I'm on Mac. I tried Safari and Chrome.
        Can you verify?
        Thanks,
        Tom
        PS: Yesterday I spend 6 hours installing (compiling darknet), taking multiple attempts. It's again the same story: a lot of dependancies with specific versions (Visual studio, CUDA, Cuda dnn, cmake, opencv, etc..) And I'm only halfway. (Need to be able to convert it into openvino and than convert it into a blob.)
        I spend a lot more time in creating a workable environment (that is able to use the advantage of my CUDA) than working on computer vision. My primary goal is to train a network: gather datasets and get experience in training a nn.

        • erik replied to this.

          Hello TeeFix42,
          that's because there's nothing below. You select the openvino version and model source and click continue. On the next page, you select the model source files and optionally compile params. You click convert and wait a bit.
          It took me a fair amount of time as well, and at the end it was the same result as just using the online compiler.

          Hi Eric,
          The "continue" button is below the browser screen on my MAC. (I saw the correct page on a Windows machine.)
          Tip for other users that encounter the same issue: use the TAB key to jump to the next button. That makes the "continue" button reachable.

          23 days later

          I was also in same issue, Mac version need below 10.5 I am degrading my Mac OS 10.5 to compile OpenVINO