I have been converting the zoo text-detection-0004 model and it works fine targeting 2021.4, but with 2022.1 the input is transposed. (I had a similar issue with EAST before that wasn't resolved.) Looks like NHWC becomes NCWH.
There are some intermediate optimization parameters that might help. but I can't figure out how to specify them in the online conversion tool http://blobconverter.luxonis.com/.
Looking at the API integration guide there are intermediate parameters, but for some reason I can't run those examples without getting complaints about e.g. a missing "name" parameter.
Any ideas?

Update - using the compile parameter -ov_api_1_0 (Compile model to legacy format for usage in Inference Engine API) makes it run in 2022.1. Is something not supporting API 2.0? (I'm using depthai 2.19.1.)

  • erik replied to this.
    5 days later

    Hi dexter ,
    I assume the name parameter here is about name of the input/output layer. You could use eg. https://netron.app to view these names and then you can specify different parameters for these layers. 2022.1 OV version is supported by depthai.
    Thanks, Erik

      Hi erik ,
      The issue seems to be about supporting version 2.0 of the API since the network work when compiling as version 1.0.
      The "name" seems to be the name of the model. In fact the blobconverter python API appears to be quite different when converting for 2022.1. The python API examples provided don't seem to work for 2022.1.
      This is the only thing that made it work for me and it's making it a bit harder to provide compiler parameters.
      I found working parameters for changing the shape of the input layer, but the only one that really works is the default one for the network (as it should be), but that one is apparently somehow not handled properly by the V2 support.

      payload = {
      'name': 'text-detection-0004',
      'use_zoo': 'true',
      'myriad_shaves': '6',
      'myriad_params_advanced': '-ip U8 -ov_api_1_0'
      }

      • erik replied to this.

        Hi dexter ,
        Blobconverter is only a wrapper around OpenVino tools - does it work with native OpenVino tools (model optimizer, compile tool) as expected? If so, it might be we have outdated versions on our servers.
        Thanks, Erik

          Hi erik ,
          My interpretation is that the conversion goes well, but that the blob is not handled properly when loaded in depthai.
          The transition guide to OpenVino API 2.0 mentions that the optimizer used to change input layouts of models which required workarounds. Those workarounds are not needed any more. So the question is if some of that is still happening in depthai when it shouldn't?

          @dexter could you share the .blob file together with expected inputs/outputs and we can take a look it?
          Thanks, Erik

            Hi erik ,
            I created a small sample to investigate it, but I don't know how to attach the info in the post (zip file). How can I submit files?

            Since I couldn't attach files here I created ticket 908 instead.

            Perfect, let's continue discussion there๐Ÿ™‚