From 615c0f8660ae3ac36bcd4499b45a0cf16323922e Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 4 Jun 2024 11:46:50 -0500 Subject: [PATCH] Update classes.py --- plantcv/annotate/classes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plantcv/annotate/classes.py b/plantcv/annotate/classes.py index 8a8f4d2..85838d3 100644 --- a/plantcv/annotate/classes.py +++ b/plantcv/annotate/classes.py @@ -216,8 +216,10 @@ def correct_mask(self, bin_img): print("filtering un-annotated object from the mask") labeled_mask[np.where(labeled_mask == i)] = 0 - #completed_mask = np.where(labeled_mask > 0, 255, 0) - completed_mask = np.copy(labeled_mask) + completed_mask_bin = np.where(labeled_mask > 0, 255, 0) + labeled_mask_all, _ = create_labels(mask=completed_mask_bin) + completed_mask = np.copy(labeled_mask_all) + pix_vals, counts = np.unique(completed_mask, return_counts=True) object_count = 0 # points in class used for recovering and labeling