GAPI: Add compare function to perf tests#21150
Conversation
| { | ||
| EXPECT_TRUE(cmpF(out_mat_ocv, out_mat_gapi)); | ||
| EXPECT_EQ(0, cv::norm(out_mat_ocv, out_mat_gapi, NORM_INF)); | ||
| EXPECT_EQ(out_mat_gapi.size(), sz_in); |
There was a problem hiding this comment.
Please leave only one EXPECT_TRUE(cmpF(out_mat_gapi, out_mat_ocv)); and remove the rest.
OrestChura
left a comment
There was a problem hiding this comment.
Please resolve conflicts as well as address some small comments remaining
5209fcc to
a8fe8f1
Compare
|
@alexgiving could you please resolve merge conflicts and revert all changes doesn't linked with topic of this PR? |
25e98fa to
e2ff2d3
Compare
| cv::Size sz; | ||
| MatType type = -1; | ||
| cv::GCompileArgs compile_args; | ||
| std::tie(cmpF, opType, sz, type, compile_args) = GetParam();; |
There was a problem hiding this comment.
Please remove redundant ; at the end of line.
e2ff2d3 to
4d87b07
Compare
| Values(cv::compile_args(CORE_CPU)))); | ||
|
|
||
| INSTANTIATE_TEST_CASE_P(AddWeightedPerfTestCPU, AddWeightedPerfTest, | ||
| Combine(Values(Tolerance_FloatRel_IntAbs(1e-6, 1).to_compare_f()), |
There was a problem hiding this comment.
Could you please try to use AbsExact() function here?
There was a problem hiding this comment.
In that test there is a comparison between (cv::Scalar, cv::Scalar), AbsExact() compare two cv::Mat
There was a problem hiding this comment.
Did you means AddWeightedPerfTestCPU? Are you sure?
There was a problem hiding this comment.
I means AddWeightedPerfTestCPU test case. It compares 2 cv::Mat. I'm sure. So, please try AbsExact().
| Values(cv::compile_args(CORE_GPU)))); | ||
|
|
||
|
|
||
| INSTANTIATE_TEST_CASE_P(DISABLED_ConcatVertVecPerfTestGPU, ConcatVertVecPerfTest, |
There was a problem hiding this comment.
Could you please left a comment why this test still disabled?
There was a problem hiding this comment.
That test is working now. Enabled
339917d to
faade90
Compare
740bb86 to
1b38586
Compare
| class TransposePerfTest : public TestPerfParams<tuple<compare_f, cv::Size, MatType, cv::GCompileArgs>> {}; | ||
| class ResizePerfTest : public TestPerfParams<tuple<compare_f, MatType, int, cv::Size, cv::Size, cv::GCompileArgs>> {}; | ||
| class BottleneckKernelsConstInputPerfTest : public TestPerfParams<tuple<compare_f, std::string, cv::GCompileArgs>> {}; | ||
| class BottleneckKernelsConstInputPerfTest : public TestPerfParams<tuple<compare_f, std::string, double, double, cv::GCompileArgs>> {}; |
There was a problem hiding this comment.
Please remove possibility of configuration scale parameter. This contradicts the meaning of the test. For this test case fx and fy must be strictly equal to 0.5. Always.
| Values("cv/optflow/frames/1080p_00.png", "cv/optflow/frames/720p_00.png", | ||
| "cv/optflow/frames/VGA_00.png", "cv/dnn_face/recognition/Aaron_Tippin_0001.jpg"), | ||
| Values(0.5), | ||
| Values(0.5), |
There was a problem hiding this comment.
Please remove this configuration parameters. fx and fy must be equals to 0.5 constantly. It should not be possible to change them.
5161496 to
4c02e28
Compare
|
AddWeightedPerfTest is not work on OpenCL on GPU (throw termination reason: reached maximum number of iterations/AbsExact error: G-API output and reference output matrixes are not bitexact equal.) with parameters (Any, 5) and (32FC1, Any) [3034] |
GAPI: Add compare function to perf tests * Add PhasePerfTest and SqrtPerfTest * rebasing * debug tests * remove spaces * Disable DivRCPerfTestGPU * rebase * Applied comments * Correction * Revert parameter changes
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.