A fine-tuned Donut transformer that reads handwritten Bangladeshi prescription images and extracts structured medical data — no OCR pipeline, no language preprocessing, end-to-end.
In Bangladesh and across South Asia, millions of prescriptions are handwritten in a mix of Bengali script and English abbreviations — often illegible to patients and pharmacists alike.
Fine-tune the Donut (Document Understanding Transformer) on a dataset of handwritten Bangladeshi prescription images — training the model to output structured JSON directly from raw image pixels.
Hierarchical vision transformer that processes the prescription image as a grid of patches. Captures both fine-grained character strokes and broader document layout without any explicit region proposals.
Cross-attends to the visual feature map from the encoder and generates structured text token by token. A task prompt token tells the model what schema to produce — no separate classification head needed.
CER measures edit distance between predicted and ground-truth text at the character level — ideal for a handwriting task where partial credit matters and individual character accuracy is clinically significant.
naver-clova-ix/donut-base on the prescription dataset. The model was prompted with a task token to trigger structured extraction mode. Training used cross-entropy loss on the token sequence outputs.| Category | Tool / Library | Purpose |
|---|---|---|
| Model | Donut naver-clova-ix | Document Understanding Transformer — vision encoder + text decoder |
| Framework | PyTorch fine-tuning | Model training, gradient updates, checkpoint saving |
| Library | Hugging Face Transformers | DonutProcessor, VisionEncoderDecoderModel, training utilities |
| Metric | CER character error rate | Edit distance / ground truth length — primary eval metric |
| Data | Bangladeshi Rx Images | Handwritten prescriptions, Bengali + English mixed script |
| Role | Computer Vision Engineer AIG 200 | Training pipeline, architecture decisions, eval, Milestone 3 report |