Driver License V1

Sample Code:

from mindee import Client, PredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key")

# Load a file from disk
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")

# Load a file from disk and parse it.
# The endpoint name must be specified since it cannot be determined from the class.
result: PredictResponse = mindee_client.parse(product.us.DriverLicenseV1, input_doc)

# Print a summary of the API result
print(result.document)

# Print the document-level summary
# print(result.document.inference.prediction)
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] = 'us_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[DriverLicenseV1Page]]

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.1 document data.

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

  • page_id (Optional[int]) –

address: StringField

US driver license holders address

date_of_birth: DateField

US driver license holders date of birth

dd_number: StringField

Document Discriminator Number of the US Driver License

dl_class: StringField

US driver license holders class

driver_license_id: StringField

ID number of the US Driver License.

endorsements: StringField

US driver license holders endorsements

expiry_date: DateField

Date on which the documents expires.

eye_color: StringField

US driver license holders eye colour

first_name: StringField

US driver license holders first name(s)

hair_color: StringField

US driver license holders hair colour

height: StringField

US driver license holders hight

issued_date: DateField

Date on which the documents was issued.

last_name: StringField

US driver license holders last name

restrictions: StringField

US driver license holders restrictions

sex: StringField

US driver license holders gender

state: StringField

US State

weight: StringField

US driver license holders weight

class DriverLicenseV1Page(raw_prediction, page_id=None)

Driver License API version 1.1 page data.

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

  • page_id (Optional[int]) –

address: StringField

US driver license holders address

date_of_birth: DateField

US driver license holders date of birth

dd_number: StringField

Document Discriminator Number of the US Driver License

dl_class: StringField

US driver license holders class

driver_license_id: StringField

ID number of the US Driver License.

endorsements: StringField

US driver license holders endorsements

expiry_date: DateField

Date on which the documents expires.

eye_color: StringField

US driver license holders eye colour

first_name: StringField

US driver license holders first name(s)

hair_color: StringField

US driver license holders hair colour

height: StringField

US driver license holders hight

issued_date: DateField

Date on which the documents was issued.

last_name: StringField

US driver license holders last name

photo: PositionField

Has a photo of the US driver license holder

restrictions: StringField

US driver license holders restrictions

sex: StringField

US driver license holders gender

signature: PositionField

Has a signature of the US driver license holder

state: StringField

US State

weight: StringField

US driver license holders weight