Update from v3.2 to v4.0 of the Azure AI Vision API #829
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
In #559, we switched over to using the Azure AI Vision v3.2 API for all Features relying on that. We decided not to switch to the v4.0 of that API as it was still in public preview and had some breaking changes.
That API seems to be more stable now so this PR switches over to that for the following Features:
It does not change the following Features:
Things to note:
captions
feature, which is used for the Descriptive Text Generator Feature. See https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/overview-image-analysis?tabs=4-0#region-availability for that listIn addition, we now output an error message if a valid caption is returned but the confidence score is lower than our threshold. Previously we would just silently discard that, which can lead to people thinking things aren't working. We still don't save that caption but we show an error letting the user know what happened.
Partially closes #827
For some tests, here's some results I got:
You could argue on if these captions are better or not but they are definitely not worse and the confidence scores are back to being more realistic, which is great as that's an issue that trips up a lot of people
How to test the Change
Changelog Entry
Credits
Props @dkotter, @jeffpaul
Checklist: