Skip to content
Snippets Groups Projects
Commit 156ece6c authored by Solene Tarride's avatar Solene Tarride
Browse files

Convert filename to pathlib.Path

parent de6e5b91
No related branches found
No related tags found
1 merge request!76Add predicted objects to predict command
This commit is part of merge request !76. Comments created here will be created in the context of that merge request.
......@@ -2,6 +2,7 @@
import os
import pickle
from pathlib import Path
import cv2
import numpy as np
......@@ -100,6 +101,7 @@ class DAN:
extract_objects=False,
word_separators=["\n", " "],
line_separators=["\n"],
start_token=None,
):
"""
Run prediction on an input image.
......@@ -352,4 +354,4 @@ def run(
json_filename = f"{output}/{image.stem}.json"
logger.info(f"Saving JSON prediction in {json_filename}")
save_json(json_filename, result)
save_json(Path(json_filename), result)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment