CLAMS docTR Wrapper (v1.0)
About this version
- Submitter: keighrim
- Submission Time: 2024-04-22T18:46:07+00:00
- Prebuilt Container Image: ghcr.io/clamsproject/app-doctr-wrapper:v1.0
-
Release Notes
(no notes provided by the developer)
About this app (See raw metadata.json)
CLAMS app wraps the docTR, End-to-End OCR model, available at https://pypi.org/project/python-doctr . The model is capable of detecting text regions in the input image and recognizing text in the regions. The text-localized regions are organized hierarchically by the model into “pages” > “blocks” > “lines” > “words”, and this CLAMS app translates them into TextDocument
, Paragraphs
, Sentence
, and Token
annotations to represent recognized text contents, then aligns them to BoundingBox
annotations that represent the detected geometries. This hierarchical structure is also represented in the TextDocument
annotation output as two newlines (\n\n
) between “paragraphs”, one newline (\n
) between the “lines”, and one space (“ “) between the “words”. For the text recognition, the model is internally configured to use the “parseq” recognition model, and only works with English text at the moment.
- App ID: http://apps.clams.ai/doctr-wrapper/v1.0
- App License: Apache 2.0
- Source Repository: https://github.com/clamsproject/app-doctr-wrapper (source tree of the submitted version)
- Analyzer Version: 0.8.1
- Analyzer License: Apache 2.0
Inputs
(Note: “*” as a property value means that the property is required but can be any value.)
- http://mmif.clams.ai/vocabulary/VideoDocument/v1 (required) (any properties)
- http://mmif.clams.ai/vocabulary/TimeFrame/v5 (required)
- representatives = “?”
Configurable Parameters
(Note: Multivalued means the parameter can have one or more values.)
Name | Description | Type | Multivalued | Default | Choices |
---|---|---|---|---|---|
tfLabel | The label of the TimeFrame annotation to be processed. By default ([] ), all TimeFrame annotations will be processed, regardless of their label property values. |
string | Y | [] | |
pretty | The JSON body of the HTTP response will be re-formatted with 2-space indentation | boolean | N | false | false , true |
Outputs
(Note: “*” as a property value means that the property is required but can be any value.)
(Note: Not all output annotations are always generated.)
- http://mmif.clams.ai/vocabulary/TextDocument/v1
- @lang = “en”
- http://vocab.lappsgrid.org/Token
- text = “*”
- word = “*”
- http://vocab.lappsgrid.org/Sentence
- text = “*”
- http://vocab.lappsgrid.org/Paragraph
- text = “*”
- http://mmif.clams.ai/vocabulary/Alignment/v1 (any properties)
- http://mmif.clams.ai/vocabulary/BoundingBox/v4
- label = “text”