Built to order

Handwritten Text Recognition using CRNN

This project builds a deep-learning OCR system that transcribes handwritten English text lines from scanned images using a CRNN (CNN feature extractor plus BiLSTM with CTC decoding) trained on the IAM Handwriting Database's 13,353 labeled lines. The web demo lets you upload a scan and watch the transcription appear with per-line confidence, while the training notebook computes Character Error Rate and Word Error Rate on the validation split — a highly demoable sequence-modeling project.

Project cover image for the Handwritten Text Recognition using CRNN project.
More project photos (2)

The problem

Handwriting remains one of the hardest problems in optical character recognition: every writer's slant, stroke width and letter joins differ, which is why off-the-shelf print OCR collapses on cursive notes and answer scripts. Digitizing handwritten pages — notes, forms, exam scripts, historical documents — currently means slow, expensive manual re-typing, because generic OCR tools were built for printed text and fail on variable-width handwritten lines. The core difficulty is sequence modeling: characters are not neatly boxed, so the model must learn where one letter ends and the next begins while reading each line left to right. A CRNN addresses exactly this — a CNN extracts visual features, a bidirectional LSTM reads the sequence with full line context, and CTC decoding produces the character string without needing character-level alignment labels. For students, this is a complete deep-learning pipeline with measurable outcomes: line segmentation, sequence decoding and error-rate metrics that are computed, not claimed.

Frequently asked questions

  1. What is a CRNN and why is it used for handwriting? A Convolutional Recurrent Neural Network combines a CNN (visual feature extraction) with a BiLSTM (sequence context) and CTC decoding, which converts frame predictions into text without needing character-level alignment labels — ideal for variable-width handwritten lines.
  2. What dataset is the model trained on? The IAM Handwriting Database — 13,353 labeled handwritten English text lines — widely used as the standard benchmark for offline handwriting recognition research.
  3. How is the model's performance evaluated? Character Error Rate (CER) and Word Error Rate (WER), computed by the training notebook on the validation split using edit distance at character and word level.
  4. Will it read my own handwriting in the demo? It performs best on neat print-style handwriting similar to the corpus; augmentation improves robustness, but highly idiosyncratic cursive remains a known limitation.
  5. Is this project suitable for a final-year project? Yes. It suits B.E./B.Tech students in Computer Science, AI/ML and Data Science, demonstrating sequence modeling, CTC loss, CER/WER evaluation, data augmentation and a live transcription demo — strong, explainable viva material.
  6. What will I receive? Complete source code, trained .pth checkpoints, training and evaluation notebooks, line-segmentation and preprocessing utilities, project report PDF, PPT presentation, viva Q&A document and a setup guide.

How it works

Dataset & model:
Dataset name: IAM Handwriting Database.
Source: publicly released academic benchmark for offline handwriting recognition.
Task: line-level handwritten text recognition (sequence prediction).
Classes: character vocabulary of English letters, digits and common punctuation.
Model: CRNN — CNN encoder plus bidirectional LSTM, decoded with CTC; trained with the CTC loss in PyTorch.
Input: scanned line image, normalized to fixed height (full pages are segmented into lines first).
Prediction: frame-level character probabilities decoded into a character sequence.
Output: transcribed text per line with per-line confidence scores; exportable as plain text or CSV.
Evaluation metrics: Character Error Rate (CER), Word Error Rate (WER), CTC loss curves, confusion-style error analysis — computed by the training notebook on the validation split during the build.
Design targets: <10% CER and <30% WER on the IAM validation split. These are design targets, not measured claims; the notebook computes the actual rates during the build.

Working:

  1. Training phase: IAM text-line images are augmented (slant, stretch, noise) for writer-style robustness and fed to the CRNN; the network trains with the CTC loss, and the notebook logs CTC loss curves on the validation split.
  2. Evaluation phase: the training notebook decodes validation lines and computes Character Error Rate and Word Error Rate, plus error-analysis plots of commonly confused characters.
  3. Inference phase: the user uploads a scanned page; the preprocessing pipeline deskews, binarizes and normalizes it.
  4. The line-segmentation utility splits the page into individual text-line images.
  5. Each line image is normalized to a fixed height, passed through the CNN encoder to produce a feature sequence, and read left-to-right and right-to-left by the bidirectional LSTM.
  6. CTC decoding converts frame-level predictions into the character sequence without alignment labels; the web app displays the transcription with per-line confidence scores.
  7. Transcriptions can be exported as plain text or CSV for downstream use.

Specifications:
Model | CRNN (CNN encoder + BiLSTM + CTC decoding)
Dataset | IAM Handwriting Database (13,353 handwritten text lines, line-level task)
Design targets | <10% CER, <30% WER on the validation split (design targets, not measured claims)
Input | Scanned line image, normalized to fixed height
Vocabulary | English letters, digits and common punctuation
Inference | CPU-friendly, under 1 s per line
Platform | Windows/Linux/macOS, Python 3.10; web demo included

Project features

[Line-Level Transcription] (implemented) — Transcribes handwritten English text from scanned or photographed pages, line by line, through the web demo.
[CRNN Architecture] (implemented) — CNN feature extractor plus bidirectional LSTM with CTC decoding, the standard approach for sequence-like text recognition without alignment labels.
[Per-Line Confidence Scores] (implemented) — The demo shows each transcribed line with its confidence, so uncertain lines are visible rather than silently wrong.
[CER/WER Evaluation] (implemented) — The training notebook computes Character Error Rate and Word Error Rate on the validation split, with error-analysis plots of commonly confused characters.
[Line-Segmentation Utility] (implemented) — Automatically splits full scanned pages into individual text-line images before transcription.
[Writer-Style Augmentation] (implemented) — Slant, stretch and noise augmentation during training improve robustness across handwriting styles.
[Export Options] (implemented) — Transcriptions can be exported as plain text or CSV for downstream use.
[CPU-Friendly Inference] (implemented) — The lightweight model transcribes in under a second per line on a regular laptop CPU; no GPU needed for the demo.

What is included

Complete source code (training, evaluation, inference, web app)
Trained CRNN weights (.pth checkpoints)
Training and evaluation notebooks (CER/WER computation, CTC loss curves, error analysis)
Line-segmentation and preprocessing utilities
Project report PDF (background, CRNN methodology, dataset analysis, evaluation)
PPT presentation for the final review
Viva Q&A preparation document (CRNN, CTC loss, CER/WER metrics, sequence modeling)
Setup guide (environment, dependencies, dataset download steps)

Limitations & prerequisites

Cursive and heavily slanted handwriting lowers transcription accuracy — the model is trained on the IAM corpus writing styles.
The IAM database is English-only; other scripts are out of scope.
Needs clean line segmentation: overlapping lines or dark ruled paper can confuse the segmenter.
Requires legible scans; very low-resolution or blurry images degrade transcription quality.
All reported figures are design targets from the buyer's own training run; no pre-measured CER/WER is claimed.

Components & software requirements

Python 3.10
PyTorch
OpenCV, Pillow
NumPy, Matplotlib
Flask or Streamlit
IAM Handwriting Database (public; download scripts included)
GPU recommended for training (cloud-GPU guidance included); inference runs on CPU

Delivery information

Built to order — the source code, trained weights, project report, PPT and viva Q&A are prepared fresh for each buyer after the order is placed. The delivery schedule is confirmed at order time, and includes time for training the model and assembling the complete documentation kit.

Support terms
  • Environment and dependency setup guidance, including dataset download steps.
  • Viva preparation support covering CRNN architecture, CTC loss, CER/WER metrics and sequence modeling.
  • Explanation of the training notebook output and how to present the evaluation in the review.
  • Discussion of feasible customizations before ordering, such as custom handwriting data or paragraph-level transcription.

Download abstract (PDF)

Related guides

All guides
Blueprint-style technical illustration of multiple decision trees voting together into one final predictionStudents with basic Python and pandas skills who want a reliable first classifier for ML coursework and tabular data projects.

Random Forests Explained: Why Decision Trees Vote Better Together

Decision trees are readable but overfit; random forests fix this by training hundreds of varied trees on bootstrapped data with random feature subsets, then letting them vote. This guide explains Gini impurity, bagging, out-of-bag validation and the four hyperparameters that matter, with a complete scikit-learn workflow, honest feature-importance practices, and the mistakes students keep making.

Read guide
Illustration of object tracking showing video frames with bounding boxes and persistent ID labels following people and vehicles, comparing motion prediction and appearance matching.B.E./B.Tech Computer Science and Electronics students building video analytics projects — people counting, vehicle tracking, sports analysis — who have detection working and need

Object Tracking: DeepSORT and ByteTrack Explained

Detection finds objects per frame; tracking keeps their identities across frames. This guide explains tracking-by-detection, Kalman motion models, DeepSORT's appearance embeddings vs ByteTrack's low-confidence box recovery, tracking metrics (HOTA, IDF1, ID switches), and the tuning parameters that determine real-world quality.

Read guide
Illustration of image segmentation showing U-Net's U-shaped encoder-decoder with skip connections producing pixel masks, alongside Mask R-CNN detecting instances with masks.B.E./B.Tech Computer Science and AI/ML students moving from image classification or detection to pixel-level understanding — medical imaging, defect detection, autonomous driving

Image Segmentation: U-Net and Mask R-CNN

When projects need pixel-level answers, segmentation delivers. This guide explains semantic vs instance vs panoptic segmentation, U-Net's encoder-decoder with skip connections, Mask R-CNN's parallel mask head, Dice and IoU evaluation, paired augmentation, and how to choose the right architecture for your data and question.

Read guide
Get a quotation