Skip to content

Commit

Permalink
Merge pull request #18 from VikParuchuri/dev
Browse files Browse the repository at this point in the history
Fix font bug
  • Loading branch information
VikParuchuri authored Feb 12, 2024
2 parents 97f1432 + 0a0ad87 commit 7e53a6d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "surya-ocr"
version = "0.2.0"
version = "0.2.1"
description = "Document OCR models for multilingual text detection and recognition"
authors = ["Vik Paruchuri <[email protected]>"]
readme = "README.md"
Expand Down
Binary file modified static/images/benchmark_rec_chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/surya_rec_perf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions surya/postprocessing/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def draw_text_on_image(bboxes, texts, image_size=(1024, 1024), font_path=setting

# Download font if it doesn't exist
if not os.path.exists(font_path):
os.makedirs(os.path.dirname(font_path), exist_ok=True)
with requests.get(settings.RECOGNITION_FONT_DL_PATH, stream=True) as r, open(font_path, 'wb') as f:
r.raise_for_status()
for chunk in r.iter_content(chunk_size=8192):
Expand Down

0 comments on commit 7e53a6d

Please sign in to comment.