Skip to content

Commit

Permalink
updaet example
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed Feb 14, 2025
1 parent 6336c11 commit 87724cb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions clustimage/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@
# # plt.colorbar(label='Cluster ID')
# # plt.show()

#%%
from clustimage import Clustimage
import os

# Working directory
dir_path = r'd://temp/magweg'
allowed_ext = ["jpg","jpeg","png","tiff","bmp","gif","webp","psd","raw","cr2","nef","heic","sr2","tif","mov","mp4"]

# Initialize for datetime.
cl = Clustimage(method='pca', ext=allowed_ext, use_thumbnail_cache=True)
results = cl.fit_transform(dir_path, recursive=True)

# -------------------------------------------------------------------------------------------
# Show the cluster labels
print(cl.results['labels'])

#%% Workflow to clean your [personal] photo files
# Suppose you have photos downloaded from whatsapp, your iphone and combined with the screenshots and selfies you have.
Expand Down

0 comments on commit 87724cb

Please sign in to comment.