2

I'm trying to find any information on the advanced_ocr_options[] under textdetectionparams of ImageContext.

https://cloud.google.com/vision/docs/reference/rpc/google.cloud.vision.v1#textdetectionparams

Google has several pages in their documentation which talk about these advanced features but I cannot find a list of them anywhere.

The following line runs without errors. But without the list of advanced ocr options I do not know what it means or what it may be doing.

response = client.text_detection(image=image, image_context={"text_detection_params": {"advanced_ocr_options": ["12"]}}
double-beep
  • 5,031
  • 17
  • 33
  • 41
  • I'm looking for this as well, the closes I've found is a method to request options... https://cloud.google.com/java/docs/reference/google-cloud-vision/latest/com.google.cloud.vision.v1.TextDetectionParams.Builder#com_google_cloud_vision_v1_TextDetectionParams_Builder_getAdvancedOcrOptions_int_ – Seth McClaine Nov 29 '22 at 17:15

1 Answers1

0

I clarified this with the product development team.

advanced_ocr_options supports the same values as Document AI, which shows the supported values in this documentation:

https://cloud.google.com/document-ai/docs/reference/rest/v1beta3/ProcessOptions#OcrConfig.FIELDS.advanced_ocr_options

  • legacy_layout: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.

There is work in progress to add this to the Vision API docs as well.

Holt Skinner
  • 1,692
  • 1
  • 8
  • 21