|
Download README.md from aakash9684/vastu-plan-generation: direct link, hf CLI and curl.
- Browser
- Download file 4.01 kB
-
https://huggingface.co/spaces/aakash9684/vastu-plan-generation/resolve/main/README.md
- Command line
-
hf download hf://spaces/aakash9684/vastu-plan-generation/README.md
-
curl -L -o README.md https://huggingface.co/spaces/aakash9684/vastu-plan-generation/resolve/main/README.md
4.01 kB
metadata
title: Vastu Plan Generation
emoji: π
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
pinned: false
AI Floorplan Generator
Dissertation Project β Hybrid GNN + Diffusion + NSGA-II Architecture
What This Does
Generates and optimises 2D residential floor plans for Indian homes with respect to:
- Vastu Shastra compliance (15 rules, user-selectable)
- Construction Cost estimation (India-specific rates)
- Climatic feasibility suggestions (5 Indian climate zones)
- Spatial quality β adjacency, efficiency, compactness
Shows Top 5 optimised floor plans ranked by a multi-objective fitness score.
How to Run
Step 1 β Install dependencies
pip install -r requirements.txt
Step 2 β Download the trained model weights
Copy the three checkpoint files from Google Drive into the models/ folder:
models/graph_vae.pth β Graph VAE (200 epochs, loss 2.15)
models/geometry_predictor.pth β Geometry Predictor (500 epochs, loss 0.38)
models/best.pt β YOLOv8 room detector (optional, mAP50 β 54%)
If these files are missing, the app still runs but falls back to a rule-based rectangle packer instead of the trained AI pipeline.
Step 3 β Run the app
streamlit run app.py
Step 4 β Open in browser
http://localhost:8501
Project Structure
vastu-plan-generation/
βββ app.py β Main Streamlit GUI
βββ requirements.txt
βββ models/ β Trained weights (downloaded from Drive)
β βββ graph_vae.pth
β βββ geometry_predictor.pth
β βββ best.pt
βββ core/
β βββ constants.py β Room definitions, Vastu rules, cost rates
β βββ generator.py β Bridges ML pipeline β FloorPlan objects + scoring
β βββ ml_models.py β GraphVAE + GeometryPredictor class definitions
β βββ ml_pipeline.py β Rejection-sampling pipeline (Cells E + F port)
β βββ visualizer.py β Matplotlib floor plan rendering
βββ README.md
Pipeline numbers (training + validation)
| Stage | Setting | Result |
|---|---|---|
| YOLOv8 detector | 1.2k images, 11 classes | mAP50 β 54% |
| Graph VAE | 3283 RAG graphs, 200 epochs | Final loss 2.15 |
| Geometry Predictor | 500 epochs, cosine LR + adjacency loss | Final MSE 0.38 |
| End-to-end | Rejection sampling (HouseGAN++ style) | 100/100 valid |
| Underlying acceptance rate | 23% (~4 tries) |
Architecture Pipeline
User Input (GUI)
β
Graph VAE β Generates room adjacency graphs
β
Diffusion Stg 1 β Graph β Room bounding boxes (x,y,w,h)
β
Diffusion Stg 2 β Boxes β Full floor plan with walls/doors
β
Constraints Check β Validates 7 hard structural constraints
β
NSGA-II β Optimises: AQ + SE + LC + VS + AC + Cost
β
Top 5 Plans β Displayed in GUI with full analysis
Objective Functions
| Symbol | Name | Goal |
|---|---|---|
| AQ | Adjacency Quality | MAXIMISE |
| SE | Spatial Efficiency | MAXIMISE |
| LC | Layout Compactness | MAXIMISE |
| VS | Vastu Score | MAXIMISE |
| AC | Area Compliance | MAXIMISE |
| CC | Construction Cost | MINIMISE |
Room Classes (Indian-Specific)
master_bedroom, bedroom_01/02/03, kitchen, living_room, dining_room,
common_bathroom, attached_bathroom, powder_room, foyer,
internal_corridor, external_corridor, pooja_room, utility_area,
balcony, study
Dissertation: AI Framework for Automated Generation and Optimisation of 2D Floorplans w.r.t. Vastu Orientation, Cost Effectiveness & Climatic Feasibility