Passport - India V1
Sample Code:
- class IndianPassportV1(raw_prediction)
Passport - India 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] = 'ind_passport'
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
[IndianPassportV1Document
]] Page-level prediction(s).
-
prediction:
IndianPassportV1Document
Document-level prediction.
- product: Product
Name and version of a given product, as sent back by the API.
- class IndianPassportV1Document(raw_prediction, page_id=None)
Passport - India API version 1.0 document data.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
-
address1:
StringField
The first line of the address of the passport holder.
-
address2:
StringField
The second line of the address of the passport holder.
-
address3:
StringField
The third line of the address of the passport holder.
-
birth_place:
StringField
The birth place of the passport holder.
-
country:
StringField
ISO 3166-1 alpha-3 country code (3 letters format).
-
file_number:
StringField
The file number of the passport document.
-
gender:
ClassificationField
The gender of the passport holder.
-
given_names:
StringField
The given names of the passport holder.
-
id_number:
StringField
The identification number of the passport document.
-
issuance_place:
StringField
The place where the passport was issued.
-
legal_guardian:
StringField
The name of the legal guardian of the passport holder (if applicable).
-
mrz1:
StringField
The first line of the machine-readable zone (MRZ) of the passport document.
-
mrz2:
StringField
The second line of the machine-readable zone (MRZ) of the passport document.
-
name_of_mother:
StringField
The name of the mother of the passport holder.
-
name_of_spouse:
StringField
The name of the spouse of the passport holder (if applicable).
-
old_passport_date_of_issue:
DateField
The date of issue of the old passport (if applicable), ISO format: YYYY-MM-DD.
-
old_passport_number:
StringField
The number of the old passport (if applicable).
-
old_passport_place_of_issue:
StringField
The place of issue of the old passport (if applicable).
-
page_number:
ClassificationField
The page number of the passport document.
-
surname:
StringField
The surname of the passport holder.