GithubHelp home page GithubHelp logo

d1pankarmedhi / image-search-engine Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 125 KB

๐Ÿ”Ž A vector based image search engine using Visual Transformer model type.

Python 100.00%
clip embeddings huggingface-transformers pinecone search-engine vectorsearch

image-search-engine's Introduction

Image Search Engine

A vector based image search engine using Visual Transformer model type.

Python PyTorch AWS Huggingface


Embedding Model

Using the CLIP model ๐Ÿค— openai/clip-vit-base-patch32 to generate embedding vector for images, stored on a vector database, such as Pinecone to facilitate search capabilities.

image

  • Fig: Pipeline diagram

With 4 classes, including Airplane, Dog, Cat and Car, there are around 120 images (30 each) in total. These images are stored in an AWS S3 bucket. After generating embeddings for each image, these embeddings are stored on a Pinecone index with their respective S3 links as metadata.

The vector embedding of the input image is generated and the relevant top-k embeddings are fetched from the Pinecone database. Once the results are obtained, the corresponding images are fetched from the S3 bucket using the links stored as metadata.

image

  • Fig: Search engine demo

Getting started

  1. Clone repository
  2. Create virtual env and install dependencies
    python -m venv venv
    
    source venv/bin/activate # linux
    venv\Scripts\activate # windows
    
    pip install -r requirements.txt
  3. Modify the config.yaml file and add the necessary fields like S3 bucket name, pinecone index name, etc.
  4. Run the application using
    streamlit run app.py

image-search-engine's People

Contributors

d1pankarmedhi avatar

Stargazers

 avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.