POST extract_label_metadata¶
Given a list of images or of image URLs, extract the associated label metadata.
Resource URL¶
https://wineengine.tineye.com/<company>/rest/extract_label_metadata/
Notes¶
The metadata returned for each image will include label, vintage and variety location information if available so that you can highlight them in your images. The metadata will also include the vintage year and the variety type if found.
The locations returned by WineEngine will always refer to the input image and are provided as bounding boxes. These bounding boxes will be described using four percentage values (left, right, top, bottom) computed relative to image’s dimensions.
Please note that if your image has solid color borders, those might be cropped out by WineEngine. In that case the locations returned will only refer to the cropped version of the image.
Parameters¶
In addition to the Common parameters there are:
Request example¶
Response example¶
JSON¶
{
"error": [],
"status": "ok",
"method": "extract_label_metadata",
"result": [
{
"filepath": "image1.jpg",
"metadata": {
"vintage_year": 2014,
"vintage_rect": {
"left": 40.83,
"right": 57.5,
"top": 79.23,
"bottom": 84.66
},
"variety_type": "Cabernet Sauvignon",
"variety_rect": {
"left": 28.04,
"right": 85.22,
"top": 56.83,
"bottom": 62.57
},
"label_rect": {
"left": 4.2,
"right": 96.0,
"top": 8.3,
"bottom": 82.01
}
}
},
{
"filepath": "image2.jpg",
"metadata": {
"vintage_year": 2017,
"vintage_rect": {
"left": 51.55,
"right": 64.23,
"top": 69.18,
"bottom": 74.6
},
"variety_type": "Nebbiolo",
"variety_rect": {
"left": 32.65,
"right": 74.68,
"top": 23.06,
"bottom": 31.58
},
"label_rect": {
"left": 12.6,
"right": 72.52,
"top": 2.5,
"bottom": 98.23
}
}
}
]
}
XML¶
<?xml version="1.0" encoding="utf-8"?>
<data>
<error/>
<status>ok</status>
<method>extract_label_metadata</method>
<result>
<item>
<filepath>image1.jpg</filepath>
<metadata>
<vintage_year>2014</vintage_year>
<vintage_rect>
<left>40.83</left>
<right>57.5</right>
<top>79.23</top>
<bottom>84.66</bottom>
</vintage_rect>
<variety_type>Cabernet Sauvignon</variety-type>
<variety-rect>
<left>28.04</left>
<right>85.22</right>
<top>56.83</top>
<bottom>62.57</bottom>
</variety-rect>
<label_rect>
<left>4.2</left>
<right>96.0</right>
<top>8.3</top>
<bottom>82.01</bottom>
</label_rect>
</metadata>
</item>
<item>
<filepath>image2.jpg</filepath>
<metadata>
<vintage_year>2017</vintage_year>
<vintage_rect>
<left>51.55</left>
<right>64.23</right>
<top>69.18</top>
<bottom>74.6</bottom>
</vintage_rect>
<variety_type>Nebbiolo</variety-type>
<variety-rect>
<left>32.65</left>
<right>74.68</right>
<top>23.06</top>
<bottom>31.58</bottom>
</variety-rect>
<label_rect>
<left>12.6</left>
<right>72.52</right>
<top>2.5</top>
<bottom>98.23</bottom>
</label_rect>
</metadata>
</item>
</result>
</data>