From f1e0bce0326563f2aa5fa1ec147a3a63720eadb8 Mon Sep 17 00:00:00 2001 From: healthonrails Date: Tue, 12 Mar 2024 17:12:57 -0400 Subject: [PATCH] Add scikit-learn-extra >= 0.3.0 to required packages --- annolid/utils/shapes.py | 5 ----- setup.py | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/annolid/utils/shapes.py b/annolid/utils/shapes.py index fddeada..8564438 100644 --- a/annolid/utils/shapes.py +++ b/annolid/utils/shapes.py @@ -2,7 +2,6 @@ import numpy as np import uuid from shapely.geometry import Polygon, Point -import torch from sklearn_extra.cluster import KMedoids @@ -86,10 +85,6 @@ def extract_flow_points_in_mask(mask, flow, num_points=8): numpy.ndarray: An array of (x, y) pairs representing the representative points extracted from the flow field. """ - try: - from sklearn_extra.cluster import KMedoids - except: - print("Please install: pip install scikit-learn-extra >= 0.3.0") # Get valid indices from the binary mask valid_indices = np.argwhere(mask != 0) diff --git a/setup.py b/setup.py index f902ab6..a0a3243 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,7 @@ # 'PyQt5 == 5.15.7', 'Pillow>=9.3.0,<=9.5.0', "chardet>=5.2.0", + "scikit-learn-extra >= 0.3.0", # "segment-anything @ git+https://github.com/facebookresearch/segment-anything.git", "segment-anything @ git+https://github.com/SysCV/sam-hq.git", ],