Skip to content

Commit 07c359d

Browse files
1.3.0.6
1 parent 6d5353c commit 07c359d

File tree

68 files changed

+4222
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+4222
-185
lines changed

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
takuya.takeuchi.dev@gmail.com.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

FaceRecognitionDotNet.sln

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29806.167
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.32112.339
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2F845E5F-E6B9-46D5-B5D8-52BEE4B463F0}"
77
EndProject
@@ -45,7 +45,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HeadPoseEstimationDemo", "e
4545
EndProject
4646
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BenchmarkEndToEnd", "examples\BenchmarkEndToEnd\BenchmarkEndToEnd.csproj", "{F26A2088-EB8B-43F0-8F78-9A2BCE514367}"
4747
EndProject
48+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EmotionTraining", "tools\EmotionTraining\EmotionTraining.csproj", "{269D318D-B37E-4F24-AF9B-30D580439056}"
49+
EndProject
50+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EmotionTrainingV2", "tools\EmotionTrainingV2\EmotionTrainingV2.csproj", "{2462DBBC-3902-4C92-B1D3-F1CB09AE0995}"
51+
EndProject
52+
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Shared", "tools\Shared\Shared.shproj", "{91B27982-5175-48B6-B653-6F5F022F488C}"
53+
EndProject
4854
Global
55+
GlobalSection(SharedMSBuildProjectFiles) = preSolution
56+
tools\Shared\Shared.projitems*{2462dbbc-3902-4c92-b1d3-f1cb09ae0995}*SharedItemsImports = 5
57+
tools\Shared\Shared.projitems*{269d318d-b37e-4f24-af9b-30d580439056}*SharedItemsImports = 5
58+
tools\Shared\Shared.projitems*{91b27982-5175-48b6-b653-6f5f022f488c}*SharedItemsImports = 13
59+
EndGlobalSection
4960
GlobalSection(SolutionConfigurationPlatforms) = preSolution
5061
Debug|Any CPU = Debug|Any CPU
5162
Release|Any CPU = Release|Any CPU
@@ -119,6 +130,14 @@ Global
119130
{F26A2088-EB8B-43F0-8F78-9A2BCE514367}.Debug|Any CPU.Build.0 = Debug|Any CPU
120131
{F26A2088-EB8B-43F0-8F78-9A2BCE514367}.Release|Any CPU.ActiveCfg = Release|Any CPU
121132
{F26A2088-EB8B-43F0-8F78-9A2BCE514367}.Release|Any CPU.Build.0 = Release|Any CPU
133+
{269D318D-B37E-4F24-AF9B-30D580439056}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
134+
{269D318D-B37E-4F24-AF9B-30D580439056}.Debug|Any CPU.Build.0 = Debug|Any CPU
135+
{269D318D-B37E-4F24-AF9B-30D580439056}.Release|Any CPU.ActiveCfg = Release|Any CPU
136+
{269D318D-B37E-4F24-AF9B-30D580439056}.Release|Any CPU.Build.0 = Release|Any CPU
137+
{2462DBBC-3902-4C92-B1D3-F1CB09AE0995}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
138+
{2462DBBC-3902-4C92-B1D3-F1CB09AE0995}.Debug|Any CPU.Build.0 = Debug|Any CPU
139+
{2462DBBC-3902-4C92-B1D3-F1CB09AE0995}.Release|Any CPU.ActiveCfg = Release|Any CPU
140+
{2462DBBC-3902-4C92-B1D3-F1CB09AE0995}.Release|Any CPU.Build.0 = Release|Any CPU
122141
EndGlobalSection
123142
GlobalSection(SolutionProperties) = preSolution
124143
HideSolutionNode = FALSE
@@ -141,6 +160,9 @@ Global
141160
{BB6A1F98-DEF9-475C-A69A-82FE518D1E9E} = {8C8838E0-B002-426F-9B25-4C1F65A6D33D}
142161
{8540B212-5605-4402-BAE4-BEFEBAAD9F97} = {FEEAC07F-70D7-4C12-B92C-153CEE0F2539}
143162
{F26A2088-EB8B-43F0-8F78-9A2BCE514367} = {FEEAC07F-70D7-4C12-B92C-153CEE0F2539}
163+
{269D318D-B37E-4F24-AF9B-30D580439056} = {8C8838E0-B002-426F-9B25-4C1F65A6D33D}
164+
{2462DBBC-3902-4C92-B1D3-F1CB09AE0995} = {8C8838E0-B002-426F-9B25-4C1F65A6D33D}
165+
{91B27982-5175-48B6-B653-6F5F022F488C} = {8C8838E0-B002-426F-9B25-4C1F65A6D33D}
144166
EndGlobalSection
145167
GlobalSection(ExtensibilityGlobals) = postSolution
146168
SolutionGuid = {4D44C572-D749-4A76-A199-8C598A08AE8A}

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ![Alt text](nuget/face48.png "FaceRecognitionDotNet") FaceRecognitionDotNet [![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)]() [![codecov](https://codecov.io/gh/takuya-takeuchi/FaceRecognitionDotNet/branch/master/graph/badge.svg)](https://codecov.io/gh/takuya-takeuchi/FaceRecognitionDotNet)
1+
![FaceRecognitionDotNet](https://socialify.git.ci/takuya-takeuchi/FaceRecognitionDotNet/image?description=1&font=Raleway&language=1&logo=https%3A%2F%2Fgithub.com%2Ftakuya-takeuchi%2FFaceRecognitionDotNet%2Fraw%2Fmaster%2Fnuget%2Fface128.png&owner=1&pattern=Circuit%20Board&theme=Light)
22

33
The world's simplest facial recognition api for .NET
44
This repository is porting https://github.com/ageitgey/face_recognition by C#.
@@ -55,8 +55,10 @@ This package supports cross platform, Windows, Linux and MacOSX!!
5555
|-|EyeBlinkDetect|Detect person is blinking or not<br>Support Large model and **Helen dataset** :warning:|
5656
|-|LoadImage|From memory data or System.Drawing.Bitmap|
5757
|-|PredictAge|Predict human age.<br>Use **Adience Benchmark Of Unfiltered Faces For Gender And Age Classification dataset** :warning:|
58+
|-|PredictEmotion|Predict emotion for human face.<br>Use **Corrective re-annotation of FER - CK+ - KDEF** :warning:|
5859
|-|PredictGender|Predict human gender.<br>Use **UTKFace dataset** :warning:|
5960
|-|PredictProbabilityAge|Predict probability of human age.<br>Use **Adience Benchmark Of Unfiltered Faces For Gender And Age Classification dataset** :warning:|
61+
|-|PredictProbabilityEmotion|Predict probability of emotion from human face.<br>Use **Corrective re-annotation of FER - CK+ - KDEF** :warning:|
6062
|-|PredictProbabilityGender|Predict probability of human gender.<br>Use **UTKFace dataset** :warning:|
6163
|-|PredictHeadPose|Predict human head pose.<br>Use **300W-LP dataset** :warning:|
6264

@@ -67,6 +69,8 @@ I will **NOT** provide pretrained model file due to avoiding license issue.
6769
You can check the following examples to train dataset.
6870

6971
* tools/AgeTraining
72+
* tools/EmotionTraining
73+
* tools/EmotionTrainingV2
7074
* tools/GenderTraining
7175
* tools/HeadPoseTraining
7276
* tools/HelenTraining
@@ -79,9 +83,9 @@ You can check the following examples to train dataset.
7983

8084
#### Other Face Functions
8185

82-
|Face Landmark|Age and Gender Classification|Head Pose Estimation|
83-
|---|---|---|
84-
|<img src="images/3.jpg" width="240"/>|<img src="examples/CustomClassificationDemo/images/result.png" width="240"/>|<img src="images/4.png" width="240"/>|
86+
|Face Landmark|Age and Gender Classification|Head Pose Estimation|Emotion Estimation|
87+
|---|---|---|---|
88+
|<img src="images/3.jpg" width="240"/>|<img src="examples/CustomClassificationDemo/images/result.png" width="240"/>|<img src="images/4.png" width="240"/>|<img src="images/5.jpg" width="240"/>|
8589

8690
## Document
8791

images/5.jpg

742 KB
Loading

nuget/BuildUtils.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ class Config
44
$ConfigurationArray =
55
@(
66
"Debug",
7-
"Release"
7+
"Release",
8+
"RelWithDebInfo"
89
)
910

1011
$TargetArray =
@@ -60,24 +61,28 @@ class Config
6061
static $BuildLibraryWindowsHash =
6162
@{
6263
"GenderClassification" = "DlibDotNetNativeDnnGenderClassification.dll";
64+
"EmotionClassification" = "DlibDotNetNativeDnnEmotionClassification.dll";
6365
"AgeClassification" = "DlibDotNetNativeDnnAgeClassification.dll";
6466
}
6567

6668
static $BuildLibraryLinuxHash =
6769
@{
6870
"GenderClassification" = "libDlibDotNetNativeDnnGenderClassification.so";
71+
"EmotionClassification" = "libDlibDotNetNativeDnnEmotionClassification.so";
6972
"AgeClassification" = "libDlibDotNetNativeDnnAgeClassification.so";
7073
}
7174

7275
static $BuildLibraryOSXHash =
7376
@{
7477
"GenderClassification" = "libDlibDotNetNativeDnnGenderClassification.dylib";
78+
"EmotionClassification" = "libDlibDotNetNativeDnnEmotionClassification.dylib";
7579
"AgeClassification" = "libDlibDotNetNativeDnnAgeClassification.dylib";
7680
}
7781

7882
static $BuildLibraryIOSHash =
7983
@{
8084
"GenderClassification" = "libDlibDotNetNativeDnnGenderClassification.a";
85+
"EmotionClassification" = "libDlibDotNetNativeDnnEmotionClassification.a";
8186
"AgeClassification" = "libDlibDotNetNativeDnnAgeClassification.a";
8287
}
8388

@@ -94,7 +99,7 @@ class Config
9499
#***************************************
95100
# Arguments
96101
# %1: Root directory of DlibDotNet
97-
# %2: Build Configuration (Release/Debug)
102+
# %2: Build Configuration (Release/Debug/RelWithDebInfo)
98103
# %3: Target (cpu/cuda/mkl/arm)
99104
# %4: Architecture (32/64)
100105
# %5: Platform (desktop/android/ios/uwp)
@@ -918,7 +923,7 @@ function Reset-Dlib-Modification([Config]$Config, [string]$currentDir)
918923
$dlibDir = $Config.GetDlibRootDir()
919924
Set-Location -Path $dlibDir
920925
Write-Host "Reset modification of ${dlibDir}" -ForegroundColor Yellow
921-
git checkout .
926+
# git checkout .
922927
Set-Location -Path $currentDir
923928
}
924929

nuget/nuspec/FaceRecognitionDotNet.CPU.nuspec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package>
33
<metadata>
44
<id>FaceRecognitionDotNet</id>
5-
<version>1.3.0.5</version>
5+
<version>1.3.0.6</version>
66
<title>FaceRecognitionDotNet</title>
77
<authors>Takuya Takeuchi</authors>
88
<owners>Takuya Takeuchi</owners>
@@ -49,14 +49,19 @@ This library is ported from https://github.com/ageitgey/face_recognition by C#.<
4949

5050
<!-- Age and Gender classification -->
5151
<file src="..\artifacts\cpu\runtimes\win-x64\native\DlibDotNetNativeDnnAgeClassification.dll" target="runtimes\win-x64\native\DlibDotNetNativeDnnAgeClassification.dll" />
52+
<file src="..\artifacts\cpu\runtimes\win-x64\native\DlibDotNetNativeDnnEmotionClassification.dll" target="runtimes\win-x64\native\DlibDotNetNativeDnnEmotionClassification.dll" />
5253
<file src="..\artifacts\cpu\runtimes\win-x64\native\DlibDotNetNativeDnnGenderClassification.dll" target="runtimes\win-x64\native\DlibDotNetNativeDnnGenderClassification.dll" />
5354
<file src="..\artifacts\cpu\runtimes\win-x86\native\DlibDotNetNativeDnnAgeClassification.dll" target="runtimes\win-x86\native\DlibDotNetNativeDnnAgeClassification.dll" />
55+
<file src="..\artifacts\cpu\runtimes\win-x86\native\DlibDotNetNativeDnnEmotionClassification.dll" target="runtimes\win-x86\native\DlibDotNetNativeDnnEmotionClassification.dll" />
5456
<file src="..\artifacts\cpu\runtimes\win-x86\native\DlibDotNetNativeDnnGenderClassification.dll" target="runtimes\win-x86\native\DlibDotNetNativeDnnGenderClassification.dll" />
5557
<file src="..\artifacts\cpu\runtimes\linux-x64\native\libDlibDotNetNativeDnnAgeClassification.so" target="runtimes\linux-x64\native\libDlibDotNetNativeDnnAgeClassification.so" />
58+
<file src="..\artifacts\cpu\runtimes\linux-x64\native\libDlibDotNetNativeDnnEmotionClassification.so" target="runtimes\linux-x64\native\libDlibDotNetNativeDnnEmotionClassification.so" />
5659
<file src="..\artifacts\cpu\runtimes\linux-x64\native\libDlibDotNetNativeDnnGenderClassification.so" target="runtimes\linux-x64\native\libDlibDotNetNativeDnnGenderClassification.so" />
5760
<file src="..\artifacts\cpu\runtimes\centos-x64\native\libDlibDotNetNativeDnnAgeClassification.so" target="runtimes\centos-x64\native\libDlibDotNetNativeDnnAgeClassification.so" />
61+
<file src="..\artifacts\cpu\runtimes\centos-x64\native\libDlibDotNetNativeDnnEmotionClassification.so" target="runtimes\centos-x64\native\libDlibDotNetNativeDnnEmotionClassification.so" />
5862
<file src="..\artifacts\cpu\runtimes\centos-x64\native\libDlibDotNetNativeDnnGenderClassification.so" target="runtimes\centos-x64\native\libDlibDotNetNativeDnnGenderClassification.so" />
5963
<file src="..\artifacts\cpu\runtimes\osx-x64\native\libDlibDotNetNativeDnnAgeClassification.dylib" target="runtimes\osx-x64\native\libDlibDotNetNativeDnnAgeClassification.dylib" />
64+
<file src="..\artifacts\cpu\runtimes\osx-x64\native\libDlibDotNetNativeDnnEmotionClassification.dylib" target="runtimes\osx-x64\native\libDlibDotNetNativeDnnEmotionClassification.dylib" />
6065
<file src="..\artifacts\cpu\runtimes\osx-x64\native\libDlibDotNetNativeDnnGenderClassification.dylib" target="runtimes\osx-x64\native\libDlibDotNetNativeDnnGenderClassification.dylib" />
6166

6267
<!-- license -->

nuget/nuspec/FaceRecognitionDotNet.CUDA100.nuspec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package>
33
<metadata>
44
<id>FaceRecognitionDotNet.CUDA100</id>
5-
<version>1.3.0.5</version>
5+
<version>1.3.0.6</version>
66
<title>FaceRecognitionDotNet for CUDA 10.0</title>
77
<authors>Takuya Takeuchi</authors>
88
<owners>Takuya Takeuchi</owners>
@@ -49,10 +49,13 @@ This library is ported from https://github.com/ageitgey/face_recognition by C#.<
4949

5050
<!-- Age and Gender classification -->
5151
<file src="..\artifacts\cuda-100\runtimes\win-x64\native\DlibDotNetNativeDnnAgeClassification.dll" target="runtimes\win-x64\native\DlibDotNetNativeDnnAgeClassification.dll" />
52+
<file src="..\artifacts\cuda-100\runtimes\win-x64\native\DlibDotNetNativeDnnEmotionClassification.dll" target="runtimes\win-x64\native\DlibDotNetNativeDnnEmotionClassification.dll" />
5253
<file src="..\artifacts\cuda-100\runtimes\win-x64\native\DlibDotNetNativeDnnGenderClassification.dll" target="runtimes\win-x64\native\DlibDotNetNativeDnnGenderClassification.dll" />
5354
<file src="..\artifacts\cuda-100\runtimes\linux-x64\native\libDlibDotNetNativeDnnAgeClassification.so" target="runtimes\linux-x64\native\libDlibDotNetNativeDnnAgeClassification.so" />
55+
<file src="..\artifacts\cuda-100\runtimes\linux-x64\native\libDlibDotNetNativeDnnEmotionClassification.so" target="runtimes\linux-x64\native\libDlibDotNetNativeDnnEmotionClassification.so" />
5456
<file src="..\artifacts\cuda-100\runtimes\linux-x64\native\libDlibDotNetNativeDnnGenderClassification.so" target="runtimes\linux-x64\native\libDlibDotNetNativeDnnGenderClassification.so" />
5557
<file src="..\artifacts\cuda-100\runtimes\centos-x64\native\libDlibDotNetNativeDnnAgeClassification.so" target="runtimes\centos-x64\native\libDlibDotNetNativeDnnAgeClassification.so" />
58+
<file src="..\artifacts\cuda-100\runtimes\centos-x64\native\libDlibDotNetNativeDnnEmotionClassification.so" target="runtimes\centos-x64\native\libDlibDotNetNativeDnnEmotionClassification.so" />
5659
<file src="..\artifacts\cuda-100\runtimes\centos-x64\native\libDlibDotNetNativeDnnGenderClassification.so" target="runtimes\centos-x64\native\libDlibDotNetNativeDnnGenderClassification.so" />
5760

5861
<!-- license -->

0 commit comments

Comments
 (0)