Léargas

  • Overview
  • Problem
  • Role
  • How it works
  • Stack
  • Result
  • RepoGitHub ↗
  • Next: Linux Loadable Kernel Module

Léargas. Overview, 1 of 8

Hover or drag the wheel to scroll · centre selects · MENU goes back

Skip to main content
All projects

Léargas — Construction Drawing Q&A

Ask a question about a construction drawing and get the answer with the proof marked on the sheet. Built by a team of two for the Stoa track at Junction 2026 in Helsinki.

Year
2026
Type
Hackathon
Team
2 people

Problem

An answer about a construction drawing — a door count, a room area, a slab takeoff — is only useful if it can be checked against the sheet. Drawings arrive as CAD files, BIM models, PDFs, scans and phone photos, and a wrong answer is worse than “I don’t know”.

Role

Built with Harry Kennedy. I was responsible for the vision model, the infrastructure and the interface; Harry was responsible for the geometry engines, sheet reader, router and API.

How it works

Léargas is the Irish word for insight. A question is first parsed into a structured query, such as "count windows", and a router then picks the engines that can answer it for that particular drawing. A drawing with a DXF file or an IFC model goes to the geometry engines, which count and measure the real lines, shapes and building elements. A large sheet goes to the sheet reader, which works at full size so small text stays readable: it reads the text, finds the drawing scale, and measures rooms and openings. Everything else — smaller images, small PDFs, phone photos, and sheets the reader cannot answer — goes to the vision model. The vision model is Gemma 4 E4B, fine-tuned with LoRA on the training split of the challenge dataset. The deployed version was also trained on images damaged on purpose, with scan noise, skew, blur, paper tint, low resolution and JPEG compression, so that it copes with real scans and photos. Its confidence is calibrated: we measured the confidence level above which 95% of its answers are right. It was served with vLLM on a single A100 alongside the backend, with the React frontend deployed separately on Vercel. When geometry and the vision model both answer, the router compares them. Every answer carries one of four statuses: verified, partial, disagreement, or cannot verify. A confident disagreement is shown as one, an unsure model estimate cannot overrule exact geometry, and when no source is sure enough the answer is marked cannot verify, with the best guess greyed out. Where an engine returns evidence, the interface draws it over the sheet like a highlighter: solid lines for measured, dashed for estimated, dotted for read from the text. The vision model does not mark its evidence on the sheet yet.
questionrouterenginesDXF / IFCsheet readerGemma 4reconcileverified · partial · disagreement · cannot verify
Fig. — the router picks the engines for a drawing, and their answers are reconciled into one status.

Stack

  • Python
  • FastAPI
  • TypeScript
  • React
  • Gemma 4
  • LoRA
  • vLLM
  • OpenCV
  • ezdxf
  • IfcOpenShell

Result

Fine-tuning took Gemma 4 E4B from 33.0% to 61.6% on 1,000 held-out floor-plan image questions, holding 61.6% on simulated scans and 60.3% on simulated phone photos, at a measured compute cost of about $0.046 per 1,000 answers. The geometry engines answered 98.2% of 2,512 held-out CAD and BIM questions correctly, and every miss was a “cannot verify” rather than a wrong number.