A road map using Ai & computational design
# 01 the road map
To convert a 2D raster plan into a BIM model,
we first need to recognize the image contents and convert them into vectors, attaching relevant data.
So , Our process focuses on three stages: image-to-vector, vector-to-graph , and finally graph-to-BIM
During our tests , we found that a lot of paths could be taken ,
As an example , we can go from a basic geometry to a bim elements by using the power of speckle .
# 02 Raster to vector (A)
specific CNN architecture , designed for floor plan recognition is used,
The segmentation process follows the approach outlined in the paper “Deep Floor Plan Recognition Using a Multi-Task Network with Room-Boundary-Guided Attention.” This method enables a segmentation of key elements in the floor plan:
- Walls
- Rooms
- Openings
using the OpenCV library for contour detection and approximation.
The output requires post-processing to improve the quality of the lines. Could be done in grasshopper parametrically ,
Aslo we will explore more about other methods in the next slides .
# 02 Raster to vector(B)
we measured limits, quality and precision on a complex layout as the one of Villa Savoye by Le Corbusier and compare the outcomes. The test were done on: Grayscale image enhancement (CLAHE/adaptive thresholding), edge detection (Sobel/Canny), morphological cleaning followed by vectorized contour export (SVG or DXF).
Further refinements include contour simplification, line thickness classification, curve fitting, DXF simplification, and visualization as PNG.. (using ezdxf and matplotlib).
# 02.1.2 b
raster/vector (Apartment Floor Plan)
Raster Graphics – tests on typical layouts: ordinary floor plan
– Detect and classify architectural elements (walls, doors, and windows) and exports them into a DXF file using OpenCV for image processing, Hough Transform for line detection, and ezdxf for DXF export.
– Efficient Contour Detection: By using OpenCV’s contour detection, the code is able to extract meaningful boundaries from the input image, which is critical for vectorizing architectural elements.
– Noise Removal: The use of morphological operations ensures that small, irrelevant details (e.g., dots) are removed, providing a cleaner final result.Tools Used:
OpenCV: image processing (loading, grayscale conversion, thresholding, morphology, contour detection).
NumPy: creating and manipulating the kernel used in morphological operations.
Ezdxf: creating and exporting the DXF file containing the vectorized floor plan.
# 03 Vector to graph
# 04 Graph to bim
We initially exported the output from Colab as DXF and then using it manually ,
but we discovered that SpecklePy could be faster and more automated.
It allows us to send basic geometry directly from Colab to a Speckle stream, then convert the basic geometry into BIM elements using Rhino Compute and Speckle schema objects.
# 05 Conclusions
Initial conceptual idea reformed
to a roadmap for further development
LOOP – From Drawing References to GRAPH to BIM and back …!
tools :
Google Collab, Python 3, Grasshopper, RhinoCompute, Rhino 8, TopologicPy, SpecklePy, Fly.io, Rhino
…to future development of elements to be resolved
> Errors in creating windows or doors: Topologic Py in Colab installing “Vertices( ):The (floor plan) edges do not form a closed loop”.
- The issue occurs due to vertices being mistakenly treated as coincident, causing invalid edges, and can be resolved by properly managing vertex coincidence checks.
>enhance the quality of the output lines
- Enhance the result of the output lines from the segmentation method . as the output lines still not aligned in x,y axes .
>finding the wall center line, insertion point for openings
- Single line as the average of the lines forming the wall thickness is best to define the wall reference line in modelling steps
- Reference the window, door insertion point to the relevant wall
>Topologic Py: deployment in grasshopper environment
- Conflicts with native grasshopper components
- TopologicPy powerful library could “stand on its own” making the collaboration with Rhino and Grasshopper a step to be questioned or eliminated
>improve the automation & develop a user interface
- Avoiding the use of commercial software – making the workflow open source
- Making the work flow seamless from image to model
# 06 References
Related Works on Raster-to-BIM Conversion
1. Lee, H., Kim, S. H., & Lee, H. (2021).
“Automatic Building Information Model (BIM) Generation from 2D Floor Plans Based on Deep Learning”
This paper explores the automation of BIM model generation from 2D floor plans using deep learning. The authors employ Convolutional Neural Networks (CNNs) to detect and vectorize architectural elements such as walls and doors. Link: IEEE Xplore
2. Kobayashi, Y., Okabe, M., & Naemura, T. (2017).
“Raster to Vector Conversion of Architectural Floor Plans for Reconstruction of Building Information Models”
The authors present a method for converting raster floor plan images into vectorized formats for use in BIM reconstruction. The focus is on detecting walls, doors, and windows accurately through image processing techniques. Link: IEEE Xplore
3. Wang, R., Sekiyama, K., & Fukuda, T. (2016).
“Image-based 3D Reconstruction for BIM Model Generation”
This paper discusses the use of advanced image processing techniques to generate 3D BIM models from 2D images. The methodology integrates image data with 3D modeling processes to reconstruct accurate BIM models. Link: IEEE Xplore
4. Makowski, M. W., Mackiewicz, R., & Jeremin, T. (2019).
“From Floor Plan Images to 3D Models”
The authors provide a comprehensive pipeline for converting 2D floor plans into 3D BIM models. The approach combines image processing, machine learning, and manual adjustments to ensure precision in architectural element recognition. Link: MDPI
5. Novák, P. O., & Beneš, V. (2019).
“Automatic Generation of Building Information Models from Point Cloud Data”
This paper focuses on the generation of BIM models from point cloud data but includes relevant discussions on translating complex image-based data into vectorized models, making it applicable to 2D floor plan conversion. Link: MDPI
6. Yan, D. M., & Wonka, P. (2017).
“Vectorization of Raster Images: A Survey”
A comprehensive review of vectorization techniques that discuss various methods for converting raster images into vector formats. While not focused on BIM, the survey covers fundamental vectorization techniques relevant to raster-to-vector workflows. Link: ACM Digital Library
7. Cheng, B., Chen, S., & Liu, H. (2019).
“Deep Learning-Based Methods for 3D Building Reconstruction from Single Images”
This paper explores deep learning approaches to 3D building reconstruction from 2D images, which is relevant for generating BIM models. The use of CNNs allows for pixel-wise segmentation, making this a significant contribution to BIM automation. Link: IEEE Xplore
8. Zeng, Z., Li, X., Yu, Y. K., & Fu, C.-W. (2021).
“Deep Floor Plan Recognition Using a Multi-Task Network with Room-Boundary-Guided Attention”
This paper presents a multi-task neural network approach that focuses on floor plan recognition, using room-boundary-guided attention to enhance the detection of architectural elements. The method improves segmentation and vectorization, leveraging deep learning models to detect room boundaries and architectural components effectively.
Additional Multimedia and Interactive Tools Consulted:
YouTube Video:
“Deep Learning for BIM Automation: Floor Plan to 3D Model Transformation”
Link: https://www.youtube.com/watch?v=DSU0kvXIaPQ
This structured bibliography brings together the sources consulted and synthesized methodologies for your thesis, with a clear focus on deep learning, vectorization, and BIM generation. Github sources:
CubiCasa/CubiCasa5k: CubiCasa5k floor plan dataset (github.com)
VahidAz/Floorplan_dataset (github.com)
HanHan55/Graph2plan (github.com)
https://github.com/zlzeng/DeepFloorplan
https://github.com/zcemycl/TF2DeepFloorplan
https://github.com/AlhabibMaCad/TF2DeepFloorplan