Giter Site home page Giter Site logo

imag-s's Introduction

IMAG-S: Image Matching with Approximate Graph Search

This is an implementation of the Approximate Query matching paper 'Approximate Query Matching for Graph-Based Holistic Image Retrieval '. (arXiv link here).

The IMAG-S application allows one to perform fast approximate image retrieval ussing approximate graph search on scene graphs. We do not cover cache and database setup here. Instead, this repository only discusses setup and execution options for the IMAG-S platform. We assume Step 0 is completed.

Step 0 refers to following the instructions in the neo-csv-gen repository's Code Steps.md file. The repository is located here

Requirements

We cover package, file, database, and software requirements to set up and run the program.

Package Requirements

All packages can be found in requirements.txt. A virtual environment is highly recommended. For the NLTK package, you eed to download the NLTK wordnet corpus.

NLTK Wordnet Corpus

Start python in the virtual environment with the NLTK package installed.

$ import nltk
$ nltk.download('wordnet')

File Requirements

The top level directory requires a databases folder with the following files generated from Step 0.

  • full_aggregate_image_ids.vgm - This is an inverted index of aggregate triplet ids mapped to image ids and objects within the image
  • image_urls.json - This is a mapping of image ids to their URLs from the Visual Genome dataset
  • wn_embeddings.vgm

Database Requirements

The databases folder also requires the following non-text files:

  • aggregate.db
  • objects.db
  • relations.db
  • GoogleNews-vectors-negative300.bin

Software Requirements

A Neo4J server must be running with the aggregate graph databases already imported <-- TODO ADD DETAILS -->

Links

All files for the databases folder can be found here.

You still need to download the Google news vectors, though. You can find that here

Execution

We will describe both example and UI.

Example

tester.py performs a sample run of the Image Retriever. You may replace the query in the file with queries of your own from the queries folder. The file can also be modified to keep running queries. The first query of a session always takes the longest as the backend must setup a cache for graph search.

The setup takes ~100s.

Execute tester.py using:

$ python tester.py

When it prompts, provide a query file name from the queries folder. You just need the base name, without the extension:

$ Query file:  query8

UI

imag-s's People

Contributors

asuprem avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar paper2code - bot 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.