Cv2.resize and SSD NMS NPU speedup

Hi anyone know how to use NPU to speedup cv2.resize and SSD NMS?

I am running SqueezeNet SSD on rk3399pro and have impressive inference speed (about 16ms/frame).

But what slows down the frame rate are two reasons:

  1. resize 1920x1080 frame size to 300x300: it takes about 16ms
  2. after inference, NMS process to candidate boxes: it takes about 13ms

So total frame time is 16ms (resize) + 16ms (SSD inference) + 13ms (NMS) = 45 ms/frame => 22 fps.

Question:

  1. is that possible to use NPU to speedup the cv2.resize operation? or use rk3399pro GPU? where can find such resource? I am using pytorch/python, is there python API for image resize using NPU/GPU?
  2. is that possible to implement NMS in NPU? would that speedup NMS? is there such API for python?

Thank you very much for your help.