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/RegulaFaceSDKWebClient")
    }
}

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

Example

Performing request:

var sdk = new FaceSdk(apiBasePath);

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

var compareImage1 = new CompareImage().index(0).data(face1).type(ImageSource.LIVE);
var compareImage2 = new CompareImage().index(1).data(face1).type(ImageSource.DOCUMENT_RFID);
var compareImage3 = new CompareImage().index(3).data(face2).type(ImageSource.LIVE);

var compareRequest = new CompareRequest().images(List.of(compareImage1, compareImage2, compareImage3));
var compareResponse = sdk.matchingApi.compare(compareRequest);

You can find a more detailed example in example folder.