microsoft / trocr-large-handwritten

huggingface.co
Total runs: 65.5K
24-hour runs: 0
7-day runs: -5.0K
30-day runs: 25.4K
Model's Last Updated: May 28 2024
image-to-text

Introduction of trocr-large-handwritten

Model Details of trocr-large-handwritten

TrOCR (large-sized model, fine-tuned on IAM)

TrOCR model fine-tuned on the IAM dataset . It was introduced in the paper TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models by Li et al. and first released in this repository .

Disclaimer: The team releasing TrOCR did not write a model card for this model so this model card has been written by the Hugging Face team.

Model description

The TrOCR model is an encoder-decoder model, consisting of an image Transformer as encoder, and a text Transformer as decoder. The image encoder was initialized from the weights of BEiT, while the text decoder was initialized from the weights of RoBERTa.

Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds absolute position embeddings before feeding the sequence to the layers of the Transformer encoder. Next, the Transformer text decoder autoregressively generates tokens.

Intended uses & limitations

You can use the raw model for optical character recognition (OCR) on single text-line images. See the model hub to look for fine-tuned versions on a task that interests you.

How to use

Here is how to use this model in PyTorch:

from transformers import TrOCRProcessor, VisionEncoderDecoderModel
from PIL import Image
import requests

# load image from the IAM database
url = 'https://fki.tic.heia-fr.ch/static/img/a01-122-02-00.jpg'
image = Image.open(requests.get(url, stream=True).raw).convert("RGB")

processor = TrOCRProcessor.from_pretrained('microsoft/trocr-large-handwritten')
model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-large-handwritten')
pixel_values = processor(images=image, return_tensors="pt").pixel_values

generated_ids = model.generate(pixel_values)
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
BibTeX entry and citation info
@misc{li2021trocr,
      title={TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models}, 
      author={Minghao Li and Tengchao Lv and Lei Cui and Yijuan Lu and Dinei Florencio and Cha Zhang and Zhoujun Li and Furu Wei},
      year={2021},
      eprint={2109.10282},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Runs of microsoft trocr-large-handwritten on huggingface.co

65.5K
Total runs
0
24-hour runs
-3.8K
3-day runs
-5.0K
7-day runs
25.4K
30-day runs

More Information About trocr-large-handwritten huggingface.co Model

trocr-large-handwritten huggingface.co

trocr-large-handwritten huggingface.co is an AI model on huggingface.co that provides trocr-large-handwritten's model effect (), which can be used instantly with this microsoft trocr-large-handwritten model. huggingface.co supports a free trial of the trocr-large-handwritten model, and also provides paid use of the trocr-large-handwritten. Support call trocr-large-handwritten model through api, including Node.js, Python, http.

trocr-large-handwritten huggingface.co Url

https://huggingface.co/microsoft/trocr-large-handwritten

microsoft trocr-large-handwritten online free

trocr-large-handwritten huggingface.co is an online trial and call api platform, which integrates trocr-large-handwritten's modeling effects, including api services, and provides a free online trial of trocr-large-handwritten, you can try trocr-large-handwritten online for free by clicking the link below.

microsoft trocr-large-handwritten online free url in huggingface.co:

https://huggingface.co/microsoft/trocr-large-handwritten

trocr-large-handwritten install

trocr-large-handwritten is an open source model from GitHub that offers a free installation service, and any user can find trocr-large-handwritten on GitHub to install. At the same time, huggingface.co provides the effect of trocr-large-handwritten install, users can directly use trocr-large-handwritten installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

trocr-large-handwritten install url in huggingface.co:

https://huggingface.co/microsoft/trocr-large-handwritten

Url of trocr-large-handwritten

trocr-large-handwritten huggingface.co Url

Provider of trocr-large-handwritten huggingface.co

microsoft
ORGANIZATIONS

Other API from microsoft

huggingface.co

Total runs: 19.4M
Run Growth: 12.4M
Growth Rate: 64.13%
Updated: February 14 2024
huggingface.co

Total runs: 5.3M
Run Growth: -300.5K
Growth Rate: -5.71%
Updated: September 26 2022
huggingface.co

Total runs: 2.1M
Run Growth: 281.5K
Growth Rate: 13.71%
Updated: April 24 2023
huggingface.co

Total runs: 859.1K
Run Growth: 683.3K
Growth Rate: 79.75%
Updated: February 03 2022
huggingface.co

Total runs: 528.5K
Run Growth: 133.9K
Growth Rate: 25.34%
Updated: February 28 2023
huggingface.co

Total runs: 230.0K
Run Growth: -46.8K
Growth Rate: -20.36%
Updated: April 30 2024
huggingface.co

Total runs: 209.9K
Run Growth: -51.4K
Growth Rate: -24.49%
Updated: August 19 2024
huggingface.co

Total runs: 135.4K
Run Growth: 25.1K
Growth Rate: 17.89%
Updated: November 08 2023
huggingface.co

Total runs: 131.5K
Run Growth: -9.1K
Growth Rate: -6.90%
Updated: April 30 2024
huggingface.co

Total runs: 107.7K
Run Growth: 52.9K
Growth Rate: 49.08%
Updated: April 08 2024
huggingface.co

Total runs: 75.5K
Run Growth: 41.4K
Growth Rate: 54.85%
Updated: September 18 2023
huggingface.co

Total runs: 49.0K
Run Growth: -23.7K
Growth Rate: -48.48%
Updated: February 03 2023
huggingface.co

Total runs: 44.3K
Run Growth: -651.9K
Growth Rate: -1470.37%
Updated: September 26 2022
huggingface.co

Total runs: 27.4K
Run Growth: 13.3K
Growth Rate: 48.68%
Updated: February 29 2024
huggingface.co

Total runs: 16.8K
Run Growth: 198
Growth Rate: 1.18%
Updated: November 23 2023
huggingface.co

Total runs: 11.6K
Run Growth: 1.1K
Growth Rate: 9.72%
Updated: December 23 2021
huggingface.co

Total runs: 10.6K
Run Growth: 6.6K
Growth Rate: 62.51%
Updated: June 27 2023
huggingface.co

Total runs: 10.1K
Run Growth: 5.0K
Growth Rate: 49.77%
Updated: July 02 2022
huggingface.co

Total runs: 9.5K
Run Growth: 468
Growth Rate: 4.92%
Updated: April 30 2024
huggingface.co

Total runs: 9.3K
Run Growth: 2.8K
Growth Rate: 30.09%
Updated: November 23 2023
huggingface.co

Total runs: 6.6K
Run Growth: 3.4K
Growth Rate: 51.46%
Updated: August 28 2024