Views
No views yet
Input Image → CNN (7 layers) → BiLSTM (2 layers) → CTC Decoder → Text Outputpip install torch torchvision pillow1import torch
2from PIL import Image
3from inference import ManuscriptOCR
4
5# Load model
6model = ManuscriptOCR(model_path='best_model.pth')
7
8# Predict on image
9text = model.predict('path/to/manuscript.jpg')
10print(f"Recognized Text: {text}")1# Process multiple images
2images = ['manuscript1.jpg', 'manuscript2.jpg', 'manuscript3.jpg']
3results = [model.predict(img) for img in images]
4
5for img, text in zip(images, results):
6 print(f"{img}: {text}")| Metric | Train | Validation | Test |
|---|---|---|---|
| Loss | 0.0234 | 0.0187 | 0.0165 |
| CER (%) | 0.58 | 0.61 | 0.61 |
| WER (%) | 1.42 | 1.51 | 1.49 |
| Accuracy (%) | 98.51 | 98.49 | 98.52 |
1@misc{manuscript-ocr-2025,
2 author = {Shubham Patel},
3 title = {Ancient Manuscript OCR using CRNN},
4 year = {2025},
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/cosmicshubham/ancient-manuscript-ocr}
7}