No description
Find a file
2025-06-15 11:36:22 +03:00
.run Initial commit 2025-06-13 08:42:20 +03:00
assets Add more documentation 2025-06-15 11:36:22 +03:00
ImageAnalyzer Add more documentation 2025-06-15 11:36:22 +03:00
.editorconfig Initial commit 2025-06-13 08:42:20 +03:00
.gitignore Initial commit 2025-06-13 08:42:20 +03:00
.vsconfig Initial commit 2025-06-13 08:42:20 +03:00
Directory.Build.props Initial commit 2025-06-13 08:42:20 +03:00
Directory.Build.targets Initial commit 2025-06-13 08:42:20 +03:00
Directory.Packages.props Generate a caption for selected image 2025-06-15 11:22:27 +03:00
global.json Initial commit 2025-06-13 08:42:20 +03:00
ImageAnalyzer.sln Add more documentation 2025-06-15 11:36:22 +03:00
ImageAnalyzer.sln.DotSettings.user Add more documentation 2025-06-15 11:36:22 +03:00
ReadMe.md Add more documentation 2025-06-15 11:36:22 +03:00

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

Sample app

Configuration

Modify appsettings.json Foundry section with your own Azure vision resource credentials. Sample configuration

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.