An Open-Source Biometric SDK for Android, iOS and the JVM: Iris, Face and Fingerprints in One Kotlin Library

Most biometric software is sold as a black box: you get a binary, a licence key and a template format that only the vendor can read. We think the engine that decides whether two people are the same person should be open to inspection, and that the templates it produces should not chain a register to one company. So we publish ours. This article describes what the Iriscan Biometric SDK does, how its iris pipeline works, and where it still falls short.
Why open source, for a biometric engine
A register of enrolled people outlives the software that created it. Programs that issue loans, insurance cards or aid spend years building their registers, and then find that moving to another system means enrolling everybody again, because the old templates are in a closed format and the vendor will not convert them. It is the problem our biometric data converter was built for, with funding from the EU's Next Generation Internet programme, and it shaped how we built the SDK.
Open code solves two problems at once. Anyone can check what the matcher does with an image, which matters when the decision affects whether a person gets paid. And because the code and the formats are public, a client's data stays usable whatever happens to us. The SDK is free under GPL-3.0; companies that ship it inside closed-source products buy a commercial licence, which is how the work is funded.
What is in it
The SDK is a single Kotlin Multiplatform library. The same code runs on Android, on iOS and on the JVM, so a template made on a phone in the field matches a template made on a server in the office.
| Modality | What it does | Runs on |
|---|---|---|
| Iris | Segmentation, image quality, encoding into an iris code, 1:1 and 1:N matching | Android, iOS, JVM; plain Kotlin, no native libraries |
| Fingerprint | Minutiae extraction and matching for contact-scanner images | Android, iOS, JVM; plain Kotlin |
| Face | Detection, alignment, embedding and matching; passive liveness against printed and screen photos | Android, iOS, JVM, with TensorFlow Lite |
| Records | Reading and writing ISO/IEC 19794-6 iris and ISO/IEC 19794-2 finger minutiae records | All platforms |
Everything runs locally. Images never leave the device unless your application sends them somewhere, and nothing needs a network connection, which matters for field registration in places where the connection comes and goes.
How the iris pipeline works
The iris part follows the approach John Daugman published in the 1990s and that most iris systems still build on, with the engineering details that decide whether it works on real images from cheap scanners.
Reflections first. The infrared illuminators of a scanner leave bright spots on the cornea, and those spots produce stronger edges than the iris boundary itself. The SDK finds them, masks them and fills them in from the surrounding texture before it looks for anything else.
Pupil and iris as two circles. Candidate pupils come from dark regions of the image; around each one, Daugman's integro-differential operator looks for the circle where brightness changes most sharply. The edge has to be present in most directions around the circle, which stops an eyelid or a clump of lashes from passing for a boundary. The outer edge of the iris is searched as a separate circle, because the pupil is rarely in the exact centre of the iris.
Eyelids and lashes. Upper and lower eyelids are located as curves, and any part of the iris they cover is excluded from comparison, together with eyelashes and leftover reflections. If less than a fifth of the iris remains visible, the SDK refuses to make a template rather than produce an unreliable one.
Unwrapping and encoding. The ring of the iris is unrolled into a rectangle, so that a dilated and a constricted pupil give the same geometry. Each band of the rectangle is filtered with a log-Gabor filter, and the phase of the response is reduced to two bits. The result is a 4,096-bit iris code with a mask that says which bits come from visible iris. Bits that sit too close to zero and flip between captures are masked as well. A template takes 1,032 bytes, and the image cannot be rebuilt from it.
Matching. Two codes are compared bit by bit over the positions valid in both, with the probe rotated a few degrees either way to allow for a tilted head. The fraction of disagreeing bits, normalised for how many bits were compared, gives the score. Codes of different eyes disagree on about half their bits; codes of the same eye agree on far more. That gap is why iris works so well for searching large registers, where every new person is compared with everyone already enrolled.
Quality before anything else. A bad capture is cheapest to fix while the person is still in front of the scanner. The SDK measures the components of ISO/IEC 29794-6 — usable iris area, contrast, pupil dilation, iris size, margins and sharpness — so an application can ask for a retake on the spot. We described the metrics and our thresholds in a separate article.
Every step, with its parameters and the reasons behind them, is documented in the README. Because the iris pipeline is plain Kotlin with no native code, it behaves identically on every platform.
Fingerprints and faces
For fingerprints we did not write a new algorithm. We ported SourceAFIS, a well-known open-source matcher, to common Kotlin, and a test suite checks that the port gives exactly the same scores as the Java original. Templates are stored as ISO/IEC 19794-2 minutiae records, the format other fingerprint systems read. Our own fingerprint engine is in development and will replace the port only if it measures better.
For faces the SDK uses what each platform does best: ML Kit finds the face on Android, Apple Vision on iOS, and on the JVM a bundled BlazeFace model running in TensorFlow Lite. The SDK aligns the face and turns it into an embedding with a FaceNet-type model, and a separate model checks that the camera sees a live face rather than a printed photo or a screen. You choose the models; the SDK downloads them once and caches them on the device.
Standards, so data is never stuck
The SDK reads and writes ISO/IEC 19794-6 iris image records and ISO/IEC 19794-2 fingerprint records. In practice this means you can keep the iris images of your register in a standard container, recompute templates when the algorithm improves, or hand the register to another vendor's matcher without asking anyone for permission. Our data conversion tool handles the formats the SDK does not produce itself.
Where it runs
- Android through Maven Central, with USB iris scanners connected to a phone or tablet over USB OTG.
- iOS as the
BiometricSdkCocoaPod, called from Swift. - The JVM on Linux, macOS (including Apple Silicon) and Windows, for servers and desktop applications. Iris and fingerprints run anywhere Java does. Face operations need TensorFlow Lite's native libraries, which require Ubuntu 22.04, Debian 12 or another recent Linux, macOS 15, or Windows; on older Linux servers a container based on a recent distribution works, as the README explains.
// Android or JVM, Gradle
implementation("net.iriscan:biometric-sdk-android:<version>") // or biometric-sdk-jvm
val sdk = BiometricSdkFactory.getInstance()!!
val eye = sdk.io().readImage(bytes)
val template = sdk.iris().encoder().extractAndEncode(eye)
val samePerson = sdk.iris().matcher().matches(template, enrolled)
Sample applications for Android, iOS and the JVM, with test images for each modality, are in the samples repository; our CI runs them against the SDK's development branch.
What it does not do yet
We would rather say this ourselves than have you find out in a pilot.
- We have not submitted the iris matcher to NIST's IREX evaluation. We measure it on public research datasets and will publish a headline accuracy figure with each release; the closed leaders of the field are still ahead of us, and closing that gap is our main work for the coming months.
- The iris pipeline expects near-infrared images from a dedicated iris camera. It is not built for iris recognition from ordinary visible-light phone photos.
- There is no iris presentation-attack detection yet. With supervised capture on a dedicated scanner this is a smaller risk than with unattended kiosks, but it is a gap.
- Face recognition depends on the model you supply; the SDK makes it easy to run one, but it does not ship a face model of its own.
How to use it
For research, internal tools, server-side use and open-source products, the SDK is free under GPL-3.0: start from the repository on GitHub. To ship it inside a closed-source app or device, take a commercial licence. If you would rather not run the matching yourself, our iris recognition software is also available as a cloud service with de-duplication at every enrollment, or on your own servers.