Merge pull request #19497 from OrestChura:oc/kmeans_ptest

[G-API]: Performance tests for kmeans

* - Perf.Tests for kmeans(2D, 3D (Point2f/3f), ND (Mat))
 - New file for common parts of acc. and perf. tests for core kernels added
 - Some typos corrections

* Applying comments
This commit is contained in:
Orest Chura
2021-02-26 00:58:52 +03:00
committed by GitHub
parent 0553543e6e
commit 21b2e33ebb
9 changed files with 374 additions and 203 deletions
@@ -2,7 +2,7 @@
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Copyright (C) 2018-2020 Intel Corporation
// Copyright (C) 2018-2021 Intel Corporation
#include "../perf_precomp.hpp"
@@ -282,6 +282,35 @@ INSTANTIATE_TEST_CASE_P(ConvertToPerfTestCPU, ConvertToPerfTest,
Values(0.0),
Values(cv::compile_args(CORE_CPU))));
INSTANTIATE_TEST_CASE_P(KMeansNDPerfTestCPU, KMeansNDPerfTest,
Combine(Values(cv::Size(1, 20),
cv::Size(16, 4096)),
Values(AbsTolerance(0.01).to_compare_obj()),
Values(5, 15),
Values(cv::KMEANS_RANDOM_CENTERS,
cv::KMEANS_PP_CENTERS,
cv::KMEANS_RANDOM_CENTERS | cv::KMEANS_USE_INITIAL_LABELS,
cv::KMEANS_PP_CENTERS | cv::KMEANS_USE_INITIAL_LABELS),
Values(cv::compile_args(CORE_CPU))));
INSTANTIATE_TEST_CASE_P(KMeans2DPerfTestCPU, KMeans2DPerfTest,
Combine(Values(20, 4096),
Values(5, 15),
Values(cv::KMEANS_RANDOM_CENTERS,
cv::KMEANS_PP_CENTERS,
cv::KMEANS_RANDOM_CENTERS | cv::KMEANS_USE_INITIAL_LABELS,
cv::KMEANS_PP_CENTERS | cv::KMEANS_USE_INITIAL_LABELS),
Values(cv::compile_args(CORE_CPU))));
INSTANTIATE_TEST_CASE_P(KMeans3DPerfTestCPU, KMeans3DPerfTest,
Combine(Values(20, 4096),
Values(5, 15),
Values(cv::KMEANS_RANDOM_CENTERS,
cv::KMEANS_PP_CENTERS,
cv::KMEANS_RANDOM_CENTERS | cv::KMEANS_USE_INITIAL_LABELS,
cv::KMEANS_PP_CENTERS | cv::KMEANS_USE_INITIAL_LABELS),
Values(cv::compile_args(CORE_CPU))));
INSTANTIATE_TEST_CASE_P(ResizePerfTestCPU, ResizePerfTest,
Combine(Values(AbsExact().to_compare_f()),
Values(CV_8UC1, CV_16UC1, CV_16SC1),