Git Product home page Git Product logo

neon-image-search's Introduction

Neon Image Search

This is an image search app, built using NeonDB and Vertex AI. It uses Vertex AI to convert the data images into embeddings and then stores it into NeonDB. When a request is made the request image is converted into embeddings and then the similarity search is performed by NeonDB using PGVector.

preview

How it works?

It starts by first converting the data images stored in the public/flower_images folder into embeddings. Embeddings are high-dimensional vectors that represent the images in a format that computers can understand and process. This conversion is done using Google Cloud's Vertex AI. Once the images are converted into embeddings, these vectors are stored in NeonDB, it is a database that supports vector search using PGVector extension.

When a user uploads and image and performs similarity search using the app. The following process happens

  1. Conversion of request images into embeddings. Now again machine cannot understand the image, the image is processed and converting into vectors.
  2. Now once the images are converted into vectors, NeonDB performs a similarity search using its PGVector extension.
  3. The similarity search returns a list of images from the database that are most similar to the uploaded image. These results are ranked based on their similarity scores. (The similarity search is performed using cosine distance)
  4. The results are then sent back to the UI and are displayed.

Installation

Before we began with the installation make sure you're logged in, in the Google Cloud CLI.

  1. Clone the repo
git clone https://github.com/ItzCrazyKns/Neon-Image-Search.git
  1. Install dependencies
yarn

Or if you are using NPM

npm i
  1. Change the name of .example.env.local to .env.local and fill all the fields.

  2. Convert data images into embeddings. (The data images are stored in /public/flower_images)

yarn run generate-embeddings

Or if you are using NPM

npm run generate-embeddings
  1. Then finally started the app
yarn run dev

Or if you are using NPM

npm run dev

Note: You can build the project then also use it by following NextJS's guidelines.

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.