AI-assisted PDF accessibility remediation
Legible turns a document, either a PDF or an image supplied by URL or upload, into output that screen readers can use. It's built for the people who lead accessibility remediation at universities and publishers, who have to make textbooks, papers and slide decks usable for blind and low-vision readers. For every figure, chart, diagram and equation, Legible produces the structure a screen reader needs and marks exactly what a person still has to check.
We built it for Track 3 of the AMD Developer Hackathon: ACT II. The code is MIT-licensed and public on GitHub.
Key features
- Tiered alt text — each figure gets a short
altattribute of up to 125 characters plus a full, structured description. - Chart-to-table reconstruction — the numbers behind a chart are restored as rows and columns, so the data doesn't depend on color or shape.
- MathML for equations — valid presentation MathML sits alongside the LaTeX, so screen readers read equations out correctly.
- Null over guess — a value that can't be read becomes null and sets
needs_human_review. The model is explicitly forbidden from inventing numbers. - Provenance and confidence — every element records whether it came from the figure, the caption or inference.
- Accessible HTML export — the bundle contains
figureandfigcaptionelements, expandable full descriptions, captioned tables and MathML. A separate endpoint returns a JSON map of figure IDs to alt text.
Architecture and tech stack
Pipeline
A job moves through seven stages: ingest, rasterize, detect figures, analyze, synthesize, validate and persist. Documents are downloaded with httpx or uploaded directly. PDFs are rasterized at 150 DPI with PyMuPDF, with pdf2image as a fallback.
The default figure detector treats each page as one figure region, which works well for slides, single charts and scans. Per-figure layout detection can be added later as a separate provider without changing the rest of the pipeline.
Figure reading and structuring
Qwen2.5-VL reads each figure crop. It classifies the figure, transcribes the text on it, extracts chart values and writes out equations. This batch vision workload is the part designed for AMD Instinct MI300X GPUs through ROCm.
Gemma then turns those readings into the accessibility schema. It uses JSON-schema structured output at temperature 0 and relies only on what the vision model saw. Validation drops empty entries, renumbers figures, trims short alt text to length and routes anything uncertain to review.
Service
The service runs on FastAPI with async jobs, progress over Server-Sent Events, SQLite storage and pluggable providers. Synthesis can use Gemma through Google AI Studio or Fireworks AI, or Gemma served by vLLM on AMD hardware. Mock mode runs the whole pipeline offline from a bundled climate-science textbook page, and all 14 tests pass in that mode.
Where it fits in a remediation workflow
Legible does the first pass, not the sign-off. It's designed so a remediator can focus on the flagged figures instead of redoing every image by hand. We don't claim its output is compliant on its own. Human review is part of the design.
Related work
Legible is part of our AI integration and automation work. For another pipeline that makes documents easier to read, see our scanned-PDF to large-print conversion for Knigopoisk. Other builds from the same hackathon are Testify, RecipeReel and Keystone.



