gcloud alpha ml vision detect-document

NAME
gcloud alpha ml vision detect-document - detect dense text in an image
SYNOPSIS
gcloud alpha ml vision detect-documentIMAGE_PATH[--language-hints=[LANGUAGE_HINTS,…]][--model-version=MODEL_VERSION; default="builtin/stable"][GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) Detect dense text in an image, such as books and researchreports.

Google Cloud Vision uses OCR (Optical Character Recognition) to analyze text.This is a premium feature for dense text such as books, research reports, andPDFs. To detect small amounts of text such as on signs, usedetect-text instead. For more information on this feature, see theGoogle Cloud Vision documentation athttps://cloud.google.com/vision/docs/.

Language hints can be provided to Google Cloud Vision API. In most cases, anempty value yields the best results since it enables automatic languagedetection. For languages based on the Latin alphabet, settinglanguage_hints is not needed. Text detection returns an error ifone or more of the specified languages is not one of the supported languages.(See https://cloud.google.com/vision/docs/languages.) To provide language hintsrun:

gcloudalphamlvisiondetect-document--language-hintsja,ko
EXAMPLES
To detect dense text in image 'gs://my_bucket/input_file':
gcloudalphamlvisiondetect-documentgs://my_bucket/input_file
POSITIONAL ARGUMENTS
IMAGE_PATH
Path to the image to be analyzed. This can be either a local path or a URL. Ifyou provide a local file, the contents will be sent directly to Google CloudVision. If you provide a URL, it must be in Google Cloud Storage format(gs://bucket/object) or an HTTP URL (http://... orhttps://…)
FLAGS
--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 mustbe one of:builtin/latest,builtin/stable.
GCLOUD WIDE FLAGS
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.

API REFERENCE
This command uses thevision/v1 API. The full documentation forthis API can be found at:https://cloud.google.com/vision/
NOTES
This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudmlvisiondetect-document
gcloudbetamlvisiondetect-document

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-07 UTC.