mirror of
https://github.com/opencv/opencv.git
synced 2025-01-19 06:53:50 +08:00
Merge pull request #23343 from zihaomu:fix_test_onnx_conf
DNN Test ONNX: Fix the logic of the test case
This commit is contained in:
commit
22a52766dc
@ -47,6 +47,7 @@
|
||||
|
||||
#define CV_TEST_TAG_DNN_SKIP_ONNX_CONFORMANCE "dnn_skip_onnx_conformance"
|
||||
#define CV_TEST_TAG_DNN_SKIP_PARSER "dnn_skip_parser"
|
||||
#define CV_TEST_TAG_DNN_SKIP_GLOBAL "dnn_skip_global"
|
||||
|
||||
#define CV_TEST_TAG_DNN_SKIP_TIMVX "dnn_skip_timvx"
|
||||
#define CV_TEST_TAG_DNN_SKIP_CANN "dnn_skip_cann"
|
||||
|
@ -937,6 +937,7 @@ public:
|
||||
|
||||
static std::set<std::string> parser_deny_list;
|
||||
static std::set<std::string> global_deny_list;
|
||||
static std::set<std::string> opencv_deny_list;
|
||||
static std::set<std::string> opencl_fp16_deny_list;
|
||||
static std::set<std::string> opencl_deny_list;
|
||||
static std::set<std::string> cpu_deny_list;
|
||||
@ -1001,6 +1002,10 @@ public:
|
||||
#include "test_onnx_conformance_layer_filter_opencv_all_denylist.inl.hpp"
|
||||
};
|
||||
|
||||
opencv_deny_list = {
|
||||
#include "test_onnx_conformance_layer_filter_opencv_denylist.inl.hpp"
|
||||
};
|
||||
|
||||
opencl_fp16_deny_list = {
|
||||
#include "test_onnx_conformance_layer_filter_opencv_ocl_fp16_denylist.inl.hpp"
|
||||
};
|
||||
@ -1036,6 +1041,7 @@ public:
|
||||
|
||||
std::set<std::string> Test_ONNX_conformance::parser_deny_list;
|
||||
std::set<std::string> Test_ONNX_conformance::global_deny_list;
|
||||
std::set<std::string> Test_ONNX_conformance::opencv_deny_list;
|
||||
std::set<std::string> Test_ONNX_conformance::opencl_fp16_deny_list;
|
||||
std::set<std::string> Test_ONNX_conformance::opencl_deny_list;
|
||||
std::set<std::string> Test_ONNX_conformance::cpu_deny_list;
|
||||
@ -1057,14 +1063,21 @@ TEST_P(Test_ONNX_conformance, Layer_Test)
|
||||
bool checkLayersFallbacks = true;
|
||||
bool checkAccuracy = true;
|
||||
|
||||
// SKIP when the test case is in the parser deny list.
|
||||
if (parser_deny_list.find(name) != parser_deny_list.end())
|
||||
{
|
||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_PARSER, CV_TEST_TAG_DNN_SKIP_ONNX_CONFORMANCE);
|
||||
}
|
||||
|
||||
// SKIP when the test case is in the global deny list.
|
||||
if (global_deny_list.find(name) != global_deny_list.end())
|
||||
{
|
||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_GLOBAL, CV_TEST_TAG_DNN_SKIP_ONNX_CONFORMANCE);
|
||||
}
|
||||
|
||||
if (backend == DNN_BACKEND_OPENCV)
|
||||
{
|
||||
if (global_deny_list.find(name) != global_deny_list.end())
|
||||
if (opencv_deny_list.find(name) != opencv_deny_list.end())
|
||||
{
|
||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCV_BACKEND, CV_TEST_TAG_DNN_SKIP_ONNX_CONFORMANCE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user