From 70bf2e693cd5bd2291793969e35075d900352be0 Mon Sep 17 00:00:00 2001 From: JulioAPeraza Date: Wed, 19 Apr 2023 18:36:31 -0400 Subject: [PATCH] Fix bug in segmentation algorithm --- segmentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/segmentation.py b/segmentation.py index f8feebb..1981108 100644 --- a/segmentation.py +++ b/segmentation.py @@ -202,7 +202,7 @@ def _fit(self, gradient): map_arr[labels_arr == i] = gradient[labels_arr == i] gradient_maps.append(map_arr) - map_bounds.append(map_arr.max()) + map_bounds.append(gradient[labels_arr == i].max()) segments.append(gradient_maps) labels.append(labels_arr)