Image-to-Text
Transformers
Safetensors
English
qwen2_vl
image-text-to-text
handwriting-recognition
vision2seq
qwen
htr
tensorflow
text-generation-inference
Instructions to use Emeritus-21/Finetuned-full-HTR-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Emeritus-21/Finetuned-full-HTR-model 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="Emeritus-21/Finetuned-full-HTR-model")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Emeritus-21/Finetuned-full-HTR-model") model = AutoModelForMultimodalLM.from_pretrained("Emeritus-21/Finetuned-full-HTR-model") - Notebooks
- Google Colab
- Kaggle
| language: en | |
| tags: | |
| - handwriting-recognition | |
| - vision2seq | |
| - qwen | |
| - image-to-text | |
| - htr | |
| - tensorflow | |
| license: mit | |
| pipeline_tag: image-to-text | |
| library_name: transformers | |
| # ποΈ Finetuned Full HTR Model (Qwen-based) | |
| This is a **Qwen Vision2Seq** model fine-tuned for **Handwritten Text Recognition (HTR)**. It reads handwritten text from images and generates clean, editable output using advanced transformer-based image-to-text techniques. | |
| ## π Model Summary | |
| - **Model Architecture**: Qwen-Vision2Seq (Image encoder + Language decoder) | |
| - **Framework**: TensorFlow (via Hugging Face Transformers) | |
| - **Input**: Handwritten text image | |
| - **Output**: Recognized plain text | |
| ## π§ How to Use (with Hugging Face Transformers) | |
| ```python | |
| from transformers import AutoProcessor, AutoModelForVision2Seq | |
| from PIL import Image | |
| import torch | |
| # Load processor and model | |
| processor = AutoProcessor.from_pretrained("Emeritus-21/Finetuned-full-HTR-model", trust_remote_code=True) | |
| model = AutoModelForVision2Seq.from_pretrained("Emeritus-21/Finetuned-full-HTR-model", trust_remote_code=True) | |
| device = "cuda" if torch.cuda.is_available() else "cpu" | |
| model = model.to(device) | |
| # Load and process image | |
| image = Image.open("your_image.jpg").convert("RGB") | |
| inputs = processor(images=image, return_tensors="pt").to(device) | |
| # Generate prediction | |
| generated_ids = model.generate(**inputs) | |
| recognized_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0] | |
| print("π Recognized Text:", recognized_text) | |