Tip AI.Facial.Emotion – A lightweight .NET library for facial emotion analysis

ngtduc693

New member
Joined
Mar 2, 2025
Messages
3
Programming Experience
5-10
In today’s digital era, facial emotion recognition has emerged as a crucial tool across various fields, from marketing and customer service to security and surveillance so the AI.Facial.Emotion – a lightweight and powerful .NET library that can analyze facial emotions in real-time. Whether you're building chatbots, customer analytics, security systems, or healthcare apps, this tool makes it easy to integrate AI-powered facial analysis into your projects.

480881976_2123410804759604_4432416216930552685_n.jpg

🚀 Why Choose AI.Facial.Emotion?​

✅ High Accuracy: Utilizing cutting-edge deep learning techniques, the library provides outstanding accuracy in recognizing a wide range of emotions.
✅ Seamless Integration: Built on the robust .NET framework, AI.Facial.Emotion integrates effortlessly into existing applications, significantly reducing development time.
✅ Blazing Fast Performance: According to simple tests, the library processes facial emotion analysis in under 0.2 seconds, ensuring near real-time responses in critical applications.
✅ Open Source Flexibility: With a strong community of contributors, users can easily customize and enhance the library to suit their specific needs.

🎯 What Can It Do?​

✅ Detect Emotions – Identify happiness, sadness, anger, surprise, and more.
✅ Optimized for .NET – Works with .NET 6, 7, 8, and 9.
✅ Multiple Input Formats – Accepts image URLs, Base64 strings, and file streams.

📦 Preinstalled​

  • If your server runs windows operating system
C#:
dotnet add package Emgu.CV.runtime.windows

  • If your server runs ubuntu operating system
C#:
dotnet add package Emgu.CV.runtime.ubuntu-x64


📦 Installation​

Just install it via NuGet:

C#:
dotnet add package AI.Facial.Emotion

⚡ Quick Start​

1️⃣ Detect Emotion from an Image URL

C#:
var analyzer = new EmotionAnalyzer();
var result = await analyzer.AnalyzeEmotionFromUrlAsync("https://example.com/image.jpg");

Console.WriteLine($"Emotion: {result.Emotion}");

2️⃣ Detect Emotion from a Base64 Image

C#:
var base64Image = "iVBORw0KGgoAAAANSUhEUgAA...";
var result = await analyzer.AnalyzeEmotionFromBase64Async(base64Image);

Console.WriteLine($"Emotion: {result.Emotion}");

3️⃣ Detect Emotion from a File Stream

C#:
using var fileStream = File.OpenRead("image.jpg");
var result = await analyzer.AnalyzeEmotionFromStreamAsync(fileStream);

Console.WriteLine($"Emotion: {result.Emotion}");
 
Your supposedly open source project doesn't look to be open source. Clicking on the link in Nuget to the go to the source leads nowhere. Trying to list your public repositories does not have this particular library.
 
Your supposedly open source project doesn't look to be open source. Clicking on the link in Nuget to the go to the source leads nowhere. Trying to list your public repositories does not have this particular library.

oh yeah sorry for my mistake i just public the repos after finishing the first stable version
 
Your repo seems to be corrupted:
Code:
C:\z> git clone https://github.com/ngtduc693/AI-Facial-Emotion-for-.NET.git
Cloning into 'AI-Facial-Emotion-for-.NET'...
remote: Enumerating objects: 113, done.
remote: Counting objects: 100% (113/113), done.
remote: Compressing objects: 100% (80/80), done.
remote: Total 113 (delta 42), reused 85 (delta 22), pack-reused 0 (from 0)
Receiving objects: 100% (113/113), 422.44 KiB | 8.99 MiB/s, done.
Resolving deltas: 100% (42/42), done.
git-lfs filter-process: line 1: git-lfs: command not found
fatal: the remote end hung up unexpectedly
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
 
Okay, I installed git-lfs to make the clone happier.

How is 30MB considered "lightweight"?
1740966275200.png
 
Okay, I installed git-lfs to make the clone happier.

How is 30MB considered "lightweight"?
View attachment 3354

Morning, After many tests with complex images, this model has the ability to recognize accurately with the lowest file size in the group of models. There are lighter models out there but the accuracy is not high.

If you know any better and lighter model, I will test it and apply it in the next version.
 
Back
Top Bottom