All models

got_ocr2 (image text to text)

GOT-OCR2, an end-to-end OCR model that reads text, formulas, tables and more from images.

Documents and OCR · 133 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (94 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
59.9K
Operations
133
Framework
PyTorch
Recurrent
Yes
Source
transformers 5.18.0
Name in source
got_ocr2:image-text-to-text
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m11891
Graph hash
9982040b9fdf119a509ffa87055422c0ef0663073280eb713bd1df460c6bf36c
Skeleton hash
ef9395eb7399cee090189e5bf563e86380d548f39f0393f30f18756f9f9eb4f7
Architecture hash
c9b070d392c386add8ee81a7ca0254ecb7915dc4d82b553132cedefd6be599d9
Diagram SHA-256
8e515888063c4232eb77a445d2f03973c23ad71e401da635001798ba17f2a2d2
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

menagerie.classics.dbnet_mobilenetv3:build_abinet_vision_language: build({})

What it is

GOT-OCR2 is an OCR model, one that reads text out of images, and it covers a wide range of tasks from plain document and scene text to tables, charts, mathematical formulas and sheet music. It was proposed in the paper "General OCR Theory: Towards OCR-2.0 via a Unified End-to-end Model". The paper describes GOT as an end-to-end model with 580M parameters, made of a high-compression encoder and a long-contexts decoder.

In the Transformers library the model outputs plain text only, and other packages can process that output further to render the desired format. A user can limit recognition to one region by giving the coordinates or the color of its bounding box. The model supports a 1024×1024 input resolution, and for images with unusual aspect ratios it can crop the image into patches, process them all at once and merge the results. Several pages can also be processed at once, with the output being one continuous text.

Key idea. The GOT paper proposes a single end-to-end model, made of a high-compression encoder and a long-contexts decoder, to handle many kinds of OCR tasks.

  • got-ocr2
  • got ocr 2.0
  • got
  • general ocr theory
  • ocr-2.0
  • ocr
  • document ocr
  • scene text ocr
  • formula recognition
  • image-text-to-text

AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.