Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

microsoft
/
trocr-large-handwritten

Image-to-Text
Transformers
PyTorch
vision-encoder-decoder
image-text-to-text
trocr
Model card Files Files and versions
xet
Community
12

Instructions to use microsoft/trocr-large-handwritten with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use microsoft/trocr-large-handwritten with Transformers:

    # Use a pipeline as a high-level helper
    # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5.
    # You must load the model directly (see below) or downgrade to v4.x with:
    # 'pip install "transformers<5.0.0'
    from transformers import pipeline
    
    pipe = pipeline("image-to-text", model="microsoft/trocr-large-handwritten")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForImageTextToText
    
    tokenizer = AutoTokenizer.from_pretrained("microsoft/trocr-large-handwritten")
    model = AutoModelForImageTextToText.from_pretrained("microsoft/trocr-large-handwritten")
  • Notebooks
  • Google Colab
  • Kaggle
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

add AIBOM

#12 opened 11 months ago by
sabato-nocera

Delete .gitattributes

#11 opened about 1 year ago by
jaunito28

How to Fine-tune TrOCR-large-handwritten on specifique langage

#10 opened over 1 year ago by
GardensOfBabylon29

Adding `safetensors` variant of this model

1
#9 opened almost 2 years ago by
SFconvertbot

ValueError: decoder_start_token_id....

#7 opened about 2 years ago by
Ruzwaahn

Adding `safetensors` variant of this model

#6 opened over 2 years ago by
SFconvertbot

How do I use it for multiple lines of handwritten text?

👍 1
3
#5 opened almost 3 years ago by
abhikatta

Is there a way to get the recognition scores?

1
#4 opened almost 3 years ago by
mfg12

warnings when loading the model

#3 opened about 3 years ago by
chrisxx

Unable to train model: CUDA out of memory

1
#2 opened about 3 years ago by
Pelpuo
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs