Skip to content

Conversation

Acinonyx4
Copy link

The CRAFT text detection produced false positive detections under some condition (e.g. with text_threshold = 0.01, link_threshold = 0.01, low_text = 0.1 and my pictures).

While most of the predicted text boxes are correct, there are wrong predictions containing only zero values (screenshot showes print of 4 predicted boxes and there are 2 wrong boxes only with zeros as values).
Zero Boxes problem

That can lead to an error within the craft module depending on the OpenCV version.
I recognized the following error with opencv-python-4.5.4.60:
cv2.error: OpenCV(4.5.4) matrix.cpp:466: error: (-215:Assertion failed) _step >= minstep in function 'cv::Mat::Mat'

To fix that problem, I added a check to remove the zero boxes for further steps

@Acinonyx4 Acinonyx4 changed the title fix: remove null boxes after detection fix: remove zero boxes after detection Aug 18, 2023
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

Successfully merging this pull request may close these issues.

1 participant