Why does NEScale.run() run much slower than cv::resize with any InterpolationPolicy in OpenCV?
Hi, I have some problem about NEScale.cpp. Compared between NEScale and cv::resize function, I found NEScale.run() run much slower than cv::resize with any InterpolationPolicy in OpenCV. Why?
neon_resize_test.cpp Image src, dst;
unsigned int width = 1024;
unsigned int height = 1024;
unsigned int resize_width = 1256;
unsigned int resize_height = 1256;
src.allocator()->init(TensorInfo(width, height, Format::U8));
TensorInfo dst_tensor_info(resize_width, resize_height, Format::U8);
dst.allocator()->init(dst_tensor_info);
NEScale resize;
resize.configure(&src, &dst, InterpolationPolicy::BILINEAR, BorderMode::UNDEFINED);
//Allocate all the images
src.allocator()->allocate();
dst.allocator()->allocate();
.
.
resize.run(); //Test runtime
.
.
How did you compile the library? To get optimal performance it has to be compiled with debug=0.
I am sure debug=0 when compling the library. For cv::cvtcolor. NEColorConvert runs faster than cvtcolor.
Great, thanks for confirming. Which platform are you using for the comparison? Have you tried running the scale function multiple times in a loop to compute the average of the runtime?
Yes, I run the scale funtion 100 times in a loop. The platform is based on Cortex-A53 with arm-v7.
@duhuanxianzi Have you solve that problem? I also found that NEScale.run() run much slower than cv::resize?And other arm ComputeLibrary functions also showed bad performance than opencv function.
Hi to all
I also experienced slower performance with NEScale compared to cv::resize in OpenCV.
@duhuanxianzi Could you please help me to use NEColorConvert instead of cvtColor with CV_BGR2GRAY? What flags should I use in computeLibrary?