02-18-2021 02:59 AM - edited 03-24-2021 02:45 AM
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
02-22-2021 03:50 PM
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.
02-23-2021 12:57 AM - edited 03-26-2021 09:39 AM
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.
These lines are from compiler stdout:
"[UNILOG][INFO] Begin to compile...
[UNILOG][WARNING] xir::Op{name = layer11-maxpool, type = pool-fix} has been assigned to CPU: ["kernel"(1x1) is not in DPU supported range {2, 3, 4, 5, 6, 7, 8}].
[UNILOG][INFO] Total device subgraph number 6, DPU subgraph number 2
[UNILOG][INFO] Compile done."
Please find attached the compiler output.
Thanks!