How to use from the
Use from the
Transformers library
# 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, AutoModelForImageTextToText

processor = AutoProcessor.from_pretrained("Emeritus-21/Finetuned-full-HTR-model")
model = AutoModelForImageTextToText.from_pretrained("Emeritus-21/Finetuned-full-HTR-model")
Quick Links

πŸ–‹οΈ 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)

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)
Downloads last month
19
Safetensors
Model size
2B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using Emeritus-21/Finetuned-full-HTR-model 1