A multi-model ML pipeline that detects dyslexia indicators from handwriting images by combining a letter classifier, a CNN reversal detector, and an LSTM sequence analyser into a weighted ensemble. Built as a research capstone exploring how deep learning can assist early screening in under-resourced educational settings.
# Dyslexia Accessibility NLP
A multi-model deep learning pipeline for dyslexia screening from handwriting images. Three heterogeneous models — a scikit-learn MLP letter classifier, a PyTorch CNN reversal detector, and a PyTorch Bidirectional LSTM sequence anomaly detector — are fused via a clinically motivated weighted ensemble and served through a Flask web application with structured PDF reporting.
This project is framed as a research capstone on multi-model fusion for social impact, not a production tool. Every architectural and mathematical decision is motivated and documented below.
---
## Project Structure
```
dyslexia-accessibility-nlp/
│
├── beta versions/ ← Original iterative development history
│ ├── Letter_Classification/ · Scratch MLP (NumPy/Numba), GridSearch,
│ │ ├── scripts/ output predictions at 10k/30k/88.8k samples
│ │ └── output/
│ ├── Dyslexic_Detection/ · TF/Keras CNN training notebook,
│ │ └── testing_tf.ipynb checkpoint .h5 models
│ ├── nlp_module.py · Original incomplete LSTM module
│ └── README.md
│
├── data/ ← Data loading, preprocessing, augmentation
│ ├── preprocessing.py · EMNIST loader (orientation fix),
│ │ stratified splits, StandardScaler
│ ├── augmentation.py · torchvision transforms + PyTorch DataLoader
│ └── nlp_data_generator.py · Synthetic sequence generator with
│ MLP confusion noise (domain adaptation)
│
├── models/ ← Model definitions and training scripts
│ ├── mlp_classifier.py · 3-layer MLP (512→256→128), Adam,
│ │ sklearn early stopping
│ ├── cnn_classifier.py · 3-block Conv2D CNN, BatchNorm, Dropout,
│ │ GlobalAvgPool, PyTorch AMP (GPU)
│ ├── nlp_sequenc …