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

OpenCV visualization error #518

Closed
mkisantal opened this issue Mar 8, 2018 · 6 comments
Closed

OpenCV visualization error #518

mkisantal opened this issue Mar 8, 2018 · 6 comments

Comments

@mkisantal
Copy link

mkisantal commented Mar 8, 2018

I built Darknet with OpenCV without a problem, and even imtest works well:
./darknet imtest data/eagle.jpg opens up a number of windows without a problem.

However, when I try to run YOLO object detection, I run into the following error:

data/dog.jpg: Predicted in 0.215194 seconds.
dog: 82%
car: 27%
truck: 65%
bicycle: 85%
OpenCV(3.4.1-dev) Error: Assertion failed ((flags & FIXED_TYPE) != 0) in type, file /opt/opencv/modules/core/src/matrix_wrap.cpp, line 807
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(3.4.1-dev) /opt/opencv/modules/core/src/matrix_wrap.cpp:807: error: (-215) Assertion failed: (flags & FIXED_TYPE) != 0 in function type

Aborted (core dumped)

So the inference runs without any problem, but the program crashes when it tries to show the results... Any idea what might be causing the problems here?

@mkisantal
Copy link
Author

This line causes the error, by commenting it out I was able to show the detection results.

save_image(im, "predictions");

@TheMikeyR
Copy link

I can see you are using OpenCV 3.4.1, there is currently a bug in C API: opencv/opencv#10963
Use OpenCV 3.4.0 or lower.

@mkisantal
Copy link
Author

Thank you @TheMikeyR it solved my issue!

@maelvls
Copy link

maelvls commented Mar 14, 2018

Same issue in maelvls/homebrew-amc#4. Looks like cvSaveImage fails but I can't find out why ☹️ Is opencv/opencv#10963 responsible for this bug?

@molyswu
Copy link

molyswu commented Aug 7, 2019

Hi,mkisantal
How do you solved with this problem?

@maelvls
Copy link

maelvls commented Aug 7, 2019

I dropped the C headers and used the C++ bindings instead 👍
The C API is broken and isn’t maintained anymore

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

4 participants