MuraNet: Multi-task Floor Plan Recognition with Relation Attention

Lingxiao Huang, Jung-Hsuan Wu, Chiching Wei, Wilson LiICDAR Workshops 2023

Introduction

Automating the recognition of floor plans is a critical task for architectural digitization, yet it remains notoriously difficult. Unlike natural images, architectural drawings lack rich textures and colors, relying instead on simple lines, geometric shapes, and complex semantic relationships—such as the requirement that a door must be situated within a wall.

Traditional approaches typically address this problem through "siloed" models: one for segmenting the structural "mainframe" (walls) and another for detecting individual components (doors and windows). This separation is inefficient, as it fails to leverage the physical and logical dependencies between these elements. Furthermore, standard convolutional neural networks (CNNs) often struggle to capture the long-range spatial correlations necessary to interpret a building's overall layout. To address these challenges, we present MuraNet, a novel multi-task deep learning model designed to jointly perform pixel-level wall segmentation and vector-level component detection.

Methodology

MuraNet utilizes a unified architecture designed for multi-task learning, centered around a specialized backbone that captures structural dependencies.

Multi-scale Relation Attention (MURA)

The core innovation of MuraNet is the MURA module. While many vision transformers utilize elongated "strip" convolutions to reduce computation, these can be sensitive to the orientation of architectural lines. Instead, MURA employs a series of $3 \times 3$ convolution kernels. This allows the model to extract multi-scale features while remaining robust to the various angles and shapes inherent in floor plans.

Unified Encoder and Multi-Head Branches

The model features a four-level pyramid hierarchy encoder that generates features at multiple scales, capturing both fine-grained details and global structural context. These features are then fed into two distinct heads:

  1. Segmentation Decoder: Based on an integration of SegNeXt and U-Net, this branch aggregates multi-stage features to produce high-resolution wall masks.
  2. Decoupled Detection Head: Utilizing the YOLOX architecture, this head separates classification (identifying the object) from regression (locating the object). This decoupling is essential for stabilizing training within a multi-task framework.

Joint Optimization

MuraNet is trained using a combined loss function that simultaneously weights wall segmentation (via weighted cross-entropy to address class imbalance) and component detection (utilizing YOLOv3 loss functions). This joint optimization allows the model to learn the structural synergy between walls and openings.

Datasets

The model was primarily evaluated using the CubiCasa5k dataset, a large-scale public dataset containing 5,000 Finnish floor plan images annotated in SVG format. CubiCasa5k is widely considered the benchmark for high-quality, real-world architectural data. While other datasets such as CVC-FP, R2V, and R3D exist, the richness and scale of CubiCasa5k make it the superior choice for training complex multi-task architectures.

Results and Discussion

MuraNet demonstrates significant performance gains over established single-task baselines on the CubiCasa5k dataset.

Performance Metrics

  • Segmentation Accuracy: MuraNet achieved a 78.4% Intersection over Union (IoU) for wall segmentation, representing a +12.9% improvement over the standard U-Net baseline.
  • Detection Accuracy: In door and window detection, the model reached a Mean Average Precision (mAP50) of 91.7%, outperforming YOLOv3 (89.6%).
  • Training Efficiency: One of the most significant findings was the speed of convergence. MuraNet reached 99.9% of its final accuracy in roughly half the time required by standard YOLOv3 configurations, suggesting that the shared backbone learns a more meaningful representation of the data early in the training process.

Qualitative Insights

Visual analysis confirms that MuraNet is less prone to missing doors or creating fragmented wall segments compared to single-task models. This confirms the "structural synergy" hypothesis: by training on both tasks simultaneously, the features learned for wall segmentation assist in detecting doors more accurately, and vice versa.

Conclusion

MuraNet successfully demonstrates that multi-task learning, supported by a relation-aware attention mechanism, is highly effective for architectural floor plan recognition. By treating walls, doors, and windows as interdependent targets, the model achieves higher accuracy and faster convergence than traditional methods.

Future work will explore incorporating attention mechanisms directly into the detection heads and expanding the model's scope to recognize the 80+ additional categories present in the CubiCasa5k dataset, such as furniture and specific room types.

Summary updated

BibTeX
@inproceedings{huang2023muranet,
  author = {Lingxiao Huang and Jung-Hsuan Wu and Chiching Wei and Wilson Li},
  title = {{MuraNet: Multi-task Floor Plan Recognition with Relation Attention}},
  booktitle = {ICDAR Workshops},
  year = {2023},
}
Figure