Computer vision answers · Construction

What is the best computer vision model for floor plan detection?

One that knows your drawings, not just floor plans in general.

Short answer

For most floor plans, the best model is an instance segmentation model such as RF-DETR Seg, fine-tuned on your own drawings with Roboflow for free. It outlines walls and rooms as shapes rather than boxes, and pairs with an RF-DETR detection model for door and fixture symbols and an OCR model for room names and dimensions. No off-the-shelf model knows your drawing style, so a model fine-tuned on your own plans will usually beat a bigger general model used as it is.

Roboflow agent · free to start

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

Walls and rooms
RF-DETR Seg, an instance segmentation model
Doors and symbols
RF-DETR object detection, or the same segmentation model
Room names and sizes
An OCR model run on each text label
Labeling help
SAM 3 pre-labels plans in Roboflow Annotate
Floor plan with three segmented rooms and two detected doors.

How to choose a floor plan model, step by step

Six steps from your own drawings to a model you have tested on them.

  1. Connect Roboflow to your coding agent, ChatGPT or Codex

    Add the Roboflow MCP server to Claude, Cursor or Gemini CLI, or install the Roboflow plugin in ChatGPT or Codex. Your assistant can then upload and auto-label floor plans, start training, build the Workflow and run the model from a prompt, at no extra cost beyond your Roboflow plan.

  2. Match the model type to what you need from the plan

    Shapes such as walls and rooms need instance segmentation, which returns an outline you can measure. Symbols such as doors, windows and outlets can use object detection, which returns a box. Text such as room names and dimensions needs OCR.

  3. Label your own plans

    Use plans from the same sources you will process, and draw polygons around walls and rooms and boxes around symbols, with one class each. Roboflow Annotate can pre-label plans with SAM 3, so you correct shapes instead of drawing each one.

  4. Fine-tune RF-DETR Seg on your plans

    Train RF-DETR Seg, Roboflow's real-time instance segmentation model, on your labeled plans with Roboflow Train. RF-DETR leads on accuracy for its speed on the COCO and RF100-VL benchmarks, and its Nano to Large sizes are open source under the Apache 2.0 license.

  5. Compare models on plans you have already counted

    Run each trained version on the same test plan, one you have counted by hand, and keep the model whose counts match yours most closely.

    Python
    import supervision as sv
    from collections import Counter
    from inference import get_model
    
    for model_id in ("your-project/1", "your-project/2"):
        model = get_model(model_id)
        result = model.infer("test_plan.png", confidence=0.4)[0]
        detections = sv.Detections.from_inference(result)
        print(model_id, Counter(detections.data["class_name"]))
    # your-project/1 Counter({'wall': 21, 'room': 6, 'door': 5})
    # your-project/2 Counter({'wall': 24, 'room': 6, 'door': 7})

    Rather not write code? Ask the Roboflow agent to set this up for you

  6. Add OCR for room names and run every plan

    Build a Workflow that runs your model, crops each text label with the Dynamic Crop block and reads it with the OCR Model block. Run it on every plan with Roboflow Deploy.

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.