Pinterest: Any-to-Image Product Recommendations Cross Modal Retrieval
You can search a collection of images using text
, audio
or images
.
├── .github/workflows//
│ └── push_to_s3.yml
|
├── audio/
│ ├── (audio files)
│
├── docs/
│ └── app_info.md
│
├── images/
│ ├── (sample images)
│
├── data/
| └── fashion-cat.json
|
├── doc/
| └── APP_README.md
|
├── models/
│ ├── __init__.py
│ ├── data.py
│ ├── helper.py
│ ├── imagebind_model.py
│ ├── model_utils.py
│ ├── multimodal_preprocessors.py
│ └── transformer.py
│
├── Notebooks/
│ ├── gemini-description-dataset.ipynb
│ ├── imagebind-model-download.ipynb
│ ├── model-inference.ipynb
│ ├── pinecone-upsert-embeddings.ipynb
| └── synthetic-fashion-dataset-creation.ipynb
|
├──sample-workflow
| └──docker-image-build.yml
├── .env
├── .gitignore
├── Dockerfile
├── gradio_app.py
├── README.md
└── requirements.txt
- ImageBind Model
- Generative AI
- Vector Store: Pinecone
- Image Embeddings
- Any-to-Any Image Similarity Search
- Vision Transformers
For Image Descriptions data Visit here https://www.kaggle.com/datasets/samikshakolhe/pinterest-fashion-dataset
Note: Image Descriptions are created using gemini-pro-vision model.
For Image and Text Embeddding data created using ImageBind model Visit this website to download the embeddings pickle file https://www.kaggle.com/datasets/samikshakolhe/pinterest-fashion-imagebind-multimodal-embed-data
Note: This code is builted and tested on python==v3.8.19.
-
create a virtual env
conda create --name multimodal python=3.8.19 conda activate multimodal
There are two ways to
- Clone the github repository: follow below steps
git clone https://github.com/kolhesamiksha/Multimodal-Product-recommendation.git pip install -r requirements.txt python gradio_app.py -i <your-pinecone-index> -k <topk>
- Built the Dockerimage and publish it to docker-hub
docker build -t multimodal-image .
- Now After publishing to docker-hub, run the below command
docker run multimodal-image
Thank you for visiting the application, connect with me in linkedin
, I love writing blogs on ML/AI/GenAI visit blogs