Below is a working sample MAUI app with Azure Face API integration that:
-
Allows the user to pick or capture an image
-
Sends the image to Azure Face API
-
Displays detected face attributes (e.g. age, gender, emotion)
Prerequisites
1. Azure Face API Setup
Create an Azure Face resource:
https://portal.azure.com > Create a resource > AI + Machine Learning > Face API
Grab:
-
Endpoint (e.g.,
https://<region>.api.cognitive.microsoft.com
) -
Subscription key
.NET MAUI Project Setup
1. Create the project
2. Add NuGet packages
Run:
3. MainPage.xaml
(UI)
4. MainPage.xaml.cs
(Code-behind)
5. Platform Permissions
Android (Platforms/Android/AndroidManifest.xml
)
Add these inside <manifest>
:
No comments:
Post a Comment