# PYNQ DPU + Vitis AI examples notebooks for object Detection

**URL:** <https://discuss.pynq.io/t/pynq-dpu-vitis-ai-examples-notebooks-for-object-detection/3511>\
**Category:** Support\
**Created:** [January 7, 2022, 9:15pm UTC](https://discuss.pynq.io/t/pynq-dpu-vitis-ai-examples-notebooks-for-object-detection/3511 "2022-01-07T21:15:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![wilfred](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/wilfred/32/2667_2.png) [@wilfred](https://discuss.pynq.io/u/wilfred)\
**Post date:** [January 7, 2022, 9:15pm UTC](https://discuss.pynq.io/t/pynq-dpu-vitis-ai-examples-notebooks-for-object-detection/3511/1 "2022-01-07T21:15:08Z")

</div>

Hi,

I have been trying to execute the DPU related examples provided in the Vitis AI Zoo on the PYNQ platform. The example notebooks that are available are generally for object classification. With a bit of searching, I came across the information in the searches that a few of the notebooks (related to object detection through **YOLO** and **SSD** ) have been removed from the PYNQ DPU Github repo. Can anyone please help and direct me as to how I can get the Models in the Vitis AI zoo executed on the PYNQ ZCU104 platform? Any information in this direction will be very helpful.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [January 9, 2022, 11:02pm UTC](https://discuss.pynq.io/t/pynq-dpu-vitis-ai-examples-notebooks-for-object-detection/3511/2 "2022-01-09T23:02:54Z")

</div>

> [@wilfred](#):
>
> Vitis AI zoo executed on the PYNQ ZCU104 platform? Any information in this direction will be very help

I think there are instructions [here](https://github.com/Xilinx/DPU-PYNQ/tree/v1.3.2/host)? Have you tried? You will need a x86 machine to rebuild them yourself.

---

<div class="post-metadata">

**Author:** ![wilfred](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/wilfred/32/2667_2.png) [@wilfred](https://discuss.pynq.io/u/wilfred)\
**Post date:** [January 10, 2022, 4:54am UTC](https://discuss.pynq.io/t/pynq-dpu-vitis-ai-examples-notebooks-for-object-detection/3511/3 "2022-01-10T04:54:29Z")

</div>

I have built the xmodel files necessary for the examples, but needed help to code up (jupyter notebook example) for providing data and obtaining back data from the PYNQ inference models.

---

<div class="post-metadata">

**Author:** ![skalade](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/skalade/32/686_2.png) [@skalade](https://discuss.pynq.io/u/skalade)\
**Post date:** [January 10, 2022, 11:36am UTC](https://discuss.pynq.io/t/pynq-dpu-vitis-ai-examples-notebooks-for-object-detection/3511/4 "2022-01-10T11:36:46Z")

</div>

Hi there,

The previous notebooks (YOLO) were using the DNNDK api, which has now been deprecated and replaced with the Vitis AI Runtime (VART). This is probably more of a Vitis AI question than a PYNQ one. Your best bet is to find a similar python application in the Vitis AI github repository (something like [this](https://github.com/Xilinx/Vitis-AI/blob/master/tools/Vitis-AI-Library/graph_runner/test/yolov4-tiny.py)). Hope that helps.

Thanks  
Shawn

---

<div class="post-metadata">

**Author:** ![wilfred](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/wilfred/32/2667_2.png) [@wilfred](https://discuss.pynq.io/u/wilfred)\
**Post date:** [January 10, 2022, 12:18pm UTC](https://discuss.pynq.io/t/pynq-dpu-vitis-ai-examples-notebooks-for-object-detection/3511/5 "2022-01-10T12:18:40Z")

</div>

Will take this lead and give it a try. Thanks.

---

<div class="post-metadata">

**Author:** ![dramoz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/dramoz/32/2757_2.png) [@dramoz](https://discuss.pynq.io/u/dramoz)\
**Post date:** [March 30, 2022, 7:42pm UTC](https://discuss.pynq.io/t/pynq-dpu-vitis-ai-examples-notebooks-for-object-detection/3511/6 "2022-03-30T19:42:04Z")

</div>

Hi, were you able to run YOLO on PYNQ without DNNDK?

---

<div class="post-metadata">

**Author:** ![wilfred](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/wilfred/32/2667_2.png) [@wilfred](https://discuss.pynq.io/u/wilfred)\
**Post date:** [March 30, 2022, 7:53pm UTC](https://discuss.pynq.io/t/pynq-dpu-vitis-ai-examples-notebooks-for-object-detection/3511/7 "2022-03-30T19:53:25Z")

</div>

I haven’t worked on yolo for now, but i was able to works with custom models of my own.

---

<div class="post-metadata">

**Author:** ![dramoz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/dramoz/32/2757_2.png) [@dramoz](https://discuss.pynq.io/u/dramoz)\
**Post date:** [March 30, 2022, 8:23pm UTC](https://discuss.pynq.io/t/pynq-dpu-vitis-ai-examples-notebooks-for-object-detection/3511/8 "2022-03-30T20:23:54Z")

</div>

Are there any direct way of running VART from PYNQ without the pybind11? That is the only example I have found to access more than one layer output.

---

<div class="post-metadata">

**Author:** ![dramoz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/dramoz/32/2757_2.png) [@dramoz](https://discuss.pynq.io/u/dramoz)\
**Post date:** [March 30, 2022, 9:00pm UTC](https://discuss.pynq.io/t/pynq-dpu-vitis-ai-examples-notebooks-for-object-detection/3511/9 "2022-03-30T21:00:21Z")

</div>

Never mind, I found it.  
If someone comes across the same question when you do  
`import pynq_dpu`  
it imports `vart` and `xil` for you. Looking at [dpu.py](https://github.com/Xilinx/DPU-PYNQ/blob/master/pynq_dpu/dpu.py) in the DPU-PYNQ repo the path has to be appended first to `sys.path`
