Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown when using DNN at Ubuntu OS #1723

Open
vsolominov opened this issue Nov 21, 2024 · 0 comments
Open

Exception thrown when using DNN at Ubuntu OS #1723

vsolominov opened this issue Nov 21, 2024 · 0 comments

Comments

@vsolominov
Copy link

vsolominov commented Nov 21, 2024

Summary of your issue

When using super resolution I get the error _FX_WINO_IBLOCK == 3 && _FX_WINO_KBLOCK == 4. The LapSRN_x2 model is used for super resolution.

There is no error on HOST = Windows 10.

Environment

image

What did you do when you faced the problem?

I tried using other versions of OpenCvSharp (4.9, 4.8, 4.7) and corresponding contrib versions.

Tried to find a solution to the problem on the web. One of the possible solutions was found at https://forum.opencv.org/t/exception-thrown-when-running-a-sample-using-dnn/12818. One of the answers recommends disabling winograd optimization with dnn.enableWinograd(false). However, I did not find such a method in OpenCvSharp.

Example code:

using var superResolution = new DnnSuperResImpl();
superResolution.ReadModel("LapSRN-x2.pb");
superResolution.SetModel("lapsrn", scale = 2);

var output = new Mat();
try
{
    superResolution.Upsample(input, output);
    return output;
}
catch
{
    output.Dispose();
    throw;
}

Output:

OpeCvSharp.OpenCVException: _FX_WINO_IBLOCK == 3 && _FX_WINO_KBLOCK == 4

What did you intend to be?

  1. The super-resolution operation is performed without error.
  2. The OpenCvSharp library provides the dnn.enableWinograd(false) method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant