Skip to content

regulaforensics/FaceSDK-web-java-client

Repository files navigation

Regula FaceSDK java client compatible with jvm and android

OpenAPI

Face recognition as easy as reading two bytes.

If you have any problems with or questions about this client, please contact us through a GitHub issue. You are invited to contribute new features, fixes, or updates, large or small; We are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Install package

Add Regula Forensics, Inc. maven repository to repositories section in your build.gradle, and declare client as regular dependency.

repositories {
    maven {
        url = uri("https://maven.regulaforensics.com/FaceSDKWebClient")
    }
}

dependencies {
    implementation("com.regula.facesdk:webclient:7.2.145")
}

Example

Performing match request:

var sdk = new FaceSdk(apiBasePath);

byte[] face1 = readFile("face_1.jpg");
byte[] face2 = readFile("face_2.jpg");

var matchImage1 = new MatchImage().index(0).data(face1).type(ImageSource.LIVE);
var matchImage2 = new MatchImage().index(1).data(face1).type(ImageSource.DOCUMENT_RFID);
var matchImage3 = new MatchImage().index(3).data(face2).type(ImageSource.LIVE);

var matchImages = List.of(matchImage1, matchImage2, matchImage3);

var matchRequest = new MatchRequest().images(matchImages);

var matchResponse = sdk.matchApi.match(matchRequest);

Performing match and search request:

var sdk = new FaceSdk(apiBasePath);

byte[] face1 = readFile("face_1.jpg");
byte[] face2 = readFile("face_2.jpg");

var matchAndSearchImage1 = new MatchAndSearchRequestImagesItem().content(face1).type(ImageSource.LIVE);
var matchAndSearchImage2 = new MatchAndSearchRequestImagesItem().content(face2).type(ImageSource.DOCUMENT_RFID);

var matchAndSearchImages = List.of(matchAndSearchImage1, matchAndSearchImage2);

var matchAndSearchRequest = new MatchAndSearchRequest().images(matchAndSearchImages);

var matchAndSearchResponse = sdk.matchApi.matchAndSearch(matchAndSearchRequest);

You can find a more detailed example in example folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 17