You're looking at a specific version of this model. Jump to the model overview.

mind-ware /dots-ocr-with-confidence:fc9faadd

Input schema

The fields you can use to run this model with an API. If you don’t give a value for a field its default value will be used.

Field Type Default value Description
image
string
Input image for OCR
prompt_mode
None
layout_all
Prompt mode
custom_prompt
string
Custom prompt (for prompt_mode='custom')
bbox
string
Bounding box 'x1,y1,x2,y2' (for prompt_mode='grounding_ocr')
max_tokens
integer
8192

Min: 256

Max: 32768

Max tokens
return_confidence
boolean
False
Return per-word confidence scores
confidence_threshold
number
0.5

Max: 1

Threshold below which words are flagged as low confidence (0-1)
temperature
number
0.1

Max: 2

Sampling temperature (ignored when return_confidence=True)
top_p
number
0.9

Max: 1

Top-p sampling

Output schema

The shape of the response you’ll get when you run this model with an API.

Schema
{'properties': {'avg_confidence': {'nullable': True,
                                   'title': 'Avg Confidence',
                                   'type': 'number'},
                'bbox_used': {'items': {'type': 'integer'},
                              'nullable': True,
                              'title': 'Bbox Used',
                              'type': 'array'},
                'low_confidence_count': {'nullable': True,
                                         'title': 'Low Confidence Count',
                                         'type': 'integer'},
                'prompt_mode': {'nullable': True,
                                'title': 'Prompt Mode',
                                'type': 'string'},
                'text': {'title': 'Text', 'type': 'string'},
                'word_confidences': {'items': {'additionalProperties': True,
                                               'type': 'object'},
                                     'nullable': True,
                                     'title': 'Word Confidences',
                                     'type': 'array'},
                'word_count': {'nullable': True,
                               'title': 'Word Count',
                               'type': 'integer'}},
 'required': ['text'],
 'title': 'Output',
 'type': 'object'}