Views
No views yet
⚠️ NON-COMMERCIAL / RESEARCH-ONLY. This LoRA adapter was fine-tuned on CubiCasa5K (CC-BY-NC-SA 4.0). It is released under CC-BY-NC-SA 4.0 and must not be used commercially. It is not part of BOOMI's license-clean shipped model line (those are theBDivyesh/boomi-stage-a-*text→SPEC models, trained only on permissive data). Use it for research and benchmarking only, with attribution to CubiCasa5K.
Qwen/Qwen2.5-VL-3B-Instruct (Apache-2.0 base) that reads a
residential floor-plan image and emits a structured room program as JSON:{"room_program": {"BED ROOM": 3, "BATH": 2, "KITCHEN": 1, "LIVING": 1, "BALCONY": 2, "FOYER": 1, "STORE": 1, "LOBBY": 1}, "bhk": "3BHK"}| metric | base (zero-shot) | this adapter (fine-tuned) | lift |
|---|---|---|---|
| program multiset Jaccard | 0.360 | 0.618 | +0.259 |
| room-type presence recall | 0.622 | 0.869 | +0.248 |
| bedroom-count (BHK) accuracy | 0.339 | 0.556 | +0.217 |
| valid JSON | 0.993 | 1.000 | — |
| exact whole-program match | 0.000 | 0.034 | — |
1import torch
2from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
3from peft import PeftModel
4from PIL import Image
5
6BASE = "Qwen/Qwen2.5-VL-3B-Instruct"
7ADAPTER = "BDivyesh/boomi-stage3-vlm-cubicasa-research"
8
9model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
10 BASE, torch_dtype=torch.bfloat16, use_safetensors=True).to("cuda")
11model = PeftModel.from_pretrained(model, ADAPTER).to("cuda").eval()
12proc = AutoProcessor.from_pretrained(BASE, max_pixels=1280*28*28)
13
14PROMPT = ('You are an expert architect reading a residential floor-plan image. '
15 'Identify every distinct room and return ONLY JSON: '
16 '{"room_program":{"<TYPE>":<count>,...},"bhk":"<n>BHK"}. '
17 'bhk = number of bedrooms. Count each room instance. Return only the JSON.')
18
19img = Image.open("plan.png").convert("RGB")
20msgs = [{"role": "user", "content": [{"type": "image", "image": "plan.png"},
21 {"type": "text", "text": PROMPT}]}]
22text = proc.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
23inp = proc(text=[text], images=[img], return_tensors="pt").to("cuda")
24out = model.generate(**inp, max_new_tokens=512, do_sample=False)
25print(proc.batch_decode(out[:, inp.input_ids.shape[1]:], skip_special_tokens=True)[0])Qwen/Qwen2.5-VL-3B-Instruct (Apache-2.0).MH, ET). Indian / other-region transfer is unvalidated.Qwen/Qwen2.5-VL-3B-Instruct: Apache-2.0 (its own license applies).