Skip to content

Commit a555c5d

Browse files
committed
Fix font bug
1 parent e9c26ad commit a555c5d

File tree

3 files changed

+1
-0
lines changed

3 files changed

+1
-0
lines changed

static/images/benchmark_rec_chart.png

8.48 KB
Loading

static/images/surya_rec_perf.png

27 KB
Loading

surya/postprocessing/text.py

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def draw_text_on_image(bboxes, texts, image_size=(1024, 1024), font_path=setting
2727

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

0 commit comments

Comments
 (0)