diff --git a/pyproject.toml b/pyproject.toml index f7ad1a1d..7f0041bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] readme = "README.md" diff --git a/static/images/benchmark_rec_chart.png b/static/images/benchmark_rec_chart.png index ae982397..a3b03ce2 100644 Binary files a/static/images/benchmark_rec_chart.png and b/static/images/benchmark_rec_chart.png differ diff --git a/static/images/surya_rec_perf.png b/static/images/surya_rec_perf.png new file mode 100644 index 00000000..79cb2f93 Binary files /dev/null and b/static/images/surya_rec_perf.png differ diff --git a/surya/postprocessing/text.py b/surya/postprocessing/text.py index aa5ee060..7c890c99 100644 --- a/surya/postprocessing/text.py +++ b/surya/postprocessing/text.py @@ -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):