user on Nostr: i created semantic similarity image search from all the images i have posted (133) ...
i created semantic similarity image search from all the images i have posted (133)
https://pomf2.lain.la/f/v8lzwwc3.7z
this simply compares search term to the contents of image using vector database. it does not do any text matching to text in nostr notes or link urls
this method of image search seems quite well scalable, as you can see the 7z file size is very small for 133 images. size of the image data used is 122 MiB
here are some examples:
```bash
$ python3 img_search.py search "girl in skirt"
data/5194df7245b55b2ed93a485850e715a9851349770f88b10472a9eae31f8b322e.png (Score: 0.1248)
data/534e68856ae9ea450ac4150c9772506898cb2eab70e8a9e2355335016ec87d15.png (Score: 0.1098)
data/9475191500a9711e0627f6bb0b87b3eba57d997a66e86aae03590e4adb5c197a.png (Score: 0.0929)
data/d5c066148aa268f024536b3946f998102bfe3d9188aea55bf6adf6abdb161546.png (Score: 0.0844)
data/4a4dc1b23981d7f231e8b2d98bf88e49a19bb7d4d014a761e67f354b2411f2f9.png (Score: 0.0718)
$ python3 img_search.py search "naked girl"
data/db1f1eefa2affa462f212101183d81c1caa7c5c799e13f8c779fed11a2affa20.png (Score: 0.1385)
data/5422932f9d53a0b91848aa3e43d014d8c1c6045339fc5865d798dcd0fac14f65.png (Score: 0.1078)
data/3c71631a577fc987016488f0e239e4243ab9070b0881a44f0190c6a37c80c247.png (Score: 0.0959)
data/832c775ffe808ae31166ad2199165a9f21be294c41ec8c59e96018412089f0dd.png (Score: 0.0946)
data/e537152a1f405e06f1bf3db884774276859d59d892be2f58739c9125c7f902b9.png (Score: 0.0881)
$ python3 img_search.py search "large frog"
data/dfa18f9435c50aeeef866700c9b0970cbbc69872b9c5c2077ebc3f6493df3a04.png (Score: 0.1061)
data/1f9046a81b6baca60753bc32b3eab2aac7b7c505db4d6e92afe4a641387d8202.png (Score: 0.0849)
data/d19c4f26a9994359ab1fb8ca6b36e096213893746c5b1a42466158b0d91b9129.png (Score: 0.0636)
data/5194df7245b55b2ed93a485850e715a9851349770f88b10472a9eae31f8b322e.png (Score: 0.0616)
data/db1f1eefa2affa462f212101183d81c1caa7c5c799e13f8c779fed11a2affa20.png (Score: 0.0392
```
here is the images data used. its not required for using the search
https://pomf2.lain.la/f/ju4h1urg.7z
https://pomf2.lain.la/f/v8lzwwc3.7z
this simply compares search term to the contents of image using vector database. it does not do any text matching to text in nostr notes or link urls
this method of image search seems quite well scalable, as you can see the 7z file size is very small for 133 images. size of the image data used is 122 MiB
here are some examples:
```bash
$ python3 img_search.py search "girl in skirt"
data/5194df7245b55b2ed93a485850e715a9851349770f88b10472a9eae31f8b322e.png (Score: 0.1248)
data/534e68856ae9ea450ac4150c9772506898cb2eab70e8a9e2355335016ec87d15.png (Score: 0.1098)
data/9475191500a9711e0627f6bb0b87b3eba57d997a66e86aae03590e4adb5c197a.png (Score: 0.0929)
data/d5c066148aa268f024536b3946f998102bfe3d9188aea55bf6adf6abdb161546.png (Score: 0.0844)
data/4a4dc1b23981d7f231e8b2d98bf88e49a19bb7d4d014a761e67f354b2411f2f9.png (Score: 0.0718)
$ python3 img_search.py search "naked girl"
data/db1f1eefa2affa462f212101183d81c1caa7c5c799e13f8c779fed11a2affa20.png (Score: 0.1385)
data/5422932f9d53a0b91848aa3e43d014d8c1c6045339fc5865d798dcd0fac14f65.png (Score: 0.1078)
data/3c71631a577fc987016488f0e239e4243ab9070b0881a44f0190c6a37c80c247.png (Score: 0.0959)
data/832c775ffe808ae31166ad2199165a9f21be294c41ec8c59e96018412089f0dd.png (Score: 0.0946)
data/e537152a1f405e06f1bf3db884774276859d59d892be2f58739c9125c7f902b9.png (Score: 0.0881)
$ python3 img_search.py search "large frog"
data/dfa18f9435c50aeeef866700c9b0970cbbc69872b9c5c2077ebc3f6493df3a04.png (Score: 0.1061)
data/1f9046a81b6baca60753bc32b3eab2aac7b7c505db4d6e92afe4a641387d8202.png (Score: 0.0849)
data/d19c4f26a9994359ab1fb8ca6b36e096213893746c5b1a42466158b0d91b9129.png (Score: 0.0636)
data/5194df7245b55b2ed93a485850e715a9851349770f88b10472a9eae31f8b322e.png (Score: 0.0616)
data/db1f1eefa2affa462f212101183d81c1caa7c5c799e13f8c779fed11a2affa20.png (Score: 0.0392
```
here is the images data used. its not required for using the search
https://pomf2.lain.la/f/ju4h1urg.7z