GlyphAtlas: Disentangling Stroke Detail from Layout for Scene Text Synthesis
Organizations: 1Xiamen University · 2Fudan University
Abstract
Scene text synthesis requires stroke-accurate characters rendered in a specified layout, as well as visual coherence with the surrounding scene. To achieve this, existing methods commonly pre-render the target text at its intended locations to form a glyph image that jointly specifies layout and glyph structure. However, this representation ties the resolution of each glyph to its target region, limiting fine-grained stroke guidance for small, densely packed, or structurally complex text. To tackle this, we propose GlyphAtlas, a scene text synthesis framework that retains the glyph image as a spatial anchor and supplies fine-grained stroke references through a dedicated glyph atlas. The atlas renders and encodes each character or word in a separate cell, decoupling reference resolution from target-region size. We further introduce atlas-anchored attention, which lets each text region retrieve stroke detail only from its corresponding atlas cells to refine the coarse glyph structure provided by the glyph image. This coarse-to-fine conditioning simplifies stroke rendering while preserving explicit layout correspondence. We optimize GlyphAtlas with a mask-weighted flow matching objective and a timestep-weighted text perceptual loss for writing accuracy and background consistency. Random resolution augmentation of atlas cells supports adjustable atlas budgets at inference. Extensive experiments demonstrate that GlyphAtlas achieves stroke-accurate synthesis of small, dense, and structurally complex text, zero-shot transfer to languages unseen during task-specific training, and leading performance in scenes with many text regions. project page: https://fr0zencrane.github.io/project-glyphatlas/
Figures & tables
| Method | English | Chinese | ||||||
|---|---|---|---|---|---|---|---|---|
| ACC | NED | FID | LPIPS | ACC | NED | FID | LPIPS | |
| DiffSTE [ 12 ] | 45.23 | 0.7814 | 52.74 | 0.1816 | 3.63 | 0.1226 | 57.49 | 0.1276 |
| TextDiffuser [ 4 ] | 51.76 | 0.7618 | 29.76 | 0.1564 | 5.59 | 0.1218 | 34.19 | 0.1252 |
| DiffUTE [ 3 ] | 40.54 | 0.7005 | 25.35 | 0.1640 | 29.78 | 0.5744 | 29.08 | 0.1745 |
| AnyText [ 36 ] | 68.43 | 0.8588 | 21.59 | 0.1106 | 64.76 | 0.8210 | 20.01 | 0.0943 |
| TextCtrl [ 44 ] | 58.53 | 0.8146 | 35.73 | 0.1978 | 35.80 | 0.6084 | 49.79 | 0.2298 |
| Glyph Reference | Attention | AnyText-benchmark | Total-Text | STIPLAR | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Image | Atlas | English | Chinese | All | Curved | Small | Cluttered | Japanese | Korean | Arabic | |
| – | – | 83.90 | 67.93 | 51.33 | 50.86 | 17.65 | 48.51 | 60.26 | 37.90 | 19.27 | |
| – | Anchored | 80.30 | 74.28 | 50.53 | 48.41 | 22.43 | 47.79 | 67.01 | 58.25 | 39.96 | |
| Full | 84.64 | 75.76 | 54.25 | 52.08 | 21.69 | 52.12 | 70.91 | 65.22 | 32.93 | ||
| Anchored | 85.89 | 76.00 | 56.97 | 53.91 | 27.21 | 56.08 | 67.53 | 66.96 | 39.55 | ||
| Inference | English | Chinese | ||||||
|---|---|---|---|---|---|---|---|---|
| Atlas length | ACC | Atlas length | ACC | |||||
| Mean | Max | Fixed | Random | Mean | Max | Fixed | Random | |
| 64 px | 291 | 784 | 88.48 | 88.68 | 175 | 1,200 | 77.77 | 77.92 |
| 48 px | 164 | 441 | 87.91 | 88.10 | 99 | 675 | 72.56 | 74.81 |
| Alloc. | 267 | 512 | 88.15 | 88.22 | 194 | 794 | 75.48 | 76.86 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Script | Method | ACC | NED | LPIPS |
|---|---|---|---|---|
| Japanese | AnyText2 [ 35 ] | 47.79 | 0.6599 | 0.4745 |
| TextSSR [ 42 ] | 40.26 | 0.5790 | 0.4786 | |
| FLUX-Text [ 13 ] | 46.49 | 0.6979 | 0.3806 | |
| TextFlux [ 40 ] | 46.23 | 0.6811 | 0.3502 | |
| STELLAR ‡ [ 29 ] | 43.38 | 0.6354 | 0.3878 | |
| GlyphAtlas-Bi | 67.53 | 0.8302 | 0.3853 |
| Glyph Reference | Attention | English | Chinese | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Image | Atlas | ACC | NED | FID | LPIPS | ACC | NED | FID | LPIPS | |
| – | – | 83.90 | 0.9326 | 12.77 | 0.0858 | 67.93 | 0.8414 | 13.37 | 0.0706 | |
| – | Anchored | 80.30 | 0.9078 | 12.99 | 0.0877 | 74.28 | 0.8605 | 13.30 | 0.0696 | |
| Full | 84.64 | 0.9378 | 12.75 | 0.0842 | 75.76 | 0.8713 | 13.36 | 0.0669 | ||
| Anchored | 85.89 | 0.9430 | 12.38 | 0.0829 | 76.00 | 0.8734 | 13.35 | 0.0678 | ||
| Cell unit | EN | ZH |
|---|---|---|
| Each character | 83.52 | 74.71 |
| Whole line | 84.69 | 75.87 |
| Character / word (ours) | 85.89 | 76.00 |
| English | Chinese | ||||||||
| Text supervision | ACC | NED | FID | LPIPS | ACC | NED | FID | LPIPS | |
| None | – | 70.08 | 0.8667 | 14.06 | 0.0789 | 62.19 | 0.7981 | 11.45 | 0.0533 |
| ODM | 1 | 76.85 | 0.9021 | 11.18 | 0.0733 | 65.30 | 0.8155 | 10.48 | 0.0518 |
| 5 | 81.62 | 0.9220 | 10.87 | 0.0731 | 69.12 | 0.8409 | 10.95 | 0.0531 | |
| 25 | 83.30 | 0.9315 | 11.70 | 0.0756 | 70.27 | 0.8462 | 11.93 | 0.0573 | |
| , fixed | 0.05 | 82.29 | 0.9262 | 13.05 | 0.0798 | 73.52 | 0.8636 | 12.06 | 0.0601 |
| EN, test px | ZH, test px | ||||||
|---|---|---|---|---|---|---|---|
| Train px | 48 | 64 | 80 | 48 | 64 | 80 | |
| 32 | 84.62 | 84.48 | 83.90 | 74.33 | 71.94 | 67.21 | |
| 48 | 85.08 | 84.69 | 84.29 | 75.53 | 73.90 | 69.69 | |
| 64 | 85.60 | 85.89 | 86.25 | 71.85 | 76.00 | 75.72 | |
| 80 | 84.60 | 84.79 | 85.44 | 60.95 | 73.61 | 75.72 | |
| 96 | 82.77 | 83.76 | 84.12 | 48.18 | 70.08 | 75.33 | |
| English | Chinese | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Training | Inference | ACC | NED | FID | LPIPS | ACC | NED | FID | LPIPS |
| Fixed | 64 | 88.48 | 0.9552 | 12.00 | 0.0759 | 77.77 | 0.8806 | 11.50 | 0.0574 |
| 48 | 87.91 | 0.9536 | 11.93 | 0.0757 | 72.56 | 0.8635 | 11.52 | 0.0593 | |
| 80 | 88.63 | 0.9557 | 11.96 | 0.0761 | 76.20 | 0.8754 | 11.65 | 0.0585 | |
| Alloc. | 88.15 | 0.9547 | 12.00 | 0.0758 | 75.48 | 0.8731 | 11.63 | 0.0587 | |
| Random | 64 | 88.68 | 0.9555 | 12.27 | 0.0756 | 77.92 | 0.8802 | 11.90 | 0.0574 |
| English | Chinese | ||||
|---|---|---|---|---|---|
| Inference | Mean | Max | Mean | Max | |
| 64 | 291 | 784 | 175 | 1,200 | |
| 48 | 164 | 441 | 99 | 675 | |
| 80 | 455 | 1,225 | 274 | 1,875 | |
| Alloc. | 267 | 512 | 194 | 794 | |
| English | Chinese | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Train px | Infer px | ACC | NED | FID | LPIPS | ACC | NED | FID | LPIPS |
| 48 | 48 | 85.08 | 0.9424 | 12.324 | 0.08367 | 75.53 | 0.8720 | 12.812 | 0.06769 |
| 48 | 64 | 84.69 | 0.9397 | 12.474 | 0.08362 | 73.90 | 0.8662 | 12.830 | 0.06802 |
| 48 | 80 | 84.29 | 0.9380 | 12.454 | 0.08390 | 69.69 | 0.8521 | 12.870 | 0.06875 |
| 64 | 48 | 85.60 | 0.9409 | 12.503 | 0.08303 | 71.85 | 0.8592 | 13.234 | 0.06797 |
| 64 | 64 | 85.89 | 0.9430 | 12.379 | 0.08289 | 76.00 | 0.8734 | 13.347 | 0.06782 |