Skip to content

Commit

Permalink
fix: image size in int not float needed for resize
Browse files Browse the repository at this point in the history
  • Loading branch information
danellecline committed May 16, 2024
1 parent c0da6b6 commit 18fc005
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdcat/cluster/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ def run_cluster_roi(roi_dir, save_dir, device, config_ini, alpha, cluster_select
# Add the image_width and image_height columns to the dataframe
for index, row in df.iterrows():
im_size = Image.open(row['image_path']).size
df.at[index, 'image_width'] = im_size[0]
df.at[index, 'image_height'] = im_size[1]
df.at[index, 'image_width'] = int(im_size[0])
df.at[index, 'image_height'] = int(im_size[1])

# Create a unique crop name for each detection with a unique id
crop_path = save_dir / 'crops'
Expand Down

0 comments on commit 18fc005

Please sign in to comment.