My device, Jetson AGX Xavier, has sudo jetson_clocks --max;
The question is: CHECK_STATUS (vpiImageCreateWrapperOpenCVMat (mPic, 0, & image)); It took 20ms,
and
CHECK_STATUS(vpiSubmitConvertImageFormat(stream, VPI_BACKEND_CUDA, image, imageNV12, NULL));
CHECK_STATUS(vpiSubmitRescale(stream, backend, imageNV12, outputNV12, VPI_INTERP_LINEAR, VPI_BORDER_CLAMP, 0));
CHECK_STATUS(vpiSubmitConvertImageFormat(stream, VPI_BACKEND_CUDA, outputNV12, output, NULL));
CHECK_STATUS(vpiStreamSync(stream));
CHECK_STATUS(vpiStreamSync(stream)); Waiting for this to complete takes 20ms
Is based on the vpi example rescaleh ttps://docs.nvidia.com/vpi/algo_rescale.html
hi,
I am running the yolov5 model in the project, and want to use vpi to perform the pre-processing when scaling.
More sure this (vpiImageCreateWrapperOpenCVMat) wrapper spent 20 ms, calculate spent 20 ms, I input image size is 1920 * 1920, after scaling is 640 * 640
initialize:
All the above are operated before the online process. Only one image was updated and the wrapper was updated every time. Moreover, it took 4ms for the wrapper to be destroyed vpiImageDestroy(image);