Skip to content

clamsproject/app-doctr-wrapper

Repository files navigation

docTR-wrapper

Description

Wrapper for docTR end-to-end text detection and recognition.

Input

The wrapper takes a VideoDocument with TimeFrame annotations with label property (for example, from SWT app that classifies scenes). See input section of the app metadata for more details.

docTR Structured Output

From the docTR documentation

The docTR model returns a Document object

Here is the typical Document layout:

Document(
  (pages): [Page(
    dimensions=(340, 600)
    (blocks): [Block(
      (lines): [Line(
        (words): [
          Word(value='No.', confidence=0.91),
          Word(value='RECEIPT', confidence=0.99),
          Word(value='DATE', confidence=0.96),
        ]
      )]
      (artefacts): []
    )]
  )]
)

The docTR wrapper preserves this structured information in the output MMIF by creating lapps Paragraph Sentence and Token annotations corresponding to the Block, Line, and Word from the docTR output.

User instruction

General user instructions for CLAMS apps are available at CLAMS Apps documentation.

Below is a list of additional information specific to this app.

System requirements

  • Requires mmif-python[cv] for the VideoDocument helper functions
  • Requires GPU to run at a reasonable speed

Configurable runtime parameter

For the full list of parameters, please refer to the app metadata from the CLAMS App Directory or the metadata.py file in this repository.

About

Clams wrapper for docTR end to end OCR

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •