Views
No views yet
ProjectCreate schema — including plot dimensions, setbacks, road side, number of bedrooms/toilets, optional rooms (pooja, study, balcony, parking, basement, stilt), and Vastu preferences.Plot: 15m x 12m rectangular
Setbacks: front=1.5m, rear=1.0m, left=1.0m, right=1.0m
Road side: North
Bedrooms: 3, Toilets: 3
Parking required, Pooja room, Balcony
2 floors (G+1)
City: Delhi| Component | Value |
|---|---|
| Base Model | Qwen/Qwen2.5-1.5B-Instruct |
| Fine-tuning | LoRA (r=16, alpha=32, dropout=0.05) |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Epochs | 5 |
| Batch Size | 4 (accumulation=4) |
| Learning Rate | 1e-4 |
| Max Sequence Length | 4096 |
| Precision | bf16 |
ProjectCreate schema.1{
2 "name": "MyHouse",
3 "plot_length": 15.0,
4 "plot_width": 12.0,
5 "setback_front": 1.5,
6 "setback_rear": 1.0,
7 "setback_left": 1.0,
8 "setback_right": 1.0,
9 "road_side": "N",
10 "north_direction": "N",
11 "num_bedrooms": 3,
12 "toilets": 3,
13 "parking": true,
14 "city": "Delhi",
15 "vastu_enabled": false,
16 "road_width_m": 9.0,
17 "has_pooja": true,
18 "has_study": false,
19 "has_balcony": true,
20 "plot_shape": "rectangular",
21 "num_floors": 2,
22 "has_stilt": false,
23 "has_basement": false,
24 "municipality": "MCD",
25 "custom_room_config": null
26}1{
2 "project_name": "MyHouse",
3 "plot": {
4 "shape": "rectangular",
5 "outer_boundary": [[0,0],[15,0],[15,12],[0,12]],
6 "setbacks": {"front":1.5,"rear":1.0,"left":1.0,"right":1.0},
7 "buildable_boundary": [[1.5,1.5],[13.5,1.5],[13.5,11],[1.5,11]],
8 "road_side": "N",
9 "north_direction": "N",
10 "plot_length": 15.0,
11 "plot_width": 12.0
12 },
13 "rooms": [
14 {
15 "id": "living_1",
16 "type": "living",
17 "name": "Living Room",
18 "floor": "gf",
19 "polygon": [[1.5,1.5],[8.5,1.5],[8.5,5.5],[1.5,5.5]],
20 "area_sqm": 24.0,
21 "dimensions": {"width":7.0,"depth":4.0},
22 "position": {"x":5.0,"y":3.5}
23 },
24 ...
25 ],
26 "doors": [
27 {"id":"door_main","type":"main_entrance","width":0.9,"from":"outside","to":"living_1","position":[7.5,11.0],"orientation":"horizontal"},
28 ...
29 ],
30 "windows": [
31 {"id":"win_living_1","room":"living_1","width":1.2,"height":1.5,"position":[8.5,3.5],"orientation":"vertical"},
32 ...
33 ],
34 "dimensions": {
35 "total_built_up_area_sqm": 145.2,
36 "total_carpet_area_sqm": 128.0,
37 "ground_floor_area_sqm": 128.0,
38 "first_floor_area_sqm": 0.0,
39 "second_floor_area_sqm": 0.0,
40 "stilt_area_sqm": 0.0,
41 "basement_area_sqm": 0.0
42 },
43 "meta": {
44 "num_floors": 2,
45 "has_stilt": false,
46 "has_basement": false,
47 "vastu_enabled": false,
48 "city": "Delhi",
49 "municipality": "MCD"
50 }
51}| File | Purpose |
|---|---|
train.py | Fine-tuning script using TRL SFTTrainer + LoRA |
generate.py | Inference script — pass parametric input, get JSON floorplan |
generate_synthetic_dataset.py | Generates the training dataset from the ProjectCreate schema |
README.md | This file |
1pip install datasets
2python generate_synthetic_dataset.pyfloorplan_synthetic_dataset/ with 5,000 train, 500 val, 500 test examples.1pip install transformers trl torch datasets peft accelerate trackio
2export HF_TRAINER_HUB_MODEL_ID="Karthik8nitt/parametric-floorplan-generator"
3python train.py1python generate.py \
2 --plot_length 15 --plot_width 12 \
3 --setback_front 1.5 --setback_rear 1.0 \
4 --setback_left 1.0 --setback_right 1.0 \
5 --road_side N --num_bedrooms 3 --toilets 3 \
6 --parking --has_pooja --has_balcony \
7 --num_floors 2 --city Delhicustom_room_config to add non-standard rooms:1[
2 {"type": "gym", "name": "Home Gym", "min_area_sqm": 15, "floor_preference": "ff", "mandatory": true},
3 {"type": "home_theater", "name": "Theater", "min_area_sqm": 20, "floor_preference": "basement", "mandatory": true}
4]rectangularl_shaped (with cutout_corner, cutout_width, cutout_height)trapezoid (with plot_front_width, plot_rear_width, plot_side_offset)