-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Python binding for subclasses of TextDetectionModel crashes the program #19346
Copy link
Copy link
Closed
Milestone
Description
Running the following lines with a proper model and frame crashes:
detector = cv.dnn_TextDetectionModel_DB(model=model)
result = detector.detectTextRectangles(frame)
Changing the export type of TextDetectionModel from
opencv/modules/dnn/include/opencv2/dnn/dnn.hpp
Line 1409 in 49127b6
| class CV_EXPORTS_W TextDetectionModel : public Model |
to
class CV_EXPORTS_W_SIMPLE TextDetectionModel : public Model
and recompiling and reinstalling the Python bindings fixes the crash for me
and detector.detectTextRectangles(frame) returns the correct results.
System information (version)
-
OpenCV => 4.5.1
-
Operating System / Platform => macOS 10.15.7
-
Compiler => Apple clang version 12.0.0 (clang-1200.0.32.28)
-
Python 3.9.1
-
I report the issue, it's not a question
-
I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution -
I updated to latest OpenCV version and the issue is still there
Reactions are currently unavailable