Git Product home page Git Product logo

sis's Introduction

Sis: simple image search engine

Overview

  • sis is a simple image-based image search engine using Keras + Flask.
  • Given a set of images, a 4096D fc6-feature is extracted for each image using a pre-trained VGG16 network (offline.py).
  • Given a query image via a Flask web-intereface, similar images are retrieved by the simple nearest neighbor search (server.py).
  • On an aws-ec2 instance with t2.large, the feature extraction takes 0.9 s per image. The search for 1000 images takes 10 ms.
  • Project page
  • Demo

Requirements

$ pip install numpy Pillow h5py tensorflow Keras Flask   # python3

How to run (on your local computer)

# Make sure numpy, Pillow, h5py, tensorflow, Keras, and Flask are installed
# Clone the code
$ git clone https://github.com/matsui528/sis.git
$ cd sis

# Put your image files (*.jpg) on static/img

$ python offline.py    # python3
# Then fc6 features are extracted and saved on static/feature

$ python server.py
# Now you can do search via localhost:5000

How to run (on AWS EC2)

# Launch an instance on AWS EC2, and open the port 5000.
# A middle-level CPU instance is fine, e.g., m4.large.
# Make sure you can ssh. Then log in the instance.

# Setup python stuff
$ wget https://repo.continuum.io/archive/Anaconda3-4.3.0-Linux-x86_64.sh
$ bash Anaconda3-4.3.0-Linux-x86_64.sh
$ source ~/.bashrc  # Activate anaconda
$ pip install tensorflow keras

# Clone the code
$ git clone https://github.com/matsui528/sis.git
$ cd sis

# Put your image files (*.jpg) on static/img

$ python offline.py
# Then fc6 features are extracted and saved on static/feature

$ python server.py
# Now you can do search via http://ec2-XX-XX-XXX-XXX.us-west-2.compute.amazonaws.com:5000

sis's People

Contributors

matsui528 avatar

Watchers

James Cloos 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.