From 1eeca9c72f3a56ed91597bef2e627e1d4788a87c Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Thu, 31 Oct 2024 14:08:06 +0800 Subject: [PATCH] image without any text will show a warning (#14132) --- paddleocr.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paddleocr.py b/paddleocr.py index bdf367cf1a..c814981fa5 100644 --- a/paddleocr.py +++ b/paddleocr.py @@ -975,6 +975,9 @@ def main(): if result is not None: lines = [] for res in result: + if res is None: + logger.warning(f"No text found in image {img_path}") + continue for line in res: logger.info(line) lines.append(pprint.pformat(line) + "\n")