Giter Club home page Giter Club logo

vision-api-product-search-demo's Introduction

Google Cloud Platform Vision API Product Search Demo

Open in Cloud Shell

Introduction

This repo shows an end-to-end example on how to use the Vision API Product Search.

This feature of Vision API is part of Google Cloud for retail. A retailer can upload their product catalog, which includes images of their products. Customers can then perform image searches on this catalog, and the solution will provide the user with a list of similar products with similarity scores.

Watch this video to see how IKEA uses this solution to enhance their customer experience, so that customers can use a mobile app to interactively construct their shopping list, simply by taking photos of products in the showroom!

In this example, we are using an Open Data Set from Best Buy. There has been some pre-processing to convert the original data set into a CSV format that is usable to Vision API. You can inspect this datain the data subdirectory.

This data set contains more than 50,000 items in Best Buy's catalogue. We will be loading the images referenced in this dataset into our machine learning model in order to demonstrate this solution's capabilities.

Architecture

Architecture

There are three main components to this solution:

Image downloader

Since Vision API Product Search requires images to be stored in a Google Cloud Storage bucket, this part of the solution consists of a Cloud Firestore collection that contains the product catalog. Each document in the collection will contain important information for each catalog item including its id, production description, as well as a URL to the product image.

Whenever a new document is added to the collection, a Cloud Function is triggered, which will download the product image from the URL listed in the document, and then upload this image into a Cloud Storage bucket. The URI of the image is also written back into the document in Firestore.

Bulk Import CSV

This will be a series of CSV files that contain a Product Set that needs to be uploaded into Vision API Product Search. The CSV file is broken into separate files because the bulk loading functionality currently only supports CSV files of up to 20,000 rows. These CSV files will also need to be uploaded into a Google Cloud Storage bucket.

Test Harness Application

This component is optional, but this is a nice to have for this demo so it becomes easy to demonstrate the capabilities through this application. This is a Python application hosted on App Engine Flex. Credit goes to the original author and the original GitHub repo is here.

Installation

You will need an active Google Cloud Platform billing account and permissions to add projects to this billing account. Other than this all other prerequisites are satisfied through Cloud Shell. You can deploy this solution by clicking on the "Open in Cloud Shell" button above and follow the instructions!

vision-api-product-search-demo's People

Contributors

dependabot[bot] avatar williamtsoi1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vision-api-product-search-demo's Issues

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.