Predefined steps

In this section, I will describe all available steps in the current framework, their configs and will show how they look like.

Right now all steps localized in Russian and English.

FaceCapturing

Use this step if you want to capture person face.

Output

UIImage with person's face.

FaceMatching

This step matches two faces. You as well can specify sourceType for the image. This step does not have any UI and does async work, be aware of this, maybe you want to show some additional progress indicator.

Input

  • firstImage: InputImage, secondImage: InputImage

public struct InputImage {
	public enum `Type` {
		case printed
		case rfid
		case live
		case liveWithDoc
	}

	public let image: UIImage
	public let type: Type
}

Output

Response struct with input images, isMatched flag and similarity value.

public struct Response {
	public let firstImage: UIImage
	public let secondImage: UIImage
	public let isMatched: Bool
	public let similarity: Double
}

FaceLiveness

If you want to understand is person alive or not, then this step is for you. It will ask person to do two pictures and returns the result for you.

Input

  • attemptsCount, the number of attempts to try (default 2)

  • isRequired, if false after number of attempts user can skip this step (default true)

Output

Response struct with person's photo and isLive flag

public struct Response {
	public let image: UIImage?
	public let isLive: Bool
	public let guid: String?
}

Last updated