Update square_crop.py
Browse files- square_crop.py +4 -4
square_crop.py
CHANGED
@@ -73,9 +73,9 @@ def run_square_crop(input_dir, coco_json_path, cropped_dir):
|
|
73 |
img_path = os.path.join(input_dir, id2fname[img_id])
|
74 |
|
75 |
for ann in anns:
|
76 |
-
try:
|
77 |
-
|
78 |
-
except
|
79 |
-
|
80 |
|
81 |
return os.listdir(cropped_dir)
|
|
|
73 |
img_path = os.path.join(input_dir, id2fname[img_id])
|
74 |
|
75 |
for ann in anns:
|
76 |
+
# try:
|
77 |
+
crop_annotation(img_path, ann, cropped_dir)
|
78 |
+
# except Exception as e:
|
79 |
+
# print(f"Error on {img_path}.")
|
80 |
|
81 |
return os.listdir(cropped_dir)
|