Skip to main content

Search: Image Similarity API

Search: Image Similarity API
·
Contributors (1)
CH
Published
Jan 04, 2019

Goal:

This task will find the k-closest matches in the Met collection to the provided image. Users can provide either the image file or a URL to the API & the number of neighbors they would like to have returned.

API Spec: Upload image file

Request URI

POST {Endpoint}/FindSimilarImages/Url

Content Header

Name

Type

Description

Content-type

String: ‘application/json’

json data will be sent

Neighbors

Int

Number of neighbors

Example Request Body

{

"urlInput":"https://airotationstore.blob.core.windows.net/met-artworks/artwork_images/LowResolutionImages512x512_2/459033.jpg"

}

Sample Response:

{

"images": [

{

"id": "459033",

"url": "https://airotationstore.blob.core.windows.net/met-artworks/artwork_images/LowResolutionImages512x512_2/459033.jpg"

}

]

}

API Spec: Image URL

Request URI

POST {Endpoint}/FindSimilarImages/

Name

Type

Description

Content-type

String: ‘application/json’

json data will be sent

Neighbors

Int

Number of neighbors

Request Body

Name

Type

Description

Image

  • object

Sample Response:

{

"images": [

{

"id": "459033",

"url": "https://airotationstore.blob.core.windows.net/met-artworks/artwork_images/LowResolutionImages512x512_2/459033.jpg"

}

]

}

Description of the Implementation

  • Featurize the images in the MetCollection with ResNet50 in Keras

  • Train a KNN classifier on the featurized images

  • Create a Flask App, Dockerize and deploy as a web app on Azure

Final product

Image search, by category or image

Comments
0
comment

No comments here