LayoutCVAE v2
apartment floor plan generation from perimeter
2 min readupdated
The LayoutCVAE v2 model generates room zoning and layout options inside a given apartment silhouette. It takes the housing contour, area, number of bedrooms, and balcony availability as inputs, and outputs a zone distribution map (living room, bedroom, kitchen, bathroom, balcony). The model is built on a conditional variational autoencoder (Conditional VAE — AI model for generating new data based on specified conditions) with a FiLM mechanism for deep parameter adaptation. The development is implemented as an ONNX model (cross-platform format for efficient AI model deployment) and was created during the IAAC MaAI 2026/27 hackathon. The tool is useful for architects, interior designers, and app developers to quickly generate draft floor plans.
Key features
- Conditional VAE v2 architecture with improved condition injection via the FiLM module across all decoder blocks.
- Increased accuracy: 46% of generated raw plans have the correct number of bedrooms (compared to 35% in the first version).
- High stability: 92.5% of requests successfully output 5 quality layout options after applying rules.
- Compact ONNX decoder format of only 9.3 MB for easy server integration.
What you can do
- Embed the model into a web service or Telegram bot to automatically generate layout options based on plot shape.
- Use alongside post-processing scripts to automatically add walls, doors, and windows to the generated zones.
- Apply in educational and architectural projects to generate baseline floor plans based on the ResPlan dataset.
Example
import json, numpy as np, onnxruntime as ort
from huggingface_hub import hf_hub_download
repo = "iaac-maai/hackathon-team4-layout-cvae"
session = ort.InferenceSession(hf_hub_download(repo, "layout_decoder.onnx"))
config = json.load(open(hf_hub_download(repo, "layout_cvae_config.json")))
Read more
Details• Benchmarks: 46% correct bedrooms in raw images, 92.5% of requests with 5 options, 21% of plans pass strict rules
• Training: ResPlan dataset (17,000 plans, 15,832 after cleaning), 51 epochs on GPU in Colab
• Limitations: apartments with 4+ bedrooms are harder to generate due to data scarcity in the dataset
• License: MIT for code and model, ResPlan (CC BY 4.0) for data










Comments