Asset Ocr Response Dto
immichpy.client.generated.models.asset_ocr_response_dto.AssetOcrResponseDto
pydantic-model
Bases: BaseModel
AssetOcrResponseDto
Show JSON schema:
{
"description": "AssetOcrResponseDto",
"properties": {
"assetId": {
"format": "uuid",
"title": "Assetid",
"type": "string"
},
"boxScore": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
}
],
"description": "Confidence score for text detection box",
"title": "Boxscore"
},
"id": {
"format": "uuid",
"title": "Id",
"type": "string"
},
"text": {
"description": "Recognized text",
"title": "Text",
"type": "string"
},
"textScore": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
}
],
"description": "Confidence score for text recognition",
"title": "Textscore"
},
"x1": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
}
],
"description": "Normalized x coordinate of box corner 1 (0-1)",
"title": "X1"
},
"x2": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
}
],
"description": "Normalized x coordinate of box corner 2 (0-1)",
"title": "X2"
},
"x3": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
}
],
"description": "Normalized x coordinate of box corner 3 (0-1)",
"title": "X3"
},
"x4": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
}
],
"description": "Normalized x coordinate of box corner 4 (0-1)",
"title": "X4"
},
"y1": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
}
],
"description": "Normalized y coordinate of box corner 1 (0-1)",
"title": "Y1"
},
"y2": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
}
],
"description": "Normalized y coordinate of box corner 2 (0-1)",
"title": "Y2"
},
"y3": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
}
],
"description": "Normalized y coordinate of box corner 3 (0-1)",
"title": "Y3"
},
"y4": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
}
],
"description": "Normalized y coordinate of box corner 4 (0-1)",
"title": "Y4"
}
},
"required": [
"assetId",
"boxScore",
"id",
"text",
"textScore",
"x1",
"x2",
"x3",
"x4",
"y1",
"y2",
"y3",
"y4"
],
"title": "AssetOcrResponseDto",
"type": "object"
}
Config:
validate_by_name:Truevalidate_by_alias:Truevalidate_assignment:Trueprotected_namespaces:()
Fields:
-
asset_id(UUID) -
box_score(Union[StrictFloat, StrictInt]) -
id(UUID) -
text(StrictStr) -
text_score(Union[StrictFloat, StrictInt]) -
x1(Union[StrictFloat, StrictInt]) -
x2(Union[StrictFloat, StrictInt]) -
x3(Union[StrictFloat, StrictInt]) -
x4(Union[StrictFloat, StrictInt]) -
y1(Union[StrictFloat, StrictInt]) -
y2(Union[StrictFloat, StrictInt]) -
y3(Union[StrictFloat, StrictInt]) -
y4(Union[StrictFloat, StrictInt])
Validators:
-
asset_id_validate_regular_expression→asset_id -
id_validate_regular_expression→id
box_score
pydantic-field
box_score: Union[StrictFloat, StrictInt]
Confidence score for text detection box
text
pydantic-field
text: StrictStr
Recognized text
text_score
pydantic-field
text_score: Union[StrictFloat, StrictInt]
Confidence score for text recognition
x1
pydantic-field
x1: Union[StrictFloat, StrictInt]
Normalized x coordinate of box corner 1 (0-1)
x2
pydantic-field
x2: Union[StrictFloat, StrictInt]
Normalized x coordinate of box corner 2 (0-1)
x3
pydantic-field
x3: Union[StrictFloat, StrictInt]
Normalized x coordinate of box corner 3 (0-1)
x4
pydantic-field
x4: Union[StrictFloat, StrictInt]
Normalized x coordinate of box corner 4 (0-1)
y1
pydantic-field
y1: Union[StrictFloat, StrictInt]
Normalized y coordinate of box corner 1 (0-1)
y2
pydantic-field
y2: Union[StrictFloat, StrictInt]
Normalized y coordinate of box corner 2 (0-1)
y3
pydantic-field
y3: Union[StrictFloat, StrictInt]
Normalized y coordinate of box corner 3 (0-1)
y4
pydantic-field
y4: Union[StrictFloat, StrictInt]
Normalized y coordinate of box corner 4 (0-1)
asset_id_validate_regular_expression
pydantic-validator
asset_id_validate_regular_expression(value)
Validates the regular expression
Source code in immichpy/client/generated/models/asset_ocr_response_dto.py
89 90 91 92 93 94 95 96 97 98 99 | |
from_dict
classmethod
from_dict(obj: Optional[Dict[str, Any]]) -> Optional[Self]
Create an instance of AssetOcrResponseDto from a dict
Source code in immichpy/client/generated/models/asset_ocr_response_dto.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |
from_json
classmethod
from_json(json_str: str) -> Optional[Self]
Create an instance of AssetOcrResponseDto from a JSON string
Source code in immichpy/client/generated/models/asset_ocr_response_dto.py
128 129 130 131 | |
id_validate_regular_expression
pydantic-validator
id_validate_regular_expression(value)
Validates the regular expression
Source code in immichpy/client/generated/models/asset_ocr_response_dto.py
101 102 103 104 105 106 107 108 109 110 111 | |
to_dict
to_dict() -> Dict[str, Any]
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True):
Noneis only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNoneare ignored.
Source code in immichpy/client/generated/models/asset_ocr_response_dto.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |
to_json
to_json() -> str
Returns the JSON representation of the model using alias
Source code in immichpy/client/generated/models/asset_ocr_response_dto.py
124 125 126 | |
to_str
to_str() -> str
Returns the string representation of the model using alias
Source code in immichpy/client/generated/models/asset_ocr_response_dto.py
120 121 122 | |