craft-text-detector icon indicating copy to clipboard operation
craft-text-detector copied to clipboard

0 size boxes

Open MatteoLucarelli opened this issue 2 years ago • 3 comments

🐛 Bug

some prediction_result["boxes"] can have 0 size this raises an opencv exception when try to crop images by export_detected_regions

To Reproduce

Steps to reproduce the behavior:

  1. set text_threshold to 0
  2. get_prediction
  3. export_detected_regions

Expected behavior

boxes with 0 sizes should be removed by get_prediction

Environment

  • craft-text-detector version : 0.4.2
  • Python version (e.g., 3.6/3.7): 3.8.10
  • OS (e.g., Linux/Windows/MacOS): Ubuntu Linux 20.04.4 LTS
  • How you installed craft-text-detector (conda, pip, source): pip

MatteoLucarelli avatar May 12 '22 08:05 MatteoLucarelli