FaceAuth 1.5.1

dotnet add package FaceAuth --version 1.5.1                
NuGet\Install-Package FaceAuth -Version 1.5.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FaceAuth" Version="1.5.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FaceAuth --version 1.5.1                
#r "nuget: FaceAuth, 1.5.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FaceAuth as a Cake Addin
#addin nuget:?package=FaceAuth&version=1.5.1

// Install FaceAuth as a Cake Tool
#tool nuget:?package=FaceAuth&version=1.5.1                

FaceAuth

FaceAuth is a library that provides the easiest way to use face authentication in your .NET project in just 4 lines of code.


Installation

To install, enter the command in the CLI

dotnet add package FaceAuth

Using

using FaceAuth;

var auth = new FaceAuthProvider();

// Check and Initialize out camera
if (auth.CameraInitialize())
{
    // Initialize FaceRecognizer model
    auth.LoadFaceRecognizer();
    
    //Register
    auth.RegisterFace("The name of the person you are registering", 10);

    // Recognize face
    auth.Recognize();
}
else
{
    Console.WriteLine("Your Camera Not Found!");
}

Advices

  • For a big job, you need from 50-200 images of one person in different head positions.
  • You can put auth.Recognize() in a loop of 10 iterations and get at least 1 true for successful authentication
    // Recognize face
    for (int i = 0; i < 10; i++)
    {
        if (auth.Recognize())
        {
            Console.WriteLine("Successful authentication");
            return;
        }
    }

    Console.WriteLine("Failed authentication");
  • It is desirable to do Recognize() not in an infinite loop, for example, while observing the efficient authentication algorithm.
  • It is recommended to make an anti-spam system to protect against hacking.
bool TryRecognize(FaceAuthProvider _auth, ref int _recognizeCount)
{
    _recognizeCount++;
    return _auth.Recognize();
}

int recognizeCount = 0;

for (int i = 0; i < 10; i++)
{
    if (recognizeCount <= 5)
    {
        TryRecognize(auth, ref recognizeCount);
    }
    else
    {
        Console.WriteLine("You cant recognize more");
        return;
    }
}
Product 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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.1 232 7/28/2023
1.5.0 143 7/28/2023
1.0.0 130 6/27/2023
0.8.0 125 6/27/2023
0.7.0 134 6/26/2023
0.6.0 127 6/26/2023
0.5.1 127 6/25/2023
0.5.0 105 6/25/2023