AI.Facial.Emotion
25.3.16
See the version list below for details.
dotnet add package AI.Facial.Emotion --version 25.3.16
NuGet\Install-Package AI.Facial.Emotion -Version 25.3.16
<PackageReference Include="AI.Facial.Emotion" Version="25.3.16" />
<PackageVersion Include="AI.Facial.Emotion" Version="25.3.16" />
<PackageReference Include="AI.Facial.Emotion" />
paket add AI.Facial.Emotion --version 25.3.16
#r "nuget: AI.Facial.Emotion, 25.3.16"
#addin nuget:?package=AI.Facial.Emotion&version=25.3.16
#tool nuget:?package=AI.Facial.Emotion&version=25.3.16
AI.Facial.Emotion
AI.Facial.Emotion is a .NET library for analyzing facial attributes, including emotion. It seamlessly integrates with C#.NET, providing efficient and secure facial analysis with embedded AI models. Ideal for chatbots, customer insights, security, and healthcare applications.
🚀 Demo: My demo website is hosted on Azure (FREE SKU) here
🚀 Features
- Emotion Detection – Recognizes emotions such as happiness, sadness, anger, surprise, and more.
- Optimized for .NET – Fully compatible with .NET 6, .NET 8, .NET 9 and .NET 10.
- Easy Integration – Works seamlessly with ASP.NET Web APIs, Windows Application, allowing quick integration into existing projects.
- Supports multiple input formats: URL, Base64, File Stream
📦 Installation
You can install this library via NuGet Package Manager:
dotnet add package AI.Facial.Emotion
📦 Mandatory ingredients
- If your server runs windows operating system
dotnet add package Emgu.CV.runtime.windows
- If your server runs ubuntu operating system
dotnet add package Emgu.CV.runtime.ubuntu-x64
⚡ Usage
For example
1️⃣ Analyze emotion from an image URL
using AI.Facial.Emotion;
var analyzer = new EmotionAnalyzer();
var result = await analyzer.AnalyzeEmotionFromUrlAsync("https://example.com/image.jpg");
Console.WriteLine($"Emotion: {result.Emotion}");
2️⃣ Analyze emotion from a Base64 image string
var base64Image = "iVBORw0KGgoAAAANSUhEUgAA...";
var result = await analyzer.AnalyzeEmotionFromBase64Async(base64Image);
Console.WriteLine($"Emotion: {result.Emotion}");
3️⃣ Analyze emotion from a file stream
using var fileStream = File.OpenRead("image.jpg");
var result = await analyzer.AnalyzeEmotionFromStreamAsync(fileStream);
Console.WriteLine($"Emotion: {result.Emotion}");
Example Response
{
"emotion": "sadness"
}
📦 Contact
For any questions, feel free to contact me or create an issue in the repository.
⚡ Release note
25.3.16 Support for the newly released .NET 9 and .NET 10
25.3.11 Update the Readme
25.3.4.2231. Allow user can adjust the Target hardware like CPU, CUDA
25.3.4. Allow user can adjust the threshold, topK and nms
25.3.3. Improve the performance
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. |
-
net10.0
- Emgu.CV (>= 4.10.0.5680)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.ML.OnnxRuntime (>= 1.21.0)
- Newtonsoft.Json (>= 13.0.3)
-
net6.0
- Emgu.CV (>= 4.10.0.5680)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.ML.OnnxRuntime (>= 1.21.0)
- Newtonsoft.Json (>= 13.0.3)
-
net8.0
- Emgu.CV (>= 4.10.0.5680)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.ML.OnnxRuntime (>= 1.21.0)
- Newtonsoft.Json (>= 13.0.3)
-
net9.0
- Emgu.CV (>= 4.10.0.5680)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.ML.OnnxRuntime (>= 1.21.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
25.3.16 Support for the newly released .NET 9 and .NET 10
25.3.11 Update the Readme
25.3.4.2231. Allow user can adjust the Target hardware like CPU, CUDA
25.3.4. Allow user can adjust the threshold, topK and nms
25.3.3. Improve the performance