Computer vision answers · Construction
How do I detect walls, doors, windows and rooms in floor plans?
Without tracing every room and counting every door by hand.
Short answer
Train an instance segmentation model to outline every wall, door, window and room in a floor plan with Roboflow for free, then count the results by class. Rooms come back as outlines (masks), so you also get each room's area in pixels to convert with the drawing's scale. Outline walls and rooms as polygons rather than boxes, since a box around an L-shaped room or a diagonal wall covers far more than the shape itself.
Skip the setup. Describe your images.
Describe your images and what you need to find. The agent sets up labeling, training and deployment with you.
Key facts
- What you need
- Floor plan images and a segmentation model trained on your drawings
- What you get
- Counts of walls, doors and windows, plus each room's outline and area
- Image sources
- PDF exports, scanned blueprints and CAD drawings saved as images
- Runs on
- Cloud API, or your own server running Docker

How to build floor plan detection, step by step
Six steps from a folder of floor plans to counts and room areas you can export.
Connect Roboflow to your coding agent, ChatGPT or Codex
Collect plans that match the drawings you will process
Outline walls, doors, windows and rooms, with one class each
Train an instance segmentation model
Count each class and measure each room
Pythonimport supervision as sv from collections import Counter from inference import get_model model = get_model("your-project/1") result = model.infer("floor_plan.png", confidence=0.4)[0] detections = sv.Detections.from_inference(result) print(Counter(detections.data["class_name"])) # Counter({'wall': 24, 'window': 9, 'door': 7, 'room': 6}) rooms = detections[detections.data["class_name"] == "room"] print(rooms.area) # pixel area of each room outlineRather not write code? Ask the Roboflow agent to set this up for you
Run every plan and export the results
Why 2 million engineers build on Roboflow
Label faster
Auto-label with SAM 3 or your own model, then fix the misses instead of drawing every box.
RF-DETR
Roboflow’s open-source real-time detection model, built for accuracy (opens in a new tab) on small objects.
Logic built in
Counting, zones, tracking and alerts are ready-made Workflow blocks, so there is less code to write.
Your model, your weights
Use your trained weights on every plan, including free, through the open-source Inference package.
Run it anywhere
Self-host on a workstation, Docker, an on-prem GPU or an edge device, or call the cloud API.