Git Product home page Git Product logo

img-similarity-search's Introduction

Image Similarity Search

POC for similarity search by abstract features.

components.png

An image vectorizer (a convolutional neural network which was trained to classify genre/style of paintings) is used to extract different vector representations from approx 75'000 paintings. The image metadata and extracted vectors are indexed in elasticsearch.
Clients can search for similar paintings by letting elasticsearch compute vector similarity using either cosine similarity or l2 normalization.

Setup

  1. Download paintings-by-numbers from kaggle

  2. Create a volume with the downloaded paintings
    docker volume create -d local --opt device=~/art-classification/painter-by-numbers/train --opt o=bind --opt type=none paintings

  3. create a topic for the images:

    docker exec -it kafka /bin/bash
    kafka-topics --create --zookeeper zookeeper:2181 --replication-factor 1 --partitions 2 --topic paintings
    
  4. Create the Elastic Connector for the paintings topic

    curl -X POST -H "Content-Type: application/json" -d @paintings.connector.json localhost:8083/connectors
  5. Check the status with curl http://localhost:8083/connectors/elastic-paintings-connector/tasks/0/status

  6. Create the schema mapping for the Elasticsearch index with

    curl -X PUT "localhost:9200/paintings?pretty" -H 'Content-Type: application/json' -d @paintings.mapping.json
    
  7. Run the python script to process all images and submit image representations in kafka
    The sink connector will ensure that processed records are store din the previously created elasticsearch index

  8. Run the gallery-backend (mvn spring-boot:run)

  9. Run the gallery-frontend (nvm use && npm install && npm start)

  10. Open http://localhost:4200/ to see the result

References

img-similarity-search's People

Contributors

schocco avatar

Stargazers

cqasen 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.