Instructions to use mdevst/trocr-large-handwritten with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mdevst/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="mdevst/trocr-large-handwritten")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("mdevst/trocr-large-handwritten") model = AutoModelForMultimodalLM.from_pretrained("mdevst/trocr-large-handwritten", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Rename onnx/encoder_model_fp16.onnx to onnx/encoder_model.onnx
Verified signature47eee9d -
Rename onnx/decoder_with_past_model_fp16.onnx to onnx/decoder_with_past_model.onnx
Verified signature6eaa254 -
Rename onnx/decoder_model_merged_fp16.onnx to onnx/decoder_model_merged.onnx
Verified signatureefb4306 -
Rename onnx/decoder_model_fp16.onnx to onnx/decoder_model.onnx
Verified signature047b893 -
Rename onnx/decoder_model.onnx to onnx/decoder_model_fp16.onnx
Verified signaturea63f828 -
Rename onnx/decoder_with_past_model.onnx to onnx/decoder_with_past_model_fp16.onnx
Verified signaturea980d39 -
Rename onnx/decoder_model_merged.onnx to onnx/decoder_model_merged_fp16.onnx
Verified signatureda58c75 -
Rename onnx/encoder_model.onnx to onnx/encoder_model_fp16.onnx
Verified signatureb356039 -
Delete encoder_model.onnx
Verified signature880f606 -
Delete decoder_with_past_model.onnx
Verified signature8f122fb -
Delete decoder_model_merged.onnx
Verified signature5feb30a -
Delete decoder_model.onnx
Verified signature6072300 -
Upload folder using huggingface_hub
Verified signature794eab5 -
Create preprocessor_config.json
Verified signature50345a7 -
Upload folder using huggingface_hub
Verified signaturee15c6fb -
Create README.md
Verified signature# TrOCR Large Handwritten - ONNX This is an ONNX conversion of Microsoft's [trocr-large-handwritten](https://huggingface.co/microsoft/trocr-large-handwritten) model, optimized for web deployment and edge inference. ## 📝 Model Description **TrOCR (Transformer-based Optical Character Recognition)** is a state-of-the-art model for handwritten text recognition. This ONNX version enables: - ⚡ **Web deployment** with [Transformers.js](https://huggingface.co/docs/transformers.js) - 🚀 **Edge inference** with ONNX Runtime - 📱 **Cross-platform** compatibility (Web, Node.js, Mobile) ## 🔧 Usage ### Web (Transformers.js) ```javascript import { pipeline } from '@huggingface/transformers'; const captioner = await pipeline('image-to-text', 'mdevst/trocr-large-handwritten'); // Use with image const result = await captioner('path/to/handwritten/image.jpg'); console.log(result[0].generated_text); ``` ### Node.js (ONNX Runtime) ```javascript const ort = require('onnxruntime-node'); // Load…0dbca46 -
initial commit
Verified signatureda308bd