This CLI tool allows you to index images from a specified folder and search for similar images based on a text query using CLIP (Contrastive Language-Image Pretraining), PyTorch and NumPy. It generates image vectors and allows you to perform semantic searches efficiently.
To search for images by text query, you must first index the folder containing the images using this tool.
To index images from a folder images, run:
(venv) ➜ vector-embeddings python main.py index -f imagesThis command will process the images in the images folder, generate their vector embeddings using the CLIP model, and save them to vectors.npz in the same folder.
To search for similar images based on a text query, run:
(venv) ➜ vector-embeddings python main.py search "Your text query" -f imagesReplace "Your text query" with the description of the image you are looking for. The tool will load the vectors from vectors.npz and return the most similar images.