From 9d424f80f8e0b8a606f915dd2ae3b465dc7dc8ee Mon Sep 17 00:00:00 2001 From: Marie Roald Date: Tue, 10 Sep 2024 06:42:18 +0000 Subject: [PATCH] Fix UnboundLocalError --- augraphy/augmentations/geometric.py | 1 + 1 file changed, 1 insertion(+) diff --git a/augraphy/augmentations/geometric.py b/augraphy/augmentations/geometric.py index cf1142f..7e5f211 100644 --- a/augraphy/augmentations/geometric.py +++ b/augraphy/augmentations/geometric.py @@ -187,6 +187,7 @@ def run_crop(self, image, mask, keypoints, bounding_boxes): # remove and limit bounding boxes to the cropped boundary if bounding_boxes is not None: # check each point, and remove them if it is outside the cropping area + remove_indices = [] for i, bounding_box in enumerate(bounding_boxes): xspoint, yspoint, xepoint, yepoint = bounding_box # start point is outside the croped area, but end point is inside