Evaluation Metrics for AI-Based Handwriting Reconstruction: Proposing the Handwriting Fréchet Distance
2026 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE credits
Student thesis
Abstract [en]
The Fréchet Inception Distance (FID) is a standard metric for evaluating generative image models, but its underlying model Inception-v3 is trained on natural images and is poorly suited to handwritten text. In this work, we investigate how replacing the feature extractor with models more relevant to the handwriting domain affects the resulting Fréchet distance curve across different levels of image degradation. Three types of models are evaluated: TrOCR and AttentionHTR (domain-specific) and DINOv3 (general-purpose), each combined with mean, max, or CLS pooling where applicable. The candidates are tested on a synthetic dataset derived from the Saint Gall manuscripts with six controlled degradation types: blur, dilation, erosion, noise, overtext, and rotation. Using monotonicity and human judgment as evaluation criteria, we find that the Imgur5K variant of AttentionHTR with mean pooling produces the most consistent response across all degradation types, with the SLL variant of TrOCR using CLS pooling as a strong alternative. The proposed metric, called Handwriting Fréchet Distance, is compared to FID, HWD, SSIM, and PSNR, and is shown to better reflect the perceived severity of degradations in handwritten text. The metric is available at https://github.com/HFD-uu/HFD.
Place, publisher, year, edition, pages
2026.
Series
MATVET-F ; 26020
Keywords [en]
frechet, fid, frechet inception distance, frechet distance, palimpsest
National Category
Artificial Intelligence
Identifiers
URN: urn:nbn:se:uu:diva-590882OAI: oai:DiVA.org:uu-590882DiVA, id: diva2:2075088
Subject / course
Independent Project in Engineering Physics
Educational program
Master Programme in Engineering Physics
Supervisors
Examiners
2026-06-232026-06-182026-06-23Bibliographically approved