添加ocr识别结果为空的判断
This commit is contained in:
@@ -115,6 +115,8 @@ def get_ocr_layout(img_path):
|
||||
layout = []
|
||||
ocr_result = OCR.ocr(img_path)
|
||||
ocr_result = ocr_result[0]
|
||||
if not ocr_result:
|
||||
return layout
|
||||
for segment in ocr_result:
|
||||
box = segment[0]
|
||||
box = _get_box(box)
|
||||
|
||||
Reference in New Issue
Block a user