OCR Model¶
Version v1
¶
Retrieve the characters in an image using Optical Character Recognition (OCR).
This block returns the text within an image.
You may want to use this block in combination with a detections-based block (i.e. ObjectDetectionBlock). An object detection model could isolate specific regions from an image (i.e. a shipping container ID in a logistics use case) for further processing. You can then use a DynamicCropBlock to crop the region of interest before running OCR.
Using a detections model then cropping detections allows you to isolate your analysis on particular regions of an image.
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/ocr_model@v1
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
Unique name of step in workflows. | ❌ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow
runtime. See Bindings for more info.
Available Connections¶
Check what blocks you can connect to OCR Model
in version v1
.
- inputs:
Label Visualization
,Crop Visualization
,Mask Visualization
,Blur Visualization
,Image Contours
,Bounding Box Visualization
,Image Convert Grayscale
,Camera Focus
,Dot Visualization
,Color Visualization
,Corner Visualization
,Circle Visualization
,Perspective Correction
,Image Slicer
,Triangle Visualization
,Relative Static Crop
,Absolute Static Crop
,Halo Visualization
,Background Color Visualization
,SIFT
,Pixelate Visualization
,Polygon Visualization
,Dynamic Crop
,Image Blur
,Ellipse Visualization
,Image Threshold
- outputs:
Roboflow Custom Metadata
The available connections depend on its binding kinds. Check what binding kinds
OCR Model
in version v1
has.
Bindings
-
input
images
(image
): The image to infer on.
-
output
result
(string
): String value.parent_id
(parent_id
): Identifier of parent for step output.root_parent_id
(parent_id
): Identifier of parent for step output.prediction_type
(prediction_type
): String value with type of prediction.
Example JSON definition of step OCR Model
in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/ocr_model@v1",
"images": "$inputs.image"
}