I have an OAK-D PoE camera. I am trying to run the OCR example out of the box and it runs fine. However, if i try to choose any other text detection or text recognition model from the zoo it fails.

Also, if I use OpenVino version 2021.4 and models from the zoo accordingly (for that version) the script crashes and fails. I'm trying this as I want to understand if I can use any other better performing open source models from the zoo for both the text detection and recognition tasks.

Hi @yishu_corpex
Could you link me to the other models you are trying to run? And also could you attach the full error you get?

    KlemenSkrlj

    The models I am trying to use are text-detection-0003 and text-recognition-resnet-fc (fp16) from the openvino model zoo. I do convert them into blob using the Luxonis' blobconvertor tool. I make sure to choose the openvino version as 2021.2 which is the same as that in the example script. The bellow is what gets printed on the terminal and then the script terminates.

    Stack trace (most recent call last):
    #15 Object "", at 00007FFCBCEFE8D7, in BaseThreadInitThunk
    #14 Object "", at 00007FFBD2CC94D2, in PyInit_depthai
    #13 Object "", at 00007FFBD2B6B8EC, in PyInit_depthai
    #12 Object "", at 00007FFBD2C28798, in PyInit_depthai
    #11 Object "", at 00007FFBD2CAF1E3, in PyInit_depthai
    #10 Object "", at 00007FFCBBE1933A, in RaiseException
    #9 Object "", at 00007FFCBE7F9336, in RtlRaiseException
    #8 Object "", at 00007FFCBE7FA328, in RtlWow64GetCurrentCpuArea
    #7 Object "", at 00007FFCBE9206FF, in _chkstk
    #6 Object "", at 00007FFBD2CAD0A0, in PyInit_depthai
    #5 Object "", at 00007FFBD2CAE549, in PyInit_depthai
    #4 Object "", at 00007FFBD2CB1865, in PyInit_depthai
    #3 Object "", at 00007FFBD2CB1800, in PyInit_depthai
    #2 Object "", at 00007FFBD2CB0B62, in PyInit_depthai
    #1 Object "", at 00007FFBD2CC9105, in PyInit_depthai
    #0 Object "", at 00007FFBD2CC8CE4, in PyInit_depthai

    If I go back to the original example code the script runs and i am able to see live detections but they are great in case of my applications. Thus i want to test with deeper open source models.

    KlemenSkrlj

    Now if i try using the text-detection-0004_openvino_2021.4 and text-recognition-0014_openvino_2021.4 from the https://artifacts.luxonis.com/artifactory/blobconverter-backup/blobs/ and update the openvino version to 2021.4 the I get the following error

    [14442C102111E4D600] [192.168.220.2] [6.548] [NeuralNetwork(3)] [warning] Network compiled for 4 shaves, maximum available 13, compiling for 6 shaves likely will yield in better performance
    [14442C102111E4D600] [192.168.220.2] [6.550] [NeuralNetwork(9)] [warning] Network compiled for 4 shaves, maximum available 13, compiling for 6 shaves likely will yield in better performance
    [14442C102111E4D600] [192.168.220.2] [6.562] [NeuralNetwork(3)] [warning] The issued warnings are orientative, based on optimal settings for a single network, if multiple networks are running in parallel the optimal settings may vary
    [14442C102111E4D600] [192.168.220.2] [6.563] [NeuralNetwork(9)] [warning] The issued warnings are orientative, based on optimal settings for a single network, if multiple networks are running in parallel the optimal settings may vary
    [14442C102111E4D600] [192.168.220.2] [6.881] [NeuralNetwork(3)] [error] Tried to allocate '178972736'B out of '140537855'B available.
    [14442C102111E4D600] [192.168.220.2] [6.885] [NeuralNetwork(3)] [error] Neural network executor '1' out of '2' error: OUT_OF_MEMORY
    [14442C102111E4D600] [192.168.220.2] [6.890] [NeuralNetwork(3)] [error] Tried to allocate '178972736'B out of '140537855'B available.
    [14442C102111E4D600] [192.168.220.2] [6.894] [NeuralNetwork(3)] [error] Neural network executor '0' out of '2' error: OUT_OF_MEMORY
    [14442C102111E4D600] [192.168.220.2] [6.894] [NeuralNetwork(3)] [error] Not enough memory to start a given neural network, needed at least: 178972736B

    In this case I think the camera resources are going out of memory causing this error

    yishu_corpex
    Can you try compiling for lower shave count? Seems the device is running out of memory.

    Thanks,
    Jaka

      jakaskerl

      I did try even compiling for 2 shaves, but get the same out of memory error. Seems like I will have to look for another light weight model.