FloorCAD Seg — Architectural Element Segmenter (YOLOv8n)

Hub: mudasir13cs/floorcad-yolov8n-seg

YOLOv8n instance segmentation model for architectural CAD floor plans. It predicts both boxes and masks for walls, openings, stairs, and interior symbols.

Companion box-only model: FloorCAD Detect (mudasir13cs/floorcad-yolov8n-detect).

Related VLM work (image → structured JSON): mudasir13cs/qwen25-vl-3b-floorplan-sft.

Example input

Original illustration (not from the training set). Use any CAD-style floor-plan raster at inference.

Demo CAD floor plan

A second residential-style demo is in examples/demo_residential_floorplan.png.

Data source

Trained on a YOLO segmentation conversion of FloorPlanCAD-style CAD floor plans (35 symbol classes, polygon masks).

Resource Link
Dataset paper FloorPlanCAD: A Large-Scale CAD Drawing Dataset for Panoptic Symbol Spotting (ICCV 2021)
Project page floorplancad.github.io
HF mirror (vector CAD / FiftyOne) Voxel51/FloorPlanCAD
Base segmenter Ultralytics YOLOv8n-seg (yolov8n-seg.pt)

FloorPlanCAD is a large-scale vector CAD collection with panoptic symbol labels (countable “things” and uncountable “stuff”). This checkpoint is a raster + polygon-mask YOLO conversion of that label family. Training images are not redistributed in this repo.

Classes (35)

Same taxonomy as FloorCAD Detect: doors/windows/walls, circulation (stair, elevator, escalator), wet-area fixtures, and furniture. Unnamed leftover ids: class_31, class_32, class_34, class_35.

Full map: dataset.yaml.

Load & run

from ultralytics import YOLO

model = YOLO("mudasir13cs/floorcad-yolov8n-seg")  # or local best.pt / floorcad-yolov8n-seg.pt
results = model.predict("demo_cad_floorplan.png", conf=0.25, imgsz=640)
results[0].show()

If Hub loading needs a filename:

from huggingface_hub import hf_hub_download
from ultralytics import YOLO

ckpt = hf_hub_download("mudasir13cs/floorcad-yolov8n-seg", "floorcad-yolov8n-seg.pt")
model = YOLO(ckpt)

Training details

Architecture YOLOv8n-seg
Image size 640
Epochs 100 (patience 20)
Batch 4
Optimizer Ultralytics auto · AMP
Seed 0
Train images 3,715
Hardware NVIDIA GPU (device=0)

Validation (final epoch)

mAP50 mAP50-95
Boxes (B) 0.399 0.284
Masks (M) 0.187 0.082

Mask scores are lower than the detect-only model — CAD linework is thin and class-imbalanced; use FloorCAD Detect when you only need boxes.

Training curves

Normalized confusion matrix

Intended use

Research and prototyping: instance masks on CAD rasters, area takeoff helpers, overlay visualization. Not validated for permitting or construction sign-off.

YOLOv8 weights are AGPL-3.0. Respect FloorPlanCAD paper/project terms if you redistribute source drawings.

Citation

@InProceedings{Fan_2021_ICCV,
  author    = {Fan, Zhiwen and Zhu, Lingjie and Li, Honghua and Zhu, Siyu and Tan, Ping},
  title     = {FloorPlanCAD: A Large-Scale CAD Drawing Dataset for Panoptic Symbol Spotting},
  booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
  month     = {October},
  year      = {2021},
  pages     = {10128-10137}
}
@software{ultralytics_yolov8,
  title  = {Ultralytics YOLOv8},
  author = {Jocher, Glenn and Chaurasia, Ayush and Qiu, Jing},
  url    = {https://github.com/ultralytics/ultralytics},
  license = {AGPL-3.0},
  year   = {2023}
}

Author / contact

MudasirSr. AI Engineer at ECODA (에코다), building multimodal AI for architecture and building-performance workflows. MS AI Convergence, 숭실대학교 — Soongsil University, Seoul. More credentials, publications, and projects: mudasir13cs.github.io

Downloads last month
221
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mudasir13cs/floorcad-yolov8n-seg

Finetuned
(203)
this model

Dataset used to train mudasir13cs/floorcad-yolov8n-seg