Hi,
I have added the options in features as below where we add the model.
img_requests.append({
'image': {'content': ctxt},
'features': [{
'type': 'DOCUMENT_TEXT_DETECTION',
'maxResults': 1,
'advanced_ocr_options':'legacy_layout',
'model':'builtin/stable',
}]
if i change the model to builtin/legacy and remove the advanced_ocr_options it is working fine.Am i adding the option in wrong place?
I am getting the below error if i try to add the advanced_ocr_options in features:
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"advanced_ocr_options\" at 'requests[0].features[0]': Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "
type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "requests[0].features[0]",
"description": "Invalid JSON payload received. Unknown name \"advanced_ocr_options\" at 'requests[0].features[0]': Cannot find field."
}
]
}
]
}
}
with regards,
Jana