Skip to content

docs: add inference notebook for OCR‑1 (closes #58)#119

Open
abhiram123467 wants to merge 6 commits intohumanai-foundation:mainfrom
abhiram123467:docs/add-ocr1-inference-notebook
Open

docs: add inference notebook for OCR‑1 (closes #58)#119
abhiram123467 wants to merge 6 commits intohumanai-foundation:mainfrom
abhiram123467:docs/add-ocr1-inference-notebook

Conversation

@abhiram123467
Copy link
Copy Markdown

What this PR does

Adds a clean inference notebook for the OCR‑1 CRNN model under examples/ocr1_inference.ipynb.

The notebook includes:

  • Model loading
  • Image preprocessing
  • Greedy decoding
  • Optional Gemini LLM post‑processing (if available)
  • Visualisation of the input image

This makes it easy for new users to test the OCR pipeline without running training code.

Closes #58

Adds Setup and How to Run sections to README.md with clear instructions for new contributors.
Updated ResNet18 and ResNet34 to classify 3 classes instead of 1000. Added fully connected layers and flattening before classification.
)

This module provides LLM post-processing for OCR output, improving accuracy by correcting errors in historical Spanish documents. It includes functions for computing character error rates, cleaning raw OCR text, and processing batches of OCR strings.
This notebook demonstrates loading a trained CRNN model for OCR inference on historical documents, with optional LLM correction using Gemini.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant