craft-text-detector
craft-text-detector copied to clipboard
0 size boxes
🐛 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:
- set text_threshold to 0
- get_prediction
- 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