Skip to content

Commit

Permalink
Add scikit-learn-extra >= 0.3.0 to required packages
Browse files Browse the repository at this point in the history
  • Loading branch information
healthonrails committed Mar 12, 2024
1 parent 02ca309 commit f1e0bce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions annolid/utils/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import numpy as np
import uuid
from shapely.geometry import Polygon, Point
import torch
from sklearn_extra.cluster import KMedoids


Expand Down Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand Down

0 comments on commit f1e0bce

Please sign in to comment.