cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dvukadin
Observer
Observer
132 Views
Registered: ‎07-19-2018

how to run tiny_yolov3_416 with DpuTask when there are multiple subgraph after compiling model (VAI 1.3)

Hi,

I am trying to run tiny_yolov3_416 with DpuTask::create on VAI 1.3, but I don't know how to implement DpuTask functions for calling multiple subgraphs.

After compiling, there are two sugraphs of tiny_yolov3_416 and I am not sure how to implement them.

The following example does not work:

auto task = vitis::ai::DpuTask::create(kernel_name) // kernel_name = "/usr/share/...../tiny_yolov3_416.xmodel"

task->setImageRGB(image);

task->run(0u); // run only subgraph[0]

auto output_tensor = task->getOutputTensor(1u); // get output tensors from subgraph[1]

 

I think I need to get output tensors from sugraph[0] and set them as input tensors of subgraph[1] and run subgraph[1] but I don't know how to do it.

 

Any help would be appreciated.

 

Regards,

dvukadin

0 Kudos
Reply
2 Replies
jheaton
Xilinx Employee
Xilinx Employee
64 Views
Registered: ‎03-21-2008

Are you saying that you have 2 DPU subgraphs? I would not expect that for TinyYolov3.
Can you share the compiler output.

If you are converting from Darknet to Caffe, there is a layer change you need to make to compatible with the DPU.

0 Kudos
Reply
dvukadin
Observer
Observer
39 Views
Registered: ‎07-19-2018

Yes, I have 2 DPU subgraphs. I am converting tiny_yolov3 from Darknet to Caffe with the script: Vitis-AI/models/AI-Model-Zoo/caffe-xilinx/scripts/convert.py (branch: v1.3)

I only had to change "stride=2" to "stride=1" in [maxpool] at 92.-96. lines.

Please find attached the compiler output.

Thanks!

 

 

0 Kudos
Reply