OmniParser
OmniParser copied to clipboard
fix crash when no ocr bboxes
Currently, if no text elements are texted with the OCR, OmniParser will throw an exception because the ocr_bbox is None (and not interable). To fix, initialize to empty list and also ensure a valid filtered box element is added in remove_overlap_new
when ocr_bbox is falsy