SeguinBe / ReplicaFinder

DEPRECATED, LOOK AT dhlab-epfl/Replica
0 stars 0 forks source link

DEPRECATED

Go to the main Replica repo folder instead.

ReplicaFinder

This is a Flask web service that allows indexing of images in order to make them searchable.

Principles :

State of features in progress can be seen here

API

It is divided into two parts database which are operations to modify the database and search for the searching operations.

URL Method Description
<web-server-url>/database POST Add an image in the database with its metadata
<web-server-url>/database/url/<image-url> GET Get the stored metadata and status of an image in the database
<web-server-url>/database/url/<image-url> PUT Modify the metadata of an existing image in the database
<web-server-url>/database/url/<image-url> DELETE Delete an image from the database
<web-server-url>/search/urls POST Performs a search operation on the database
<web-server-url>/search/ids POST Performs a search operation on the database
<web-server-url>/search/img POST In progress Performs a search operation on the database

<web-server-url>/database

Body : json with fields :

Returns : json with fields :

<web-server-url>/database/url/<image-url>

Body : none

Returns : json describing the image

Body : json with only metadata field to be replaced

Body : none

<web-server-url>/database/id/<id>

See above

<web-server-url>/search/urls

Body : json with fields :

<web-server-url>/search/ids

Body : json with fields :

<web-server-url>/search/img

Body : json with fields :

Important : all the search requests might change in the future by returning a result_id that could be queried later to check the results. This if searches appear to take a long time and/or more ressources than expected.

Metadata structure

The metadata is a completely free JSON object stored. However, we recommend some guidelines :

author and title will be used for a text search on the metadata. date might be used later.

Any other field is possible as long as it is JSON valid, use explicit and self-sufficient naming though.

Examples

POST <web-server-url>/database

{
  "image_url": "http://www.wga.hu/art/l/leonardo/04/0monalis.jpg",
  "webpage_url": "http://www.wga.hu/frames-e.html?/html/l/leonardo/04/1monali.html",
  "metadata" : {
      "author": "LEONARDO da Vinci",
      "title": "Mona Lisa (La Gioconda)",
      "date": "1503-5",
      "WGA_id": 153647
  }
}

POST /search/urls

{
  "positive_image_urls": ["http://www.wga.hu/art/l/leonardo/04/0monalis.jpg"]
}