Google Vision OCR
Detect text in images using Google Vision API
Last updated
Was this helpful?
Detect text in images using Google Vision API
Detect text in images using Google Vision OCR.
Supported types of text detection:
text_detection: optimized for areas of text within a larger image.
ocr_text_detection: optimized for dense text documents.
Provide your Google Vision API key or set the value to rf_key:account (or rf_key:user:<id>) to proxy requests through Roboflow's API.
Use the following identifier in step "type" field: roboflow_core/google_vision_ocr@v1 to add the block as a step in your workflow.
Name
Type
Description
Refs
name
str
Enter a unique identifier for this step..
❌
ocr_type
str
Type of OCR to use.
❌
api_key
str
Your Google Vision API key.
✅
language_hints
List[str]
Optional list of language codes to pass to the OCR API. If not provided, the API will attempt to detect the language automatically.If provided, language codes must be supported by the OCR API, visit https://cloud.google.com/vision/docs/languages for list of supported language codes..
❌
The Refs column marks possibility to parametrise the property with dynamic values available in workflow runtime. See Bindings for more info.
requires_internet - air-gapped / offline deployments : This block depends on a service that is not reachable from fully offline / air-gapped deployments.
The available connections depend on its binding kinds. Check what binding kinds Google Vision OCR in version v1 has.
input
image (image): Image to run OCR.
api_key (Union[ROBOFLOW_MANAGED_KEY, secret, string]): Your Google Vision API key.
output
text (string): String value.
language (string): String value.
predictions (object_detection_prediction): Prediction with detected bounding boxes in form of sv.Detections(...) object.
Last updated
Was this helpful?
Was this helpful?
{
"name": "<your_step_name_here>",
"type": "roboflow_core/google_vision_ocr@v1",
"image": "$inputs.image",
"ocr_type": "<block_does_not_provide_example>",
"api_key": "xxx-xxx",
"language_hints": [
"en",
"fr"
]
}