gcloud beta ml vision detect-document - detect dense text in an image
gcloud beta ml vision detect-document IMAGE_PATH [--language-hints=[LANGUAGE_HINTS,...]] [--model-version=MODEL_VERSION; default="builtin/stable"] [GCLOUD_WIDE_FLAG ...]
(BETA) Detect dense text in an image, such as books and research reports.
Google Cloud Vision uses OCR (Optical Character Recognition) to analyze text. This is a premium feature for dense text such as books, research reports, and PDFs. To detect small amounts of text such as on signs, use detect-text instead. For more information on this feature, see the Google Cloud Vision documentation at https://cloud.google.com/vision/docs/.
Language hints can be provided to Google Cloud Vision API. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting language_hints is not needed. Text detection returns an error if one or more of the specified languages is not one of the supported languages. (See https://cloud.google.com/vision/docs/languages.) To provide language hints run:
$ gcloud beta ml vision detect-document --language-hints ja,ko
To detect dense text in image 'gs://my_bucket/input_file':
$ gcloud beta ml vision detect-document gs://my_bucket/input_file
- IMAGE_PATH
Path to the image to be analyzed. This can be either a local path or a URL. If you provide a local file, the contents will be sent directly to Google Cloud Vision. If you provide a URL, it must be in Google Cloud Storage format (gs://bucket/object) or an HTTP URL (http://... or https://...)
- --language-hints=[LANGUAGE_HINTS,...]
List of languages to use for text detection.
- --model-version=MODEL_VERSION; default="builtin/stable"
Model version to use for the feature. MODEL_VERSION must be one of: builtin/latest, builtin/stable.
These flags are available to all commands: --access-token-file, --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
This command uses the vision/v1 API. The full documentation for this API can be found at: https://cloud.google.com/vision/
This command is currently in beta and might change without notice. These variants are also available:
$ gcloud ml vision detect-document
$ gcloud alpha ml vision detect-document