diff --git a/prepare_dataset.py b/prepare_dataset.py index d565d83..4fe0706 100644 --- a/prepare_dataset.py +++ b/prepare_dataset.py @@ -81,7 +81,7 @@ def main(annotations_path: Path, save_path: Path, no_split: bool, reduce: float) if (output_path / f'{ann_id}.png').exists(): continue - img_cropped = crop_minAreaRect(img, *info['bounding_box']) + img_cropped = crop_minAreaRect(img, *eval(info['bounding_box'])) cv2.imwrite(str(output_path / f'{ann_id}.png'), img_cropped) json.dump(words, (output_path / 'words.json').open('w'))