Skip to content

Commit

Permalink
ComputerVision add tag.hint, make scalars non-nullable (#3259)
Browse files Browse the repository at this point in the history
* ComputerVision add tag.hint

Hints provided additional info for whole-image analysis tags.
This PR is to make the Swagger match the service behavior.

* ComputerVision remove non-nullable scalars (#2)

Generally the objects may be unspecified, but when specified, the scalars
contained within them, such as confidence scores, are present.

While this is a breaking change w/r/t to v1.0 of the Azure-named SDK, it is
actually an un-breaking change for our customers who have been using the
hand-crafted [SDK](https://github.com/microsoft/cognitive-vision-windows), which
has been the official SDK up to now.
  • Loading branch information
cthrash authored and anuchandy committed Jun 20, 2018
1 parent 456a0e9 commit 0c74aa6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@
"textAngle": {
"type": "number",
"format": "double",
"x-nullable": false,
"description": "The angle, in degrees, of the detected text with respect to the closest horizontal or vertical direction. After rotating the input image clockwise by this angle, the recognized text lines become horizontal or vertical. In combination with the orientation property it can be used to overlay recognition results correctly on the original image, by rotating either the original image or recognition results by a suitable angle around the center of the original image. If the angle cannot be confidently detected, this property is not present. If the image contains text at different angles, only part of the text will be recognized correctly."
},
"orientation": {
Expand Down Expand Up @@ -1116,6 +1117,7 @@
"confidence": {
"type": "number",
"format": "double",
"x-nullable": false,
"description": "The level of confidence the service has in the caption"
}
}
Expand All @@ -1131,7 +1133,12 @@
"confidence": {
"type": "number",
"format": "double",
"x-nullable": false,
"description": "The level of confidence the service has in the caption"
},
"hint": {
"type": "string",
"description": "Optional categorization for the tag"
}
}
},
Expand All @@ -1142,11 +1149,13 @@
"width": {
"type": "integer",
"format": "int32",
"x-nullable": false,
"description": "Image width"
},
"height": {
"type": "integer",
"format": "int32",
"x-nullable": false,
"description": "Image height"
},
"format": {
Expand All @@ -1166,6 +1175,7 @@
"confidence": {
"type": "number",
"format": "double",
"x-nullable": false,
"description": "Level of confidence ranging from 0 to 1."
},
"faceRectangle": {
Expand All @@ -1184,6 +1194,7 @@
"confidence": {
"type": "number",
"format": "double",
"x-nullable": false,
"description": "Confidence level for the landmark recognition."
}
}
Expand All @@ -1194,18 +1205,22 @@
"properties": {
"left": {
"type": "integer",
"x-nullable": false,
"description": "X-coordinate of the top left point of the face."
},
"top": {
"type": "integer",
"x-nullable": false,
"description": "Y-coordinate of the top left point of the face."
},
"width": {
"type": "integer",
"x-nullable": false,
"description": "Width measured from the top-left point of the face."
},
"height": {
"type": "integer",
"x-nullable": false,
"description": "Height measured from the top-left point of the face."
}
}
Expand All @@ -1216,6 +1231,7 @@
"properties": {
"age": {
"type": "integer",
"x-nullable": false,
"description": "Possible age of the face."
},
"gender": {
Expand All @@ -1241,10 +1257,12 @@
"properties": {
"clipArtType": {
"type": "number",
"x-nullable": false,
"description": "Confidence level that the image is a clip art."
},
"lineDrawingType": {
"type": "number",
"x-nullable": false,
"description": "Confidence level that the image is a line drawing."
}
}
Expand Down Expand Up @@ -1317,6 +1335,7 @@
"score": {
"type": "number",
"format": "double",
"x-nullable": false,
"description": "Scoring of the category."
},
"detail": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
{
"name": "window",
"confidence": 0.89513939619064331
},
{
"name": "pangolin",
"confidence": 0.7250059783791661,
"hint": "mammal"
}
],
"description": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
{
"name": "window",
"confidence": 0.89513939619064331
},
{
"name": "pangolin",
"confidence": 0.7250059783791661,
"hint": "mammal"
}
],
"description": {
Expand Down

0 comments on commit 0c74aa6

Please sign in to comment.