You can download precomputed image caches (compressed 8.35GB, uncompressed 12.45GB): Yandex Cloud: https://storage.yandexcloud.net/ir24-precomputed-hashes/image_cache.zip (please do not DDOS this link, I pay for that from my own money)
For faster experiments with Kaggle/Colab, add the following code to download caches:
!wget https://storage.yandexcloud.net/ir24-precomputed-hashes/image_cache.zip
!unzip image_cache.zip
Once downloaded, unzip the archive and specify the correct path in your notebook, e.g.
cache = FileCache(Path("image_cache"))
Important
Each file is a numpy array of shape (H, W, 3)
and dtype=uint8
. Both width and height are preserved from original images.
The following example does the following:
RGB
formatImportant
Do not forget to change
load_image_from_url
function implementation to your own after the first run (after the first run all embeddings and image vectors would be cached on disk, so any further call would load them from disk and will not do heavy computations)