element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Ultra96 Hardware Design ssd_inception_v2 model and tensorflow on Ultra96v2 (petalinux 2020.2, Vitis AI-1.3)
  • Forums
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Avnet Boards Forums requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 16 replies
  • Answers 2 answers
  • Subscribers 47 subscribers
  • Views 965 views
  • Users 0 members are here
  • tensorflow
  • ssd_inception_v2
  • ultra96
  • petalinux 2020
  • vitis-ai
Related

ssd_inception_v2 model and tensorflow on Ultra96v2 (petalinux 2020.2, Vitis AI-1.3)

pkdeep.gautam
pkdeep.gautam over 1 year ago

Hello,

   I am facing the following problems:

 

1. When I try to run the tfssd application provided in V1.3 sample for Ultra96V2 board by the below link

"https://www.hackster.io/AlbertaBeef/vitis-ai-1-3-flow-for-avnet-vitis-platforms-cd0c51 ", i dont get any detection or bounding boxes in either image or video?

 

2. I have compiled the ssd_inception_v2 model  and trying to build python application for object detection using this model, something similar to the face detection application developed by Mario
"https://www.hackster.io/AlbertaBeef/face-detection-and-tracking-in-python-on-ultra96-v2-02d104 "

The problem is model-zoo template uses tensorflow for pre and post-processing, while tensorflow is not available on Ultra96V2 petalinux image (petalinux 2020.2, Vitis AI 1.3)

 

3. Can I install tensorflow on Ultra96V2?

 

Any help or suggestions for achieving this.

 

Regards

Pradeep

  • Reply
  • Cancel
  • Cancel

Top Replies

  • pkdeep.gautam
    pkdeep.gautam over 1 year ago in reply to albertabeef +1 suggested

    Hello Mario,

    Thanks for the response.

    1. I am trying to modify the python code what you have developed for facedetction unsing densobox model (face_py_vart example). I'll share the code once it is in a day…

  • pkdeep.gautam
    pkdeep.gautam over 1 year ago in reply to albertabeef +1

    Hello Mario,

       Sorry, it took long time for me to get back to you. Was involved in something else.

    I have updated the face detection script of yours and I am stuck in-between.

    As I understood, I need to do…

  • pkdeep.gautam
    pkdeep.gautam over 1 year ago in reply to nhphuong +1

    Hello,

       Yes I was able to complete the conversion and run on Board. Due to Covid related curbs couldn't update the thread with the code. I'll be happy to share it

  • albertabeef
    0 albertabeef over 1 year ago

    Pradeep,

    This is an excellent question, representing what I run into when I try to run one of the models in python.

    Xilinx only provides a few examples for the Python API, so we are left to figure this out ourselves.

    I have observed that I often find the answers in the python scripts included with the source archive for the model archive.

    Based on your feedback, it sounds like this is not a possibility for the tensor flow models ...

    Are you willing to share your python code, so that we can help find the solution ?

    Regards,

    Mario.

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Verify Answer
    • Cancel
  • pkdeep.gautam
    0 pkdeep.gautam over 1 year ago in reply to albertabeef

    Hello Mario,

    Thanks for the response.

    1. I am trying to modify the python code what you have developed for facedetction unsing densobox model (face_py_vart example). I'll share the code once it is in a day or 2, once it is in some shape. I am trying to use the mode ssd_inceptionv2 (vitis-ai/models/AI-Model-Zoo/model-list/tf_ssdinceptionv2_coco_300_300_9.62G_1.3).

     

    2. Any clue on why I am not getting any detection in the C++ application provided in sample/tfssd ? I tried with the compiled model provided in the off-the-shelf image given for V-1.3 for Ultra96V2, there are no detection boxes.

     

    3. Is there any way by which we can get the tensorflow up and running on Ultra96V2 (or any other Xilinx board with Petalinux)?

     

    Regards

    Pradeep

    • Cancel
    • Vote Up +1 Vote Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • albertabeef
    0 albertabeef over 1 year ago in reply to pkdeep.gautam

    Pradeep,

     

    1. Understood, I will wait for your code

     

    2. Yes, I "may" be able to explain that.  Another user identified an issue with my Vitis-AI 1.3 images, where I omitted some important {model}_officialcfg.prototxt files for the SSD models, which resulted in less detections.  Please refer back to the hackster project, where I describe this issue (in "Known Issues – Missing {model}_officialcfg.prototxt files for certain SSD models" section), and provide a workaround (archive in the "Code" section).

     

      http://avnet.me/vitis-ai-1.3-project

     

    3. I have not tried to install tensorflow on Ultra96-V2.  Have you tried to install with "pip3 install tensorflow" ?

     

    Regards,

    Mario.

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Verify Answer
    • Cancel
  • pkdeep.gautam
    0 pkdeep.gautam over 1 year ago in reply to albertabeef

    Hello Mario,

      1. In-Progress

     

      2. Yes. It is now showing the bounding boxes with lot of fliker . Any idea on how to show the class labels with this application?

     

      3. Yes I tried and It throws the following error:

                      

    root@u96v2-sbc-base-2020-2:~# pip3 install tensorflow

    Collecting tensorflow

      ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)

    ERROR: No matching distribution found for tensorflow

    root@u96v2-sbc-base-2020-2:~#

     

    Also I did not see any aarch64 file @ https://pypi.org/project/tensorflow/#files

     

    Regards

    Pradeep

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Verify Answer
    • Cancel
  • jomoenginer
    0 jomoenginer over 1 year ago in reply to pkdeep.gautam

    There is a Tensorflow install Guide on the 96Boards site.  This might help, or not.  However, having done something similar on an ODROID-C4, this could take quite a long time to compile.

     

    https://www.96boards.org/documentation/consumer/guides/tensorflow-installation.md.html

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Verify Answer
    • Cancel
  • pkdeep.gautam
    0 pkdeep.gautam over 1 year ago in reply to pkdeep.gautam

    Hello Mario,

       Sorry, it took long time for me to get back to you. Was involved in something else.

    I have updated the face detection script of yours and I am stuck in-between.

    The problem is:

    Actually to get the detection boxes coordinate, I need the initial anchor boxes( priors), which I dont know how to get?

    From DPU I am getting 2 tensors:

    1) detection boxes with class (91 classes, as this is trained on COCO) confidences : shape: (1, 1917, 91,1)

    2) detection boxes coordinates or something I dont understand (total 1917 boxes with each having 4 values) (1, 1917, 1, 4)

     

    Let me know how to upload the scripts, I could not find any attachment link here.

     

    Regards

    Pradeep

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Verify Answer
    • Cancel
  • pkdeep.gautam
    0 pkdeep.gautam over 1 year ago in reply to jomoenginer

    Thanks. Will try it and update.

     

    Regards

    Pradeep

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Verify Answer
    • Cancel
  • pkdeep.gautam
    0 pkdeep.gautam over 1 year ago in reply to albertabeef

    Hello Mario,

       Sorry, it took long time for me to get back to you. Was involved in something else.

    I have updated the face detection script of yours and I am stuck in-between.

    As I understood, I need to do the following to run SSD in Python (without tensorflow)

    1) Do multiclass softmax on detection boxes score:: DONE

    2) Convert the detection boxes to the actual size.:: STUCK

    3) Do the multi-class Non-max suppression without tensorflow : NOT STARTED

     

    The problem is:

    Actually to get the detection boxes coordinate, I need the initial anchor boxes( priors), which I dont know how to get?

    From DPU I am getting 2 tensors:

    1) detection boxes with class (91 classes, as this is trained on COCO) confidences : shape: (1, 1917, 91,1)

    2) detection boxes coordinates or something I dont understand (total 1917 boxes with each having 4 values) (1, 1917, 1, 4)

     

    Let me know how to upload the scripts, I could not find any attachment link here.

     

    Regards

    Pradeep

    • Cancel
    • Vote Up +1 Vote Down
    • Reply
    • Verify Answer
    • Cancel
  • nhphuong
    0 nhphuong over 1 year ago in reply to pkdeep.gautam

    Hi, did you make any progress on this? I'm implementing SSD MobileNet v2 (quite similar) & is now overwhelm with the amount of effort I may have to put in order build a python demo. The original source code depends entirely on TensorFlow 1.

    • Cancel
    • Vote Up 0 Vote Down
    • Reply
    • Verify Answer
    • Cancel
  • pkdeep.gautam
    0 pkdeep.gautam over 1 year ago in reply to nhphuong

    Hello,

       Yes I was able to complete the conversion and run on Board. Due to Covid related curbs couldn't update the thread with the code. I'll be happy to share it

    • Cancel
    • Vote Up +1 Vote Down
    • Reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube