Skip to content

Commit

Permalink
image without any text will show a warning (PaddlePaddle#14132)
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatV authored Oct 31, 2024
1 parent 4772fad commit 1eeca9c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions paddleocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 1eeca9c

Please sign in to comment.