Get Embeddings With Images
Get embeddings for a list of images.
curl --request POST \
--url https://api.bluesight.ai/embeddings/img \
--header 'Content-Type: application/json' \
--data '{
"images": [
{
"gsd": 0.6,
"bands": [
"red",
"green",
"blue"
],
"pixels": "<string>",
"platform": "sentinel-2-l2a",
"wavelengths": [
0.665,
0.56,
0.493
],
"point": [
37.77625,
-122.43267
],
"timestamp": 1714423534
}
],
"model": "clay"
}'
{
"embeddings": [
[
228,
322.1
],
[
234,
231.5
]
]
}
Body
gsd's of each band in images list (should be the same across all bands)
0.6
Order of bands in pixels array. Used to retrieve means, stds and wavelengths. Pick from 'blue', 'green', 'red', 'rededge1', 'rededge2', 'rededge3', 'nir', 'nir08', 'swir16', 'swir22'.
["red", "green", "blue"]
Base64 encoded image data
One of ['sentinel-2-l2a', 'landsat-c2l1', 'landsat-c2l2-sr', 'naip', 'linz', 'sentinel-1-rtc']. Used to retrieve means, stds and wavelengths across bands. If not provided, means and stds will be calculated from list of images, and default wavelengths will be used
"sentinel-2-l2a"
Bands' wavelengths. Should be provided only if platform
is None
, because when platform
is provided wavelengths will be loaded from config. If platform
is None
and wavelengths are not provided, default values from sentinel-2-l2a
will be used: {'blue': 0.493, 'green': 0.56, 'red': 0.665, 'rededge1': 0.704, 'rededge2': 0.74, 'rededge3': 0.783, 'nir': 0.842, 'nir08': 0.865, 'swir16': 1.61, 'swir22': 2.19}
[0.665, 0.56, 0.493]
(lat, lon) coordinate of the center of an image. Doesn't have a huge impact on model output.
[37.77625, -122.43267]
Timestamp when image was taken. Doesn't have a huge impact on model output.
1714423534
Model to use for embeddings generation
clay
, clip
Response
Embedding representing an area
[[228, 322.1], [234, 231.5]]
curl --request POST \
--url https://api.bluesight.ai/embeddings/img \
--header 'Content-Type: application/json' \
--data '{
"images": [
{
"gsd": 0.6,
"bands": [
"red",
"green",
"blue"
],
"pixels": "<string>",
"platform": "sentinel-2-l2a",
"wavelengths": [
0.665,
0.56,
0.493
],
"point": [
37.77625,
-122.43267
],
"timestamp": 1714423534
}
],
"model": "clay"
}'
{
"embeddings": [
[
228,
322.1
],
[
234,
231.5
]
]
}