APAU-Net: Adaptive prior-aware U-Net for handwritten text-line segmentation in historical documents
摘要
Handwritten text-line segmentation in historical manuscripts remains challenging due to degradation, overlapping strokes, and extreme data scarcity. We propose APAU-Net, a two-stage cascade architecture that improves Line Intersection-over-Union (Line IU) metric via learned anisotropic Gaussian priors. Stage 1 predicts topology-aware ellipsoidal priors from low resolution grayscale images using connected-component analysis and moment-based ellipse fitting. Stage 2 refines these priors at full resolution through a residual U-Net with adaptive per-pixel weighting and gated fusion. We evaluated APAU-Net on the challenging U-DIADS-TL (84 images, only 3 training pages per manuscript) and DIVA-HisDB benchmarks. It achieves an average Line Intersection-over-Union (Line IU) of 94.3%, corresponding to a 9.83 percentage-point improvement over plain U-Net, and improves performance by 24.08 percentage points over the strongest few-shot baseline on the most degraded Syriac subset. Ablation confirms that the anisotropic prior contributes 8.61–11.67 percentage points to Line IU under severe data scarcity. The source code is available at https://github.com/aminebeg/APAUNet.