Instructions to use microsoft/trocr-base-str with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/trocr-base-str 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-base-str")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("microsoft/trocr-base-str") model = AutoModelForImageTextToText.from_pretrained("microsoft/trocr-base-str") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
| 2 |
tags:
|
| 3 |
- trocr
|
| 4 |
- image-to-text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
---
|
| 6 |
|
| 7 |
# TrOCR (base-sized model, fine-tuned on STR benchmarks)
|
|
|
|
| 2 |
tags:
|
| 3 |
- trocr
|
| 4 |
- image-to-text
|
| 5 |
+
widget:
|
| 6 |
+
- src: https://raw.githubusercontent.com/ku21fan/STR-Fewer-Labels/main/demo_image/1.png
|
| 7 |
+
example_title: Example 1
|
| 8 |
+
- src: https://raw.githubusercontent.com/HCIILAB/Scene-Text-Recognition-Recommendations/main/Dataset_images/LSVT1.jpg
|
| 9 |
+
example_title: Example 2
|
| 10 |
+
- src: https://raw.githubusercontent.com/HCIILAB/Scene-Text-Recognition-Recommendations/main/Dataset_images/ArT2.jpg
|
| 11 |
+
example_title: Example 3
|
| 12 |
---
|
| 13 |
|
| 14 |
# TrOCR (base-sized model, fine-tuned on STR benchmarks)
|