Driver License V1

Sample Code:

class DriverLicenseV1(raw_prediction)

Driver License API version 1 inference prediction.

static get_endpoint_info(klass)

Retrives the endpoint information for an Inference.

Should never retrieve info for CustomV1, as a custom endpoint should be created to use CustomV1.

Parameters:

klass (Type[Inference]) – product subclass to access endpoint information.

Return type:

Dict[str, str]

endpoint_name: Optional[str] = 'driver_license'

Name of the endpoint.

endpoint_version: Optional[str] = '1'

Version of the endpoint.

is_rotation_applied: Optional[bool]

Whether the document has had any rotation applied to it.

page_id: Optional[int]

Optional page id for page-level predictions.

pages: List[Page[DriverLicenseV1Document]]

Page-level prediction(s).

prediction: DriverLicenseV1Document

Document-level prediction.

product: Product

Name and version of a given product, as sent back by the API.

class DriverLicenseV1Document(raw_prediction, page_id=None)

Driver License API version 1.0 document data.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

category: StringField

The category or class of the driver license.

country_code: StringField

The alpha-3 ISO 3166 code of the country where the driver license was issued.

date_of_birth: DateField

The date of birth of the driver license holder.

dd_number: StringField

The DD number of the driver license.

expiry_date: DateField

The expiry date of the driver license.

first_name: StringField

The first name of the driver license holder.

id: StringField

The unique identifier of the driver license.

issued_date: DateField

The date when the driver license was issued.

issuing_authority: StringField

The authority that issued the driver license.

last_name: StringField

The last name of the driver license holder.

mrz: StringField

The Machine Readable Zone (MRZ) of the driver license.

place_of_birth: StringField

The place of birth of the driver license holder.

state: StringField

Second part of the ISO 3166-2 code, consisting of two letters indicating the US State.