I have trained a custom YOLOv5 model and then converted it to .blob using the online converter tool. The model is trained to detect only one class. Then I placed this model along with custom_model.json file. I changed the contents of the json file to include only one class and the input size: 640x640.

Then ran the depthai_demo.py script and selected 'custom_model' from the CNN dropdown menu. But then I am getting the following error:

What does this mean?

Thank You.

  • erik replied to this.

    Hello yashrunwal ,
    sorry about the delay. You can set the ImageManip's maximum frame size like this: manip.setMaxOutputFrameSize(1228800) and it should work as expected. We will work on providing better error message so it's clear how to fix this.
    Thanks, Erik

      erik Hello, As you suggested, I used this command manip.setMaxOutputFrameSize(1228800) in the pipeline_manager.py as shown below:

      However, the error still exists. Any help?

      Edit 1:
      I tried to use the aforementioned line directly in the depthai_demo.py script and I got similar results:

      • erik replied to this.

        Hello yashrunwal , did it change the error message, so the second number is higher, or is it exactly the same?

          Hello yashrunwal , asking the team internally so we add support for larger frames to the depthai_demo as well, it should be added this week. Will also circle back with the temporary solution.
          Thanks, Erik

          Hi yashrunwal
          Could you try the fix_nn_manip branch? I created a draft PR with a fix that should work for you. Let me know if this helps.

          To use it, in the depthai repo root, run these commands:

          git pull
          git checkout fix_nn_manip