Skip to content

Commit

Permalink
[datasets] Fix loading targets in WILDRECEIPT init (mindee#1859)
Browse files Browse the repository at this point in the history
  • Loading branch information
Razlaw authored Jan 30, 2025
1 parent bdb2c28 commit 1c9ce92
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doctr/datasets/wildreceipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ def __init__(
# Split the text file into separate JSON strings
json_strings = data.strip().split("\n")
box: list[float] | np.ndarray
_targets = []

for json_string in tqdm(
iterable=json_strings, desc="Preparing and Loading WILDRECEIPT", total=len(json_strings)
):
_targets = []
json_data = json.loads(json_string)
img_path = json_data["file_name"]
annotations = json_data["annotations"]
Expand Down
2 changes: 1 addition & 1 deletion tests/pytorch/test_datasets_pt.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def test_ic03(input_size, num_samples, rotate, recognition, detection, mock_ic03
"input_size, num_samples, recognition, detection",
[
[[512, 512], 2, False, False], # Actual set has 1268 training samples and 472 test samples
[[32, 128], 5, True, False], # recognition
[[32, 128], 3, True, False], # recognition
[[512, 512], 2, False, True], # detection
],
)
Expand Down
2 changes: 1 addition & 1 deletion tests/tensorflow/test_datasets_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def test_ic03(input_size, num_samples, rotate, recognition, detection, mock_ic03
"input_size, num_samples, recognition, detection",
[
[[512, 512], 2, False, False], # Actual set has 1268 training samples and 472 test samples
[[32, 128], 5, True, False], # recognition
[[32, 128], 3, True, False], # recognition
[[512, 512], 2, False, True], # detection
],
)
Expand Down

0 comments on commit 1c9ce92

Please sign in to comment.