Skip to content

Commit b4dca7a

Browse files
committed
update schema
1 parent 39ff5f1 commit b4dca7a

File tree

1 file changed

+37
-49
lines changed

1 file changed

+37
-49
lines changed

articles/ai-services/computer-vision/how-to/shelf-analyze.md

Lines changed: 37 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Analyze a shelf image using pretrained models
33
titleSuffix: Azure AI services
4-
description: Use the Product Understanding API to analyze a shelf image and receive rich product data.
4+
description: Use the Product Recognition API to analyze a shelf image and receive rich product data.
55
author: PatrickFarley
66
manager: nitinme
77
ms.service: azure-ai-vision
@@ -13,7 +13,7 @@ ms.custom: references_regions, build-2023, build-2023-dataai
1313

1414
# Shelf Product Recognition (preview): Analyze shelf images using pretrained model
1515

16-
The fastest way to start using Product Recognition is to use the built-in pretrained AI models. With the Product Understanding API, you can upload a shelf image and get the locations of products and gaps.
16+
The fastest way to start using Product Recognition is to use the built-in pretrained AI models. With the Product Recognition API, you can upload a shelf image and get the locations of products and gaps.
1717

1818
:::image type="content" source="../media/shelf/shelf-analysis-pretrained.png" alt-text="Photo of a retail shelf with products and gaps highlighted with rectangles.":::
1919

@@ -51,62 +51,50 @@ To analyze a shelf image, do the following steps:
5151

5252
## Examine the response
5353

54-
A successful response is returned in JSON. The product understanding API results are returned in a `ProductUnderstandingResultApiModel` JSON field:
54+
A successful response is returned in JSON. The product recognition API results are returned in a `ProductRecognitionResultApiModel` JSON field:
5555

5656
```json
57-
{
58-
"imageMetadata": {
59-
"width": 2000,
60-
"height": 1500
61-
},
62-
"products": [
63-
{
64-
"id": "string",
65-
"boundingBox": {
66-
"x": 1234,
67-
"y": 1234,
68-
"w": 12,
69-
"h": 12
70-
},
71-
"classifications": [
72-
{
73-
"confidence": 0.9,
74-
"label": "string"
75-
}
76-
]
77-
}
57+
"ProductRecognitionResultApiModel": {
58+
"description": "Results from the product understanding operation.",
59+
"required": [
60+
"gaps",
61+
"imageMetadata",
62+
"products"
7863
],
79-
"gaps": [
80-
{
81-
"id": "string",
82-
"boundingBox": {
83-
"x": 1234,
84-
"y": 1234,
85-
"w": 123,
86-
"h": 123
87-
},
88-
"classifications": [
89-
{
90-
"confidence": 0.8,
91-
"label": "string"
92-
}
93-
]
64+
"type": "object",
65+
"properties": {
66+
"imageMetadata": {
67+
"$ref": "#/definitions/ImageMetadataApiModel"
68+
},
69+
"products": {
70+
"description": "Products detected in the image.",
71+
"type": "array",
72+
"items": {
73+
"$ref": "#/definitions/DetectedObject"
74+
}
75+
},
76+
"gaps": {
77+
"description": "Gaps detected in the image.",
78+
"type": "array",
79+
"items": {
80+
"$ref": "#/definitions/DetectedObject"
81+
}
9482
}
95-
]
83+
}
9684
}
9785
```
9886

9987
See the following sections for definitions of each JSON field.
10088

101-
### Product Understanding Result API model
89+
### Product Recognition Result API model
10290

103-
Results from the product understanding operation.
91+
Results from the product recognition operation.
10492

10593
| Name | Type | Description | Required |
10694
| ---- | ---- | ----------- | -------- |
10795
| `imageMetadata` | [ImageMetadataApiModel](#image-metadata-api-model) | The image metadata information such as height, width and format. | Yes |
108-
| `products` |[DetectedObjectApiModel](#detected-object-api-model) | Products detected in the image. | Yes |
109-
| `gaps` | [DetectedObjectApiModel](#detected-object-api-model) | Gaps detected in the image. | Yes |
96+
| `products` |[DetectedObject](#detected-object-api-model) | Products detected in the image. | Yes |
97+
| `gaps` | [DetectedObject](#detected-object-api-model) | Gaps detected in the image. | Yes |
11098

11199
### Image Metadata API model
112100

@@ -124,8 +112,8 @@ Describes a detected object in an image.
124112
| Name | Type | Description | Required |
125113
| ---- | ---- | ----------- | -------- |
126114
| `id` | string | ID of the detected object. | No |
127-
| `boundingBox` | [BoundingBoxApiModel](#bounding-box-api-model) | A bounding box for an area inside an image. | Yes |
128-
| `classifications` | [ImageClassificationApiModel](#image-classification-api-model) | Classification confidences of the detected object. | Yes |
115+
| `boundingBox` | [BoundingBox](#bounding-box-api-model) | A bounding box for an area inside an image. | Yes |
116+
| `tags` | [TagsApiModel](#image-tags-api-model) | Classification confidences of the detected object. | Yes |
129117

130118
### Bounding Box API model
131119

@@ -138,18 +126,18 @@ A bounding box for an area inside an image.
138126
| `w` | integer | Width measured from the top-left point of the area, in pixels. | Yes |
139127
| `h` | integer | Height measured from the top-left point of the area, in pixels. | Yes |
140128

141-
### Image Classification API model
129+
### Image Tags API model
142130

143131
Describes the image classification confidence of a label.
144132

145133
| Name | Type | Description | Required |
146134
| ---- | ---- | ----------- | -------- |
147135
| `confidence` | float | Confidence of the classification prediction. | Yes |
148-
| `label` | string | Label of the classification prediction. | Yes |
136+
| `name` | string | Label of the classification prediction. | Yes |
149137

150138
## Next steps
151139

152-
In this guide, you learned how to make a basic analysis call using the pretrained Product Understanding REST API. Next, learn how to use a custom Product Recognition model to better meet your business needs.
140+
In this guide, you learned how to make a basic analysis call using the pretrained Product Recognition REST API. Next, learn how to use a custom Product Recognition model to better meet your business needs.
153141

154142
> [!div class="nextstepaction"]
155143
> [Train a custom model for Product Recognition](../how-to/shelf-model-customization.md)

0 commit comments

Comments
 (0)