mazzzystar / Queryable

Run OpenAI's CLIP and Apple's MobileCLIP model on iOS to search photos.
https://queryable.app
MIT License
2.66k stars 421 forks source link

[Feature Request] Export calculated embeddings from the app #32

Closed tddschn closed 9 months ago

tddschn commented 9 months ago

Thanks for making the app!

I'd like to get the CLIP embeddings for all my photos in iCloud, and it would be really convenient if the app supports exporting calculated embeddings and would save me a lot of time and compute, and it will allow users to explore their photos' semantics in alternative ways.

Would you consider adding this feature?

mazzzystar commented 9 months ago

Hi, the embeddings have already been calculated and saved in the embeddingData file. The code below shows the path and how to load it, and you could print it to see the absolute path. https://github.com/mazzzystar/Queryable/blob/1f769b3588f46cbbeb9bf93c0e47b1bbfe9b1c12/Queryable/Queryable/ViewModel/PhotoSearcher.swift#L96-L98

tddschn commented 9 months ago

Thank you for your reply! I'm not an iOS developer and I'm not sure if it's possible to access app's private data in document dir without doing an unencrypted backup with a Mac. I guess I'll try running embeddings models on my own.