diff --git a/plantcv/annotate/classes.py b/plantcv/annotate/classes.py index ee400f0..8ddff30 100644 --- a/plantcv/annotate/classes.py +++ b/plantcv/annotate/classes.py @@ -244,15 +244,14 @@ def correct_mask(self, bin_img, bin_img_recover, coords): (x, y) = self.coords[names][id] unrec_points.append((x, y)) new_name = str(names) + "_unrecovered" - # Pull out unrecovered coords into new class + # Put unrecovered coords into new class self.coords[new_name] = unrec_points - # Overwrite class with only coords that have corresponding objects in the completed_mask + # Overwrite attribute, only coords that have corresponding objects in the completed_mask new_points = [] for i, (x, y) in enumerate(self.coords[names]): if i not in unrecovered_ids: new_points.append((x, y)) - - self.coords[names] = new_points + self.coords[names] = new_points completed_mask1 = 1*((completed_mask + 1*(completed_mask == 255)) != 0).astype(np.uint8)