In our last post we talked a bit about the dataLayer API, and what sorts of semantic values can be extracted from realtime streams of text. Now we’ll spend some time to showing you what can of intelligence can be extracted using our imgLayer API.
imgLayer turns images into data so that they can manipulated and segmented as easily as text can. This allows users to search through the text that appears in photos, or perhaps separate photos that have objects in them from photos that have people in them.
Some of our VIP users are already beginning to go a little further, requesting that we train our algorithms to find specific objects in a set of photos like their logo, barcodes, or other objects they need to be able to detect in images.
Some potential usecases:
To get started with imgLayer, you don’t need an API key, just head over to wiki.metalayer.com and dive in!
Here’s a sample of what the JSON values returned from imgLayer will look like:
{
"status": "success",
"method": "bundle",
"service": "imglayer",
"response": {
"imglayer": {
"format": "JPEG",
"mode": "RGB",
"size": [891, 921],
"colors": [
[138949, [255, 255, 255]],
[2328, [254, 255, 255]],
[237, [252, 255, 255]],
[218, [255, 254, 255]],
...,
[160, [153, 129, 0]],
[862, [152, 129, 0]],
],
"histogram": [
20075,
4865,
13657,
124328,
...,
726,
4197,
7625,
307760
]
},
"objectdetection": {
"faces": [
{"sw": {"y": 682, "x": 390}, "ne": {"y": 732, "x": 440}},
{"sw": {"y": 736, "x": 576}, "ne": {"y": 786, "x": 626}},
{"sw": {"y": 755, "x": 342}, "ne": {"y": 805, "x": 392}},
{"sw": {"y": 64, "x": 268}, "ne": {"y": 114, "x": 318}}
]
},
"datalayer": {
"text": "In 1972, a crack commando unit was sent to prison by a military court for a crime they ...",
"locations": [
{
"latitude": 34.0535,
"confidence": 9.0,
"name": "Los Angeles, CA, US",
"longitude": -118.245
}
],
"sentiment": -0.59761430466719678,
"tags": [
"crack",
"commando",
"unit",
"prison",
"court",
"crime",
...,
"Team"
]
}
}
}
You’ll notice that imgLayer extracts any text that’s detected and passes it through dataLayer to get those values, in addition to color, histogram, size of the image submitted as well as the coordinates of any objects detected in the image.