-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add areaOfInterest and detectObject to CV API #4771
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "https://westus.api.cognitive.microsoft.com", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"Image": "{binary}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"objects": [ | ||
{ | ||
"rectangle": { | ||
"x": 0, | ||
"y": 0, | ||
"w": 50, | ||
"h": 50 | ||
}, | ||
"object": "tree", | ||
"confidence": 0.9, | ||
"parent": { | ||
"object": "plant", | ||
"confidence": 0.95 | ||
} | ||
} | ||
], | ||
"requestId": "1ad0e45e-b7b4-4be3-8042-53be96103337", | ||
"metadata": { | ||
"width": 100, | ||
"height": 100, | ||
"format": "Jpeg" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just an idea, wouldn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, but for all the of other services it's There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious, what services you are referring to? I searched before and didn't find anyother.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh you mean other |
||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "https://westus.api.cognitive.microsoft.com", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"ImageUrl": "{url}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"objects": [ | ||
{ | ||
"rectangle": { | ||
"x": 0, | ||
"y": 0, | ||
"w": 50, | ||
"h": 50 | ||
}, | ||
"object": "tree", | ||
"confidence": 0.9, | ||
"parent": { | ||
"object": "plant", | ||
"confidence": 0.95 | ||
} | ||
} | ||
], | ||
"requestId": "1ad0e45e-b7b4-4be3-8042-53be96103337", | ||
"metadata": { | ||
"width": 100, | ||
"height": 100, | ||
"format": "Jpeg" | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "https://westus.api.cognitive.microsoft.com", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"Image": "{binary}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"areaOfInterest": { | ||
"h": 951, | ||
"w": 950, | ||
"x": 160, | ||
"y": 0 | ||
}, | ||
"requestId": "ed2de1c6-fb55-4686-b0da-4da6e05d283f", | ||
"metadata": { | ||
"format": "Jpeg", | ||
"height": 951, | ||
"width": 1378 | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "https://westus.api.cognitive.microsoft.com", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"ImageUrl": "{url}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"areaOfInterest": { | ||
"h": 951, | ||
"w": 950, | ||
"x": 160, | ||
"y": 0 | ||
}, | ||
"requestId": "ed2de1c6-fb55-4686-b0da-4da6e05d283f", | ||
"metadata": { | ||
"format": "Jpeg", | ||
"height": 951, | ||
"width": 1378 | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a breaking change for your API - current SDKs will not be able to handle these new enums. Only enums with "modelAsString" set to true are allowed to add new enum values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you help clarify? If the service returns one of these new values in the JSON, aren't current clients screwed anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jianghaolu Any comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes That's what I mean by saying the rest API is going to break the clients.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't justify breaking the clients after breaking the APIs. If this list is supposed to grow you should mark "modelAsString" to true in this PR. This PR is bringing breaking changes anyways (unfortunately) but there will be no more in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to true to prevent future breaking changes. Also in here.