.run | ||
assets | ||
ImageAnalyzer | ||
.editorconfig | ||
.gitignore | ||
.vsconfig | ||
Directory.Build.props | ||
Directory.Build.targets | ||
Directory.Packages.props | ||
global.json | ||
ImageAnalyzer.sln | ||
ImageAnalyzer.sln.DotSettings.user | ||
ReadMe.md |
Image analyzer
This project is meant as a simple dev sample for analyzing images using Azure Vision and/or Ai Foundry. Consider it a rudimentary training exercise.
This project is built using the Uno Platform, which allows you to run the same code on multiple platforms including Windows, Android, iOS, and WebAssembly.
Sample app
Configuration
Modify appsettings.json Foundry
section with your own Azure vision resource credentials.
Notes
Error about api version
Content:
{"error":{"code":"BadRequest","message":"API version not supported"}}
This was presumably due to the fact that Sweden Central where the project exists does not support some of these functionalities.
Attempting to solve this by switching to earlier version. For that we needed a separate nuget package.
That failed to bad request as well.
Next attempt: creating a new project this time in West Europe.
Final attempt: create a computer vision resource using azure portal. This seems to work. At least the first request went through successfully and caption is available.
Key files to look at
- App.xaml.cs
- this is where you'll find all initialization (including reading from appsettings.json)
- MainViewModel.cs and MainPage.xaml
- Ui logic lives in these files
- ImageAnalysis.cs
- This is where the magic happens
Note for Linux users
If you can't add a file, you might have a dependency missing. Due to a bug in Uno platform, zenity is used to select files.