Former-commit-id: ac90ce9723
group-chat
Kye 1 year ago
parent 957f7397c5
commit dff447d61f

@ -922,10 +922,10 @@ class Segmenting:
return image return image
def segment_image_with_click(self, img, is_positive: bool): def segment_image_with_click(self, img, is_positive: bool)
self.sam_predictor.set_image(img) self.sam_predictor.set_image(img)
self.saved_points.append([evt.index[0], evt.index[1]]) # self.saved_points.append([evt.index[0], evt.index[1]])
self.saved_labels.append(1 if is_positive else 0) self.saved_labels.append(1 if is_positive else 0)
input_point = np.array(self.saved_points) input_point = np.array(self.saved_points)
input_label = np.array(self.saved_labels) input_label = np.array(self.saved_labels)

Loading…
Cancel
Save