diff options
author | Lia Lenckowski <lialenck@protonmail.com> | 2023-09-05 17:11:08 +0200 |
---|---|---|
committer | Lia Lenckowski <lialenck@protonmail.com> | 2023-09-05 17:11:08 +0200 |
commit | a115bc011e73cb69e6d42298c0ea68382d653da8 (patch) | |
tree | 612ef0ac3087f4ac15082f17967551f5750aef43 /test.py | |
download | embeddings-sort-a115bc011e73cb69e6d42298c0ea68382d653da8.tar embeddings-sort-a115bc011e73cb69e6d42298c0ea68382d653da8.tar.bz2 embeddings-sort-a115bc011e73cb69e6d42298c0ea68382d653da8.tar.zst |
initial commit: load images, impl hue/brightness embedder, impl MST algorithm on embeds
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -0,0 +1,11 @@ +from PIL import Image +from imgbeddings import imgbeddings +import sys + +b = imgbeddings() +for p in sys.argv[1:]: + f = open(p, "rb") + im = Image.open(f) + em = b.to_embeddings(im) + print(em) +print(f"embedded {len(sys.argv[1:])} images.") |