Right total, wrong rooms: what overlap scores miss in floor-plan takeoffs

quantity-lab measures room area, perimeter and count on floor plans three ways: the annotated rooms (oracle), the same rooms with a controlled error, and two real room finders: a classical OpenCV baseline that labels the free space between walls, and the pretrained CubiCasa5K segmentation model. Units are image pixels; no physical scale is claimed.

uv run python -m quantity_lab --input plan.pdf --annotations model.svg --mode perturbed --perturbation erode --pixels 2 --output out/plan

Code (MIT): github.com/dzakybd/quantity-lab. Write-up: dzaky.ai.id. Results were computed ahead of time; this page runs no model.

Synthetic plan

Coloured fill: measured rooms, one colour per room. Dark outline: the reference rooms.

Score

Rooms match one-to-one at IoU ≥ 0.5. Room area error is the mean signed error over matched rooms; total area compares the sums.

Controlled errors on ten held-out CubiCasa5K plans (ranges; numbers only)

Ranges over the ten plans: mean signed room-area error, total-area error and room F1.

Two room finders on the same plans

OpenCV baseline tuned on three train plans; the trained model's pixel-to-room step tuned on ten validation plans. Both frozen before these plans were scored. High pixel overlap (IoU) does not mean the rooms are right.