Skip to content

Commit a54d88f

Browse files
committed
chore: remove area for ROI since approximations are probably a bad idea
1 parent 977ef32 commit a54d88f

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

sdcat/cluster/commands.py

-7
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,6 @@ def run_cluster_roi(roi_dir, save_dir, device, config_ini, alpha, cluster_select
328328
# Add in a column for the unique crop name for each detection with a unique id
329329
df['cluster_id'] = -1 # -1 is the default value and means that the image is not in a cluster
330330

331-
# Remove small or large detections before clustering
332-
size_before = len(df)
333-
info(f'Searching through {size_before} detections')
334-
df = df[(df['area'] > min_area) & (df['area'] < max_area)]
335-
size_after = len(df)
336-
info(f'Removed {size_before - size_after} detections that were too large or too small')
337-
338331
# Replace any NaNs with 0
339332
df.fillna(0)
340333

0 commit comments

Comments
 (0)