Replace static overlay with client-side canvas rendering. Left panel
shows clickable OCR lines with font controls (dropdown + size slider).
Right panel renders green text overlay on the document via canvas.
Fonts loaded from backend TTF files using the FontFace API.
New endpoints: GET /api/fonts, GET /api/font/{id}
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Instead of detecting one font per page, detect the font for each line
independently. The previous line's font is used as a prior — if it
scores within 15% of the best candidate, it's kept for consistency.
This handles documents with mixed fonts (bold headers, regular body,
different sections).
Also: redirect / to the static UI, fix data endpoint to return
per-line font info.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Word-by-word rendering hides font detection errors by repositioning
each word at the OCR'd spot. Line-by-line rendering lets the font's
own character spacing determine where each character falls — any
drift reveals that the font/size is wrong. The drift IS the feedback
mechanism.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Render each word at its OCR'd position instead of whole lines,
so word spacing matches the original document exactly
- Add y-offset correction using glyph bounding box
- Add fine-grained font size search (±3 around coarse best, step 1)
- Add alignment quality test (48.9% hit rate, >30% threshold)
- Add scipy to dev dependencies
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Adds POST /api/upload (runs full pipeline: rasterize, OCR, font detect,
overlay), GET endpoints for original/overlay images and OCR data JSON.
Also adds python-multipart, anyio, and pytest-anyio dependencies.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add render_overlay() that composites semi-transparent green text on
the original document image using the detected font. This is the
visual proof mechanism for font detection accuracy. Also adds numpy
to project dependencies for test pixel analysis.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add rasterize_pdf() that converts PDF pages to PIL images using
pdf2image. Supports configurable DPI and page range selection.
Includes tests verifying multi-page output, high-DPI dimensions,
and single-page extraction.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
9 tasks covering: project scaffolding, PDF rasterization, OCR with
character bounding boxes, font detection, green overlay renderer,
FastAPI backend, web UI, alignment calibration, and E2E smoke test.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
AI-powered redaction analysis tool for Epstein case files.
Image-first pipeline: OCR, font detection, redaction detection,
constraint solving, and Claude API guessing with visual overlay
verification.
Co-Authored-By: Claude Opus 4.6 <[email protected]>