Vertex AI Vision
Exemple d'une analyse d'une image PAR LABEL DETECTION :
Image source :
Requette :
{
"requests": [
{
"image": {
"source": {
"gcsImageUri": "gs://qwiklabs-gcp-02-148f0046b176-bucket/donuts.png"
}
},
"features": [
{
"type": "WEB_DETECTION",
"maxResults": 10
}
]
}
]
}
curl -s -X POST -H "Content-Type: application/json" --data-binary @request.json https://vision.googleapis.com/v1/images:annotate?key=${API_KEY}
Réponse :
{
"responses": [
{
"labelAnnotations": [
{
"mid": "/m/02wbm",
"description": "Food",
"score": 0.986098,
"topicality": 0.986098
},
{
"mid": "/m/01wydv",
"description": "Beignet",
"score": 0.9145899,
"topicality": 0.9145899
},
{
"mid": "/m/07xgrh",
"description": "Ingredient",
"score": 0.8922239,
"topicality": 0.8922239
},
{
"mid": "/m/01dk8s",
"description": "Powdered sugar",
"score": 0.855484,
"topicality": 0.855484
},
{
"mid": "/m/0p57p",
"description": "Recipe",
"score": 0.84780663,
"topicality": 0.84780663
},
{
"mid": "/m/01ykh",
"description": "Cuisine",
"score": 0.83784735,
"topicality": 0.83784735
},
{
"mid": "/m/06gd3r",
"description": "Angel wings",
"score": 0.8157256,
"topicality": 0.8157256
},
{
"mid": "/m/02q08p0",
"description": "Dish",
"score": 0.80321497,
"topicality": 0.80321497
},
{
"mid": "/m/052lwg6",
"description": "Baked goods",
"score": 0.79568243,
"topicality": 0.79568243
},
{
"mid": "/m/06x4c",
"description": "Sugar",
"score": 0.7846247,
"topicality": 0.7846247
}
]
}
]
}
Exemple d'une analyse d'une image PAR WEB DETECTION :
{
"responses": [
{
"webDetection": {
"webEntities": [
{
"entityId": "/m/01wydv",
"score": 0.72217673,
"description": "Beignet"
},
{
"entityId": "/m/01dk8s",
"score": 0.63628644,
"description": "Icing Sugar"
},
{
"entityId": "/m/02wvn_6",
"score": 0.49952897,
"description": "Ricciarelli"
},
{
"entityId": "/g/11fmgrs4qm",
"score": 0.385,
"description": "Vision AI"
},
{
"entityId": "/m/0jy4k",
"score": 0.3813,
"description": "Doughnut"
},
{
"entityId": "/t/24bjj59_jbj9f",
"score": 0.3775
},
{
"entityId": "/m/045c7b",
"score": 0.3775,
"description": "Google"
},
{
"entityId": "/m/0105pbj4",
"score": 0.3433,
"description": "Google Cloud Platform"
},
{
"entityId": "/m/0z5n",
"score": 0.3351,
"description": "API"
},
{
"entityId": "/m/02y_9m3",
"score": 0.3168,
"description": "Cloud computing"
}
],
"fullMatchingImages": [
{
"url": "https://cdn.qwiklabs.com/V4PmEUI7yXdKpytLNRqwV%2ByGHqym%2BfhdktVi8nj4pPs%3D"
},
{
"url": "https://miro.medium.com/v2/resize:fit:1400/1*JSX2yNORAAOxdGoU17c4_A.png"
}
],
"pagesWithMatchingImages": [
{
"url": "https://www.cloudskillsboost.google/focuses/1841?locale=it&parent=catalog",
"pageTitle": "Detect Labels, Faces, and Landmarks in Images with the Cloud ...",
"fullMatchingImages": [
{
"url": "https://cdn.qwiklabs.com/V4PmEUI7yXdKpytLNRqwV%2ByGHqym%2BfhdktVi8nj4pPs%3D"
}
]
},
{
"url": "https://www.cloudskillsboost.google/focuses/1841?locale=de&parent=catalog",
"pageTitle": "Detect Labels, Faces, and Landmarks in Images with the Cloud ...",
"fullMatchingImages": [
{
"url": "https://cdn.qwiklabs.com/V4PmEUI7yXdKpytLNRqwV%2ByGHqym%2BfhdktVi8nj4pPs%3D"
}
]
},
{
"url": "https://www.cloudskillsboost.google/focuses/1841?locale=fr_CA&parent=catalog",
"pageTitle": "Detect Labels, Faces, and Landmarks in Images with the Cloud ...",
"fullMatchingImages": [
{
"url": "https://cdn.qwiklabs.com/V4PmEUI7yXdKpytLNRqwV%2ByGHqym%2BfhdktVi8nj4pPs%3D"
}
]
},
{
"url": "https://www.cloudskillsboost.google/focuses/1841?locale=uk&parent=catalog",
"pageTitle": "Detect Labels, Faces, and Landmarks in Images with the Cloud ...",
"fullMatchingImages": [
{
"url": "https://cdn.qwiklabs.com/V4PmEUI7yXdKpytLNRqwV%2ByGHqym%2BfhdktVi8nj4pPs%3D"
}
]
},
{
"url": "https://www.cloudskillsboost.google/focuses/1841?locale=pt_PT&parent=catalog",
"pageTitle": "Detect Labels, Faces, and Landmarks in Images with the Cloud ...",
"fullMatchingImages": [
{
"url": "https://cdn.qwiklabs.com/V4PmEUI7yXdKpytLNRqwV%2ByGHqym%2BfhdktVi8nj4pPs%3D"
}
]
},
{
"url": "https://www.cloudskillsboost.google/focuses/1841?locale=zh_TW&parent=catalog",
"pageTitle": "Detect Labels, Faces, and Landmarks in Images with the Cloud ...",
"fullMatchingImages": [
{
"url": "https://cdn.qwiklabs.com/V4PmEUI7yXdKpytLNRqwV%2ByGHqym%2BfhdktVi8nj4pPs%3D"
}
]
},
{
"url": "https://www.cloudskillsboost.google/focuses/1841?parent=catalog",
"pageTitle": "Detect Labels, Faces, and Landmarks in Images with the Cloud ...",
"fullMatchingImages": [
{
"url": "https://cdn.qwiklabs.com/V4PmEUI7yXdKpytLNRqwV%2ByGHqym%2BfhdktVi8nj4pPs%3D"
}
]
},
{
"url": "https://github.com/ratokeshi/Cloud-Shell-GSP037-Detect-Labels-Faces-and-Landmarks-in-Images-with-the-Cloud-Vision-API/blob/master/tutorial.md",
"pageTitle": "GSP037 -- Tutorial: Detect Labels, Faces, and Landmarks in Images ...",
"fullMatchingImages": [
{
"url": "https://camo.githubusercontent.com/de4a92596dd95e3a6e3486783113543c0b0ad077242450b605fdc8d5b3a5a4b4/68747470733a2f2f63646e2e7177696b6c6162732e636f6d2f5634506d455549377958644b7079744c4e5271775625324279474871796d2532426668646b745669386e6a34705073253344"
}
]
},
{
"url": "https://github.com/CCH0124/qwiklab/blob/master/Machine%20Learning%20APIs/2020-09-03-cloud-vision-api.md",
"pageTitle": "2020-09-03-cloud-vision-api.md - GitHub",
"fullMatchingImages": [
{
"url": "https://developers.google.com/codelabs/cloud-vision-intro/img/b05d9534e547f5ee.jpeg"
}
]
},
{
"url": "https://www.cloudskillsboost.google/focuses/1841?locale=es&parent=catalog",
"pageTitle": "Detecte etiquetas, rostros y puntos de referencia en las imágenes ...",
"fullMatchingImages": [
{
"url": "https://cdn.qwiklabs.com/V4PmEUI7yXdKpytLNRqwV%2ByGHqym%2BfhdktVi8nj4pPs%3D"
}
]
}
],
"visuallySimilarImages": [
{
"url": "https://cdn.qwiklabs.com/S%2FkNFToGu3UCBBin8FTTTupTpksj6PBcKpa1ZyPqwNk%3D"
},
{
"url": "https://img-global.cpcdn.com/recipes/a66a9a6fc2696648/680x482cq70/mutzenmandeln-german-fritters-recipe-main-photo.jpg"
},
{
"url": "https://cdn.qwiklabs.com/vgWkDHchgJbOs4QsNHnrTHKs5%2Fo1rkQWFxMCLtHmrPo%3D"
},
{
"url": "https://lp-cms-production.imgix.net/features/2017/11/GettyImages-138513933-c96bcb32cf5f.jpg?auto=format&q=75&w=1920"
},
{
"url": "https://cdn.qwiklabs.com/w%2BfLMzkJxWN1WummHFhBLmkw5eFFSMFfQUiN6bwAwFA%3D"
},
{
"url": "https://img.cdn4dd.com/p/fit=cover,width=1200,height=1200,format=auto,quality=90/media/photosV2/9836e6c1-4775-4f05-bd5d-7aa9672a252f-retina-large.JPG"
},
{
"url": "https://images.sbs.com.au/dims4/default/f352d99/2147483647/strip/true/crop/1200x675+0+113/resize/1280x720!/quality/90/?url=http%3A%2F%2Fsbs-au-brightspot.s3.amazonaws.com%2Fdrupal%2Ffood%2Fpublic%2Fgettyimages-638180210.jpg"
},
{
"url": "https://www.catburglardoughco.co.uk/cdn/shop/files/C68A5692-5039-4486-BEA4-B64A758B558F.jpg?v=1699803372&width=533"
},
{
"url": "https://lh3.googleusercontent.com/eaLMslkaROuaXqJvLGIg-2QdrK-K9bUfSRA_flRP0UjnYKY_ItzzFNdsEf4Ia3ssRk0ieq2cBIPzNXLSqAnr1yT-mirlt7prvbJ8Jo2P=w1200-h630-p-rj-l75"
},
{
"url": "https://lookaside.instagram.com/seo/google_widget/crawler/?media_id=3233064463578091407"
}
],
"bestGuessLabels": [
{
"label": "powdered sugar"
}
]
}
}
]
}
