cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dehim
Contributor
Contributor
518 Views
Registered: ‎05-01-2018

Arbitrary image scaling on DPU

Hello,

OpenCV image scaling is relatively slow. It seems, though I may be wrong, that the DPU is the perfect architecture to perform image scaling. I was wondering if it is actually possible to perform arbitrary image scaling on the DPU, and whether plans exist to implement this feature in a future release of DNNDK.

Thanks in advance,

-Dehim

0 Kudos
3 Replies
lvalena
Xilinx Employee
Xilinx Employee
474 Views
Registered: ‎12-09-2015

(^^)/

 

If an end-to-end profiling analysis of your application reveals that image scaling on the CPU is indeed a bottleneck, you may wish to consider the "resize" function (see UG1233) in the xfOpenCV library.

Capture.PNG

Capture.PNG

 

0 Kudos
dehim
Contributor
Contributor
433 Views
Registered: ‎05-01-2018

@lvalena,

Thank you very much for your reply. It turned out videoconvert was the worst bottleneck in my design.

I have already slightly reduced this bottleneck, by integrating the uyvy to bgr color space conversion in my GStreamer plugin. I could further reduce the bottleneck by using xfOpenCV. However, I wonder, am I incorrect to assume that both these color space conversions and arbitrary resizing of input images could be performed on the DPU? I would prefer it if I did not have to add extra firmware to perform a computation that can already be performed very well by the the DPU SoC platform.

- Dehim

0 Kudos
jcory
Xilinx Employee
Xilinx Employee
421 Views
Registered: ‎02-17-2011

Hi @dehim,
The DPU does not support hardware acceleration for colorspace conversion or resizing. The API for setting the input image for the DPU will automatically do resizing using opencv in software, but it is not hardware accelerated. One thought is that it would be possible to train your model on a different colorspace if you wanted to avoid doing the colorspace conversion entirely. Another option for both of these functions would be to use the VPSS IP core in the PL: https://www.xilinx.com/support/documentation/ip_documentation/v_proc_ss/v2_1/pg231-v-proc-ss.pdf. This IP is free to use and also has V4L2 linux drivers.
Thanks and hope this helps,
-JC
0 Kudos