HA: Floorplan v3 — per-room Gemini API renders composited on exact geometry
ci/woodpecker/push/woodpecker Pipeline was successful

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kaloyan Danchev
2026-08-07 10:29:26 +03:00
parent 968b197192
commit 83bc6f4e1d
+3
View File
@@ -5,6 +5,9 @@
---
## 2026-08-07
### Floorplan: photorealistic background v3 — per-room Gemini API generation (final)
- **[HA]** Winning pipeline: each room generated INDIVIDUALLY via `gemini-3.1-flash-image` REST API (billing key; room photos inline + per-room aspectRatio) — single rectangular room = trivial geometry, so both furniture and framing are accurate. PIL composite (5.5% edge crop, resize to area bboxes, walls/doors/windows drawn on top) → `/local/floorplan-render.jpg?v=3` (cache-bust required). Room renders archived in Obsidian for one-room re-generation later. ~$0.50 total.
### Floorplan: photorealistic background via composite pipeline
- **[HA]** Final "beautiful floorplan": Gemini one-shot render provided room interiors (good) with drifted geometry; a PIL compositor re-projected each room crop onto the exact plan geometry and redrew walls/doors/windows on top. Result deployed as `/local/floorplan-render.jpg`, set as Easy Floorplan floor `image` with `imageFit: stretch` (1:1 canvas mapping keeps the robot-tracker calibration). SVG furniture removed (backed up), areas made transparent, live device icons + tracker on top.
- **[NOTE]** Reusable lesson: AI keeps either geometry or interiors, never both — composite (AI textures + coded geometry) is the deterministic path.