aboutsummaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorLia Lenckowski <lialenck@protonmail.com>2023-09-05 17:11:08 +0200
committerLia Lenckowski <lialenck@protonmail.com>2023-09-05 17:11:08 +0200
commita115bc011e73cb69e6d42298c0ea68382d653da8 (patch)
tree612ef0ac3087f4ac15082f17967551f5750aef43 /test.py
downloadembeddings-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.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test.py b/test.py
new file mode 100644
index 0000000..317eaf0
--- /dev/null
+++ b/test.py
@@ -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.")