Post Go back to editing

Issues running DNN.py on AD-96ToF1-EBZ and DragonBoard 410c

Category: Software
Product Number: AD-96ToF1-EBZ
Software Version: Latest Version of the ADITOF_SDK

Hello,


I am trying to run the DNN.py example on the AD-96ToF1-EBZ sensor on the DragonBoard 410c.

When in the aditof_sdk/bindings/python/examples/dnn directory, I am trying to run the following command:

python dnn.py --prototxt \pathTo\MobileNetSSD_deploy.prototxt  --weights \pathTo\MobileNetSSD_deploy.caffemodel

I tried to replace the "\pathTo" on both to "\linaro@linaro-alip:~/workspace/github/aditof_sdk/bindings/python/examples" and this gave the error:

"error: please give the correct location of the prototxt and caffemodel"

Can you let me know how to properly specify the path to the prototxt and caffemodel?

  • Hi,

    There are a few reasons why this doesn't work.

    One scenario is when the DragonBoard410c has no internet access and the build process will download the 2 files (prototxt and caffemodel) but won't complain about the missing connectivity and will create empty files. So, can you please check that the size of these files is not 0?

    Another scenario is that openCV is to new. But I need to investigate this a little bit more.

    Thanks!

  • I will try these later today and reply back if there is still an issue. Thank you!

  • Alright, I can confirm the prototxt and caffemodel files were empty as you suggested. I connected to the internet and built them and they now have actual data (went to properties and they have a file size greater than 0 bytes). Still having the issue running the command in the terminal to run the dnn.py example. Can you please specify to me what I need to type to run this? 

    python3 dnn.py --prototxt \pathTo\MobileNetSSD_deploy.prototxt  --weights \pathTo\MobileNetSSD_deploy.caffemodel

    What do I put in place of the "\pathTo" part? How do I run this in the terminal. The prototxt and caffemodel files are present in the "home/linaro/workspace/github/aditof_sdk/bindings/python/examples" directory and I also copied them into the "home/linaro/workspace/github/aditof_sdk/bindings/python/examples/dnn" directory as well.

    Thank you.

  • I did some more debugging and things are like this:

    The command you are using is correct, but error message is misleading. The path is not the problem. The dnn.py fails to do the job as the openCV is too new. Or you can say the dnn.py code is too old. We have a PR in progress to fix this. I will let you know when it is ready and merged to main branch.

  • Thank you very much! Please let me know how to upgrade my version of the SDK when you have merged the changes to the main branch. 

  • Looks like the changes are already in main branch for quite some time. But most likely the SDK version you are using is even older.

    To update the SDK, make sure the Dragonboard 410c has internet access. Then go to the repo directory, get latest updates with git pull. Make sure you are on main branch, then build.

     

    cd ~/workspace/github/aditof_sd/build
    git pull
    git checkout master
    cmake  ..
    make
    sudo make install

  • Hmm it is still giving me the same "Error: Please give the correct location of the prototxt and caffemodel" even after doing all of these steps. Is there something I am missing? I am on the latest SDK version as well. Can you please type out the command to run the dnn.py code and in which directory to run this command in? 

    This is what I am running:

    "python3 dnn.py --prototxt \home/linaro/workspace/github/aditof_sdk/bindings/python/examples/dnn\MobileNetSSD_deploy.prototxt  --weights \home/linaro/workspace/github/aditof_sdk/bindings/python/examples/dnn\MobileNetSSD_deploy.caffemodel"

    Is this correct?

  • Hi,

    In the command you posted you pass the paths as: \home/linaro/workspace/github/aditof_sdk/bindings/python/examples/dnn\MobileNetSSD_deploy.caffemodel

    The command should actually be : python3 dnn.py --prototxt /home/linaro/workspace/github/aditof_sdk/bindings/python/examples/dnn/MobileNetSSD_deploy.prototxt  --weights /home/linaro/workspace/github/aditof_sdk/bindings/python/examples/dnn/MobileNetSSD_deploy.caffemodel

    There are two \  slashes in your paths instead of  /.

    If this doesn't fix your issue, try manually copying the prototxt and caffemodel files in the same directory as the dnn.py example and run it without specifying the paths:

    python3 dnn.py

    Let me know if this fixes your issue, thanks.

    Cristina

  • I tried both of these and it still throws the same error. I am going to try reflashing the SD card and building the example again. Where can I find the proper SD card image to use with the dragon board 410c?

  • You can download the latest SD card image release for the dragon board from: https://github.com/analogdevicesinc/aditof_sdk#supported-embedded-platforms , from the corresponding downloads section.

    When writing your SD Card , please follow these instructions , depending on your operating system : https://github.com/analogdevicesinc/aditof_sdk/blob/master/doc/sdcard_burn.md

    To update and rebuild the SDK on your dragon board, follow these steps : https://github.com/analogdevicesinc/aditof_sdk/blob/master/doc/dragonboard410c/build_instructions.md

    Let me know if the example is working for you after the update.

    Cristina