image without any text will show a warning (#14132)

This commit is contained in:
Wang Xin 2024-10-31 14:08:06 +08:00 committed by GitHub
parent 4772fad2b5
commit 1eeca9c72f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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")