diff --git a/modules/dnn/include/opencv2/dnn/all_layers.hpp b/modules/dnn/include/opencv2/dnn/all_layers.hpp index 4b4b119bc4..14e629e8ea 100644 --- a/modules/dnn/include/opencv2/dnn/all_layers.hpp +++ b/modules/dnn/include/opencv2/dnn/all_layers.hpp @@ -1324,6 +1324,24 @@ CV__DNN_INLINE_NS_BEGIN static Ptr create(const LayerParams ¶ms); }; + class CV_EXPORTS BlackmanWindowLayer : public Layer + { + public: + static Ptr create(const LayerParams ¶ms); + }; + + class CV_EXPORTS HannWindowLayer : public Layer + { + public: + static Ptr create(const LayerParams ¶ms); + }; + + class CV_EXPORTS HammingWindowLayer : public Layer + { + public: + static Ptr create(const LayerParams ¶ms); + }; + class CV_EXPORTS DetLayer : public Layer { public: diff --git a/modules/dnn/src/init.cpp b/modules/dnn/src/init.cpp index 617e1cc934..f22e538a91 100644 --- a/modules/dnn/src/init.cpp +++ b/modules/dnn/src/init.cpp @@ -118,6 +118,9 @@ void initializeLayerFactory() CV_DNN_REGISTER_LAYER_CLASS(IsInf, IsInfLayer); CV_DNN_REGISTER_LAYER_CLASS(OneHot, OneHotLayer); CV_DNN_REGISTER_LAYER_CLASS(Det, DetLayer); + CV_DNN_REGISTER_LAYER_CLASS(BlackmanWindow, BlackmanWindowLayer); + CV_DNN_REGISTER_LAYER_CLASS(HannWindow, HannWindowLayer); + CV_DNN_REGISTER_LAYER_CLASS(HammingWindow, HammingWindowLayer); CV_DNN_REGISTER_LAYER_CLASS(CenterCropPad, CenterCropPadLayer); CV_DNN_REGISTER_LAYER_CLASS(DFT, DFTLayer); CV_DNN_REGISTER_LAYER_CLASS(BitShift, BitShiftLayer); diff --git a/modules/dnn/src/layers/layers_common.hpp b/modules/dnn/src/layers/layers_common.hpp index be7df00dbe..9c1296699c 100644 --- a/modules/dnn/src/layers/layers_common.hpp +++ b/modules/dnn/src/layers/layers_common.hpp @@ -94,20 +94,6 @@ template _Tp tensorToScalar(const Mat& tensor) // tensor to mat shape MatShape tensorToShape(const Mat& shapeTensor); -// inputs and outputs are both vector's or both are vector's. -// the function does the following: -// -// 1. resizes output vector to 1-element vector -// 2. outputs[0].fit(shape, inputs[0].type()) -// 3. temp = inputs[0].reshape(shape); -// 4. temp.copyTo(outputs[0]) // detect in-place case and do nothing in this case -// -// the function helps to implement DL operations -// 'Reshape', 'Flatten', 'Squeeze', 'Unsqueeze', 'Identity'. -void reshapeAndCopyFirst(InputArrayOfArrays inputs, - OutputArrayOfArrays outputs, - const MatShape& shape); - enum OnnxDataType { ONNX_UNDEFINED = 0, @@ -150,6 +136,19 @@ inline int onnxDataTypeToCV(OnnxDataType dt) } } +// inputs and outputs are both vector's or both are vector's. +// the function does the following: +// +// 1. resizes output vector to 1-element vector +// 2. outputs[0].fit(shape, inputs[0].type()) +// 3. temp = inputs[0].reshape(shape); +// 4. temp.copyTo(outputs[0]) // detect in-place case and do nothing in this case +// +// the function helps to implement DL operations +// 'Reshape', 'Flatten', 'Squeeze', 'Unsqueeze', 'Identity'. +void reshapeAndCopyFirst(InputArrayOfArrays inputs, + OutputArrayOfArrays outputs, + const MatShape& shape); } } diff --git a/modules/dnn/src/layers/windows_layer.cpp b/modules/dnn/src/layers/windows_layer.cpp new file mode 100644 index 0000000000..4d0efb86bb --- /dev/null +++ b/modules/dnn/src/layers/windows_layer.cpp @@ -0,0 +1,496 @@ +// This file is part of OpenCV project. +// 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) 2025, BigVision LLC, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../precomp.hpp" +#include "layers_common.hpp" +#include +#include "opencv2/core/hal/intrin.hpp" + +namespace cv { +namespace dnn { + +/* + Window layers, as defined in ONNX specification: + - BlackmanWindow: https://onnx.ai/onnx/operators/onnx__BlackmanWindow.html + - HannWindow: https://onnx.ai/onnx/operators/onnx__HannWindow.html + - HammingWindow: https://onnx.ai/onnx/operators/onnx__HammingWindow.html + + Supported opsets: 17 +*/ + +enum class WindowKind +{ + Blackman, + Hann, + Hamming +}; + +template +static void BlackmanWindowFill(Mat& out, int N, double N1, bool useDouble) +{ + CV_Assert(out.dims == 1); + CV_Assert((int)out.total() == N); + + if (useDouble) + { + const double alpha = 0.42; + const double beta = 0.08; + const double pi = CV_PI; + const double coeff1 = (2.0 * pi) / N1; + const double coeff2 = (4.0 * pi) / N1; + + cv::AutoBuffer _w(N); + double* w = _w.data(); + + int i = 0; +#if CV_SIMD_64F || CV_SIMD_SCALABLE_64F + const int nlanes64 = VTraits::vlanes(); + const int max_nlanes = VTraits::max_nlanes; + std::array index; + std::iota(index.data(), index.data() + max_nlanes, 0.0); + v_float64 vindex = vx_load(index.data()); + v_float64 delta = vx_setall_f64(nlanes64); + v_float64 vcoeff1 = vx_setall_f64(coeff1); + v_float64 vcoeff2 = vx_setall_f64(coeff2); + v_float64 valpha = vx_setall_f64(alpha); + v_float64 vbeta = vx_setall_f64(beta); + v_float64 vnegHalf = vx_setall_f64(-0.5); + + for (; i <= N - nlanes64; i += nlanes64) + { + v_float64 varg1 = v_mul(vcoeff1, vindex); + v_float64 varg2 = v_mul(vcoeff2, vindex); + v_float64 vc1 = v_cos(varg1); + v_float64 vc2 = v_cos(varg2); + v_float64 v = v_add(valpha, v_add(v_mul(vc1, vnegHalf), v_mul(vc2, vbeta))); + vx_store(w + i, v); + vindex = v_add(vindex, delta); + } +#endif + + for (; i < N; ++i) + { + double arg1 = coeff1 * i; + double arg2 = coeff2 * i; + double v = std::cos(arg1) * (-0.5); + v += std::cos(arg2) * beta; + v += alpha; + w[i] = v; + } + + T* dst = out.ptr(); + for (int n = 0; n < N; ++n) + dst[n] = saturate_cast(w[n]); + } + else + { + const float alpha = 0.42f; + const float beta = 0.08f; + const float pi = (float)CV_PI; + const float coeff1 = (2.0f * pi) / (float)N1; + const float coeff2 = (4.0f * pi) / (float)N1; + + cv::AutoBuffer _w(N); + float* w = _w.data(); + + int i = 0; +#if (defined(CV_SIMD_32F) && CV_SIMD_32F) || (defined(CV_SIMD_SCALABLE_32F) && CV_SIMD_SCALABLE_32F) + const int nlanes32 = VTraits::vlanes(); + const int max_nlanes32 = VTraits::max_nlanes; + std::array index; + std::iota(index.data(), index.data() + max_nlanes32, 0.0f); + v_float32 vindex = vx_load(index.data()); + v_float32 delta = vx_setall_f32(nlanes32); + v_float32 vcoeff1 = vx_setall_f32(coeff1); + v_float32 vcoeff2 = vx_setall_f32(coeff2); + v_float32 valpha = vx_setall_f32(alpha); + v_float32 vbeta = vx_setall_f32(beta); + v_float32 vnegHalf = vx_setall_f32(-0.5f); + + for (; i <= N - nlanes32; i += nlanes32) + { + v_float32 varg1 = v_mul(vcoeff1, vindex); + v_float32 varg2 = v_mul(vcoeff2, vindex); + v_float32 vc1 = v_cos(varg1); + v_float32 vc2 = v_cos(varg2); + v_float32 v = v_add(valpha, v_add(v_mul(vc1, vnegHalf), v_mul(vc2, vbeta))); + vx_store(w + i, v); + vindex = v_add(vindex, delta); + } +#endif + + for (; i < N; ++i) + { + float arg1 = coeff1 * i; + float arg2 = coeff2 * i; + float v = std::cos(arg1) * (-0.5f); + v += std::cos(arg2) * beta; + v += alpha; + w[i] = v; + } + + T* dst = out.ptr(); + for (int n = 0; n < N; ++n) + dst[n] = saturate_cast(w[n]); + } +} + +template +static void HannWindowFill(Mat& out, int N, double N1, bool useDouble) +{ + CV_Assert(out.dims == 1); + CV_Assert((int)out.total() == N); + + if (useDouble) + { + cv::AutoBuffer _w(N); + double* w = _w.data(); + + const double pi = CV_PI; + const double coeff = (2.0 * pi) / N1; + + int i = 0; +#if CV_SIMD_64F || CV_SIMD_SCALABLE_64F + const int nlanes64 = VTraits::vlanes(); + const int max_nlanes = VTraits::max_nlanes; + std::array index; + std::iota(index.data(), index.data() + max_nlanes, 0.0); + v_float64 vindex = vx_load(index.data()); + v_float64 delta = vx_setall_f64(nlanes64); + v_float64 vcoeff = vx_setall_f64(coeff); + v_float64 one = vx_setall_f64(1.0); + v_float64 half = vx_setall_f64(0.5); + + for (; i <= N - nlanes64; i += nlanes64) + { + v_float64 v = v_mul(half, v_sub(one, v_cos(v_mul(vcoeff, vindex)))); + vx_store(w + i, v); + vindex = v_add(vindex, delta); + } +#endif + + for (; i < N; ++i) + w[i] = 0.5 * (1.0 - std::cos(coeff * i)); + + T* dst = out.ptr(); + for (int n = 0; n < N; ++n) + dst[n] = saturate_cast(w[n]); + } + else + { + const float pi = (float)CV_PI; + const float coeff = (2.0f * pi) / (float)N1; + + cv::AutoBuffer _w(N); + float* w = _w.data(); + + int i = 0; +#if (defined(CV_SIMD_32F) && CV_SIMD_32F) || (defined(CV_SIMD_SCALABLE_32F) && CV_SIMD_SCALABLE_32F) + const int nlanes32 = VTraits::vlanes(); + const int max_nlanes32 = VTraits::max_nlanes; + std::array index; + std::iota(index.data(), index.data() + max_nlanes32, 0.0f); + v_float32 vindex = vx_load(index.data()); + v_float32 delta = vx_setall_f32(nlanes32); + v_float32 vcoeff = vx_setall_f32(coeff); + v_float32 one = vx_setall_f32(1.0f); + v_float32 half = vx_setall_f32(0.5f); + + for (; i <= N - nlanes32; i += nlanes32) + { + v_float32 v = v_mul(half, v_sub(one, v_cos(v_mul(vcoeff, vindex)))); + vx_store(w + i, v); + vindex = v_add(vindex, delta); + } +#endif + + for (; i < N; ++i) + w[i] = 0.5f * (1.0f - std::cos(coeff * i)); + + T* dst = out.ptr(); + for (int n = 0; n < N; ++n) + dst[n] = saturate_cast(w[n]); + } +} + +template +static void HammingWindowFill(Mat& out, int N, double N1, bool useDouble) +{ + CV_Assert(out.dims == 1); + CV_Assert((int)out.total() == N); + + if (useDouble) + { + const double alpha = 25.0 / 46.0; + const double beta = 1.0 - alpha; + const double pi = CV_PI; + const double coeff = (2.0 * pi) / N1; + + cv::AutoBuffer _w(N); + double* w = _w.data(); + + int i = 0; +#if CV_SIMD_64F || CV_SIMD_SCALABLE_64F + const int nlanes64 = VTraits::vlanes(); + const int max_nlanes = VTraits::max_nlanes; + std::array index; + std::iota(index.data(), index.data() + max_nlanes, 0.0); + v_float64 vindex = vx_load(index.data()); + v_float64 delta = vx_setall_f64(nlanes64); + v_float64 vcoeff = vx_setall_f64(coeff); + v_float64 valpha = vx_setall_f64(alpha); + v_float64 vbeta = vx_setall_f64(beta); + + for (; i <= N - nlanes64; i += nlanes64) + { + v_float64 varg = v_mul(vcoeff, vindex); + v_float64 vc = v_cos(varg); + v_float64 v = v_sub(valpha, v_mul(vc, vbeta)); + vx_store(w + i, v); + vindex = v_add(vindex, delta); + } +#endif + + for (; i < N; ++i) + { + double arg = coeff * i; + w[i] = alpha - std::cos(arg) * beta; + } + + T* dst = out.ptr(); + for (int n = 0; n < N; ++n) + dst[n] = saturate_cast(w[n]); + } + else + { + const float alpha = (float)(25.0 / 46.0); + const float beta = 1.0f - alpha; + const float pi = (float)CV_PI; + const float coeff = (2.0f * pi) / (float)N1; + + cv::AutoBuffer _w(N); + float* w = _w.data(); + + int i = 0; +#if (defined(CV_SIMD_32F) && CV_SIMD_32F) || (defined(CV_SIMD_SCALABLE_32F) && CV_SIMD_SCALABLE_32F) + const int nlanes32 = VTraits::vlanes(); + const int max_nlanes32 = VTraits::max_nlanes; + std::array index; + std::iota(index.data(), index.data() + max_nlanes32, 0.0f); + v_float32 vindex = vx_load(index.data()); + v_float32 delta = vx_setall_f32(nlanes32); + v_float32 vcoeff = vx_setall_f32(coeff); + v_float32 valpha = vx_setall_f32(alpha); + v_float32 vbeta = vx_setall_f32(beta); + + for (; i <= N - nlanes32; i += nlanes32) + { + v_float32 varg = v_mul(vcoeff, vindex); + v_float32 vc = v_cos(varg); + v_float32 v = v_sub(valpha, v_mul(vc, vbeta)); + vx_store(w + i, v); + vindex = v_add(vindex, delta); + } +#endif + + for (; i < N; ++i) + { + float arg = coeff * i; + w[i] = alpha - std::cos(arg) * beta; + } + + T* dst = out.ptr(); + for (int n = 0; n < N; ++n) + dst[n] = saturate_cast(w[n]); + } +} + +template +class WindowLayerImpl CV_FINAL : public BaseLayer +{ +public: + WindowLayerImpl(const LayerParams& params, WindowKind kind_) + : outputType(onnxDataTypeToCV(static_cast( + params.get("output_type", static_cast(ONNX_FLOAT))))), + periodic(params.get("periodic", 1)), + kind(kind_) + { + this->setParamsFrom(params); + } + + bool supportBackend(int backendId) CV_OVERRIDE + { + return backendId == DNN_BACKEND_OPENCV; + } + + bool dynamicOutputShapes() const CV_OVERRIDE + { + return true; + } + + bool getMemoryShapes(const std::vector& inputs, + const int /*requiredOutputs*/, + std::vector& outputs, + std::vector& internals) const CV_OVERRIDE + { + CV_Assert(inputs.size() == 1); + outputs.assign(1, MatShape()); + internals.clear(); + return true; + } + + void getTypes(const std::vector& /*inputs*/, + const int requiredOutputs, + const int requiredInternals, + std::vector& outputs, + std::vector& internals) const CV_OVERRIDE + { + int t = outputType; + if (t < 0) + t = CV_32F; + + outputs.assign(requiredOutputs, MatType(t)); + internals.assign(requiredInternals, MatType(-1)); + } + + void forward(InputArrayOfArrays inputs_arr, + OutputArrayOfArrays outputs_arr, + OutputArrayOfArrays /*internals_arr*/) CV_OVERRIDE + { + forwardImpl(this->name, outputType, inputs_arr, outputs_arr); + } + +private: + void forwardImpl(const String& name, + int outputType_, + InputArrayOfArrays inputs_arr, + OutputArrayOfArrays outputs_arr) const + { + CV_TRACE_FUNCTION(); + CV_TRACE_ARG_VALUE(layer_name, "name", name.c_str()); + + Size sz = inputs_arr.size(); + CV_Assert(sz.area() == 1); + + Mat sizeTensor = inputs_arr.getMat(0); + + CV_Assert(!sizeTensor.empty()); + CV_Assert(sizeTensor.total() == (size_t)1); + + int64_t size64 = 0; + tensorToScalar(sizeTensor, CV_64S, &size64); + + const char* layerPrefix = nullptr; + switch (kind) + { + case WindowKind::Blackman: layerPrefix = "BlackmanWindow"; break; + case WindowKind::Hann: layerPrefix = "HannWindow"; break; + case WindowKind::Hamming: layerPrefix = "HammingWindow"; break; + default: layerPrefix = "Window"; break; + } + + if (size64 <= 0) + CV_Error(Error::StsOutOfRange, String(layerPrefix) + ": size must be > 0"); + int N = saturate_cast(size64); + + int outType = outputType_ >= 0 ? outputType_ : CV_32F; + int depth = CV_MAT_DEPTH(outType); + + MatShape outShape(1); + outShape[0] = N; + + int outKind = outputs_arr.kind(); + Mat Y; + std::vector* out_mats = nullptr; + std::vector* out_umats = nullptr; + + if (outKind == _InputArray::STD_VECTOR_MAT) + { + out_mats = &outputs_arr.getMatVecRef(); + out_mats->resize(1); + out_mats->at(0).fit(outShape, outType); + Y = out_mats->at(0); + } + else if (outKind == _InputArray::STD_VECTOR_UMAT) + { + out_umats = &outputs_arr.getUMatVecRef(); + out_umats->resize(1); + out_umats->at(0).fit(outShape, outType); + Y = Mat(outShape, outType); + } + else + { + CV_Error(Error::StsNotImplemented, String(layerPrefix) + ": unsupported output kind"); + } + + const double N1 = (periodic == 0) ? std::max(N - 1, 1) : std::max(N, 1); + + switch (kind) + { + case WindowKind::Blackman: + switch (depth) + { + case CV_64F: BlackmanWindowFill(Y, N, N1, true); break; + case CV_32F: BlackmanWindowFill(Y, N, N1, false); break; + case CV_16F: BlackmanWindowFill(Y, N, N1, false); break; + case CV_16BF: BlackmanWindowFill(Y, N, N1, false); break; + default: + CV_Error(Error::BadDepth, "BlackmanWindow: unsupported output depth"); + } + break; + case WindowKind::Hann: + switch (depth) + { + case CV_64F: HannWindowFill(Y, N, N1, true); break; + case CV_32F: HannWindowFill(Y, N, N1, false); break; + case CV_16F: HannWindowFill(Y, N, N1, false); break; + case CV_16BF: HannWindowFill(Y, N, N1, false); break; + default: + CV_Error(Error::BadDepth, "HannWindow: unsupported output depth"); + } + break; + case WindowKind::Hamming: + switch (depth) + { + case CV_64F: HammingWindowFill(Y, N, N1, true); break; + case CV_32F: HammingWindowFill(Y, N, N1, false); break; + case CV_16F: HammingWindowFill(Y, N, N1, false); break; + case CV_16BF: HammingWindowFill(Y, N, N1, false); break; + default: + CV_Error(Error::BadDepth, "HammingWindow: unsupported output depth"); + } + break; + default: + CV_Error(Error::StsInternal, "Unknown WindowKind"); + } + + if (outKind == _InputArray::STD_VECTOR_UMAT) + { + Y.copyTo(out_umats->at(0)); + } + } + + int outputType; + int periodic; + WindowKind kind; +}; + +Ptr BlackmanWindowLayer::create(const LayerParams& params) +{ + return makePtr>(params, WindowKind::Blackman); +} + +Ptr HannWindowLayer::create(const LayerParams& params) +{ + return makePtr>(params, WindowKind::Hann); +} + +Ptr HammingWindowLayer::create(const LayerParams& params) +{ + return makePtr>(params, WindowKind::Hamming); +} + +}} // namespace cv::dnn diff --git a/modules/dnn/src/onnx/onnx_importer2.cpp b/modules/dnn/src/onnx/onnx_importer2.cpp index aa93ee6746..e3b8c09dd0 100644 --- a/modules/dnn/src/onnx/onnx_importer2.cpp +++ b/modules/dnn/src/onnx/onnx_importer2.cpp @@ -220,6 +220,9 @@ protected: void parseOneHot (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto); void parseDFT (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto); void parseDet (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto); + void parseBlackmanWindow (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto); + void parseHannWindow (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto); + void parseHammingWindow (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto); void parseCenterCropPad (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto); void parseGridSample (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto); void parseNegativeLogLikelihoodLoss(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto); @@ -1773,6 +1776,24 @@ void ONNXImporter2::parseDet(LayerParams& layerParams, const opencv_onnx::NodePr addLayer(layerParams, node_proto); } +void ONNXImporter2::parseBlackmanWindow(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto) +{ + layerParams.type = "BlackmanWindow"; + addLayer(layerParams, node_proto); +} + +void ONNXImporter2::parseHannWindow(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto) +{ + layerParams.type = "HannWindow"; + addLayer(layerParams, node_proto); +} + +void ONNXImporter2::parseHammingWindow(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto) +{ + layerParams.type = "HammingWindow"; + addLayer(layerParams, node_proto); +} + void ONNXImporter2::parseDFT(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto) { layerParams.type = "DFT"; @@ -2700,6 +2721,9 @@ void ONNXImporter2::buildDispatchMap_ONNX_AI() dispatch["OneHot"] = &ONNXImporter2::parseOneHot; dispatch["DFT"] = &ONNXImporter2::parseDFT; dispatch["Det"] = &ONNXImporter2::parseDet; + dispatch["BlackmanWindow"] = &ONNXImporter2::parseBlackmanWindow; + dispatch["HannWindow"] = &ONNXImporter2::parseHannWindow; + dispatch["HammingWindow"] = &ONNXImporter2::parseHammingWindow; dispatch["GridSample"] = &ONNXImporter2::parseGridSample; dispatch["AffineGrid"] = &ONNXImporter2::parseAffineGrid; dispatch["Upsample"] = &ONNXImporter2::parseUpsample; diff --git a/modules/dnn/test/test_onnx_conformance_layer_filter__openvino.inl.hpp b/modules/dnn/test/test_onnx_conformance_layer_filter__openvino.inl.hpp index 646b451de4..4ea7c6f1ef 100644 --- a/modules/dnn/test/test_onnx_conformance_layer_filter__openvino.inl.hpp +++ b/modules/dnn/test/test_onnx_conformance_layer_filter__openvino.inl.hpp @@ -326,6 +326,14 @@ CASE(test_bitshift_right_uint64) SKIP; CASE(test_bitshift_right_uint8) SKIP; +CASE(test_blackmanwindow) + SKIP; +CASE(test_blackmanwindow_expanded) + SKIP; +CASE(test_blackmanwindow_symmetric) + SKIP; +CASE(test_blackmanwindow_symmetric_expanded) + SKIP; CASE(test_cast_BFLOAT16_to_FLOAT) SKIP; CASE(test_cast_DOUBLE_to_FLOAT) @@ -662,20 +670,6 @@ CASE(test_edge_pad) SKIP; CASE(test_einsum_batch_diagonal) SKIP; -CASE(test_hardmax_axis_0) - SKIP; -CASE(test_hardmax_axis_1) - SKIP; -CASE(test_hardmax_axis_2) - SKIP; -CASE(test_hardmax_default_axis) - SKIP; -CASE(test_hardmax_example) - SKIP; -CASE(test_hardmax_negative_axis) - SKIP; -CASE(test_hardmax_one_hot) - SKIP; CASE(test_einsum_batch_matmul) // no filter CASE(test_einsum_inner_prod) @@ -926,20 +920,36 @@ CASE(test_gru_seq_length) // no filter CASE(test_gru_with_initial_bias) // no filter +CASE(test_hammingwindow) + SKIP; +CASE(test_hammingwindow_expanded) + SKIP; +CASE(test_hammingwindow_symmetric) + SKIP; +CASE(test_hammingwindow_symmetric_expanded) + SKIP; +CASE(test_hannwindow) + SKIP; +CASE(test_hannwindow_expanded) + SKIP; +CASE(test_hannwindow_symmetric) + SKIP; +CASE(test_hannwindow_symmetric_expanded) + SKIP; CASE(test_hardmax_axis_0) - // no filter + SKIP; CASE(test_hardmax_axis_1) - // no filter + SKIP; CASE(test_hardmax_axis_2) - // no filter + SKIP; CASE(test_hardmax_default_axis) - // no filter + SKIP; CASE(test_hardmax_example) - // no filter + SKIP; CASE(test_hardmax_negative_axis) - // no filter + SKIP; CASE(test_hardmax_one_hot) - // no filter + SKIP; CASE(test_einsum_batch_matmul) // no filter CASE(test_einsum_inner_prod) diff --git a/modules/dnn/test/test_onnx_conformance_layer_filter_opencv_classic_denylist.inl.hpp b/modules/dnn/test/test_onnx_conformance_layer_filter_opencv_classic_denylist.inl.hpp index 4ad7ca5800..d149c67ce6 100644 --- a/modules/dnn/test/test_onnx_conformance_layer_filter_opencv_classic_denylist.inl.hpp +++ b/modules/dnn/test/test_onnx_conformance_layer_filter_opencv_classic_denylist.inl.hpp @@ -600,4 +600,16 @@ "test_rotary_embedding_with_interleaved_rotary_dim", "test_rotary_embedding_with_interleaved_rotary_dim_expanded", "test_rotary_embedding_with_rotary_dim", -"test_rotary_embedding_with_rotary_dim_expanded", \ No newline at end of file +"test_rotary_embedding_with_rotary_dim_expanded", +"test_hammingwindow", +"test_hammingwindow_expanded", +"test_hammingwindow_symmetric", +"test_hammingwindow_symmetric_expanded", +"test_hannwindow", +"test_hannwindow_expanded", +"test_hannwindow_symmetric", +"test_hannwindow_symmetric_expanded", +"test_blackmanwindow", +"test_blackmanwindow_expanded", +"test_blackmanwindow_symmetric", +"test_blackmanwindow_symmetric_expanded", diff --git a/modules/dnn/test/test_onnx_conformance_layer_parser_denylist.inl.hpp b/modules/dnn/test/test_onnx_conformance_layer_parser_denylist.inl.hpp index 7fbf6f30fc..1f1c055773 100644 --- a/modules/dnn/test/test_onnx_conformance_layer_parser_denylist.inl.hpp +++ b/modules/dnn/test/test_onnx_conformance_layer_parser_denylist.inl.hpp @@ -160,10 +160,6 @@ "test_bernoulli_expanded", // ---- same as above --- "test_bernoulli_seed", // ---- same as above --- "test_bernoulli_seed_expanded", // ---- same as above --- -"test_blackmanwindow", -"test_blackmanwindow_expanded", -"test_blackmanwindow_symmetric", -"test_blackmanwindow_symmetric_expanded", "test_cast_FLOAT16_to_FLOAT4E2M1", "test_cast_FLOAT16_to_FLOAT8E4M3FN", "test_cast_FLOAT16_to_FLOAT8E4M3FNUZ", @@ -349,14 +345,6 @@ "test_gru_defaults", // ---- same as above --- "test_gru_seq_length", // ---- same as above --- "test_gru_with_initial_bias", // ---- same as above --- -"test_hammingwindow", -"test_hammingwindow_expanded", -"test_hammingwindow_symmetric", -"test_hammingwindow_symmetric_expanded", -"test_hannwindow", -"test_hannwindow_expanded", -"test_hannwindow_symmetric", -"test_hannwindow_symmetric_expanded", "test_identity_opt", // 23221 illegal hardware instruction "test_identity_sequence", // Issue:: Unkonwn error "test_if_opt", // Issue::Failed to allocate 17059022683624350 bytes in function 'OutOfMemoryError'