GraFix is a Graph Neural Network based project started at AECTech Hackathon 2022. It is a collaborative effort by Omid, Yankun, Mostapha, Yuan-Tung, Mingbo, Sila, Taro, Alireza. The target is to fix 2d floor plan mis-alignment assuming the floor plan as a graph data structure, in which rooms are nodes and adjacencies are edges.
The architecture 2d/3d models from architects are often "broken" and things are not precisely aligned. The time put in to manually fix the errors in the models usually taken about hours and sometimes even a week depending on the size of the model, and there is not a relatively good solution exsiting on market to optimize the fixing process. Therefore, we take on this challenge ourselves and use the power of graph neural network model to tackle this problem. If you are new to Graph or Graph neural network world, here are some good beginner friendly articles that make it easy to understand -> Introduction to Graph Neural Network | Understand Convolutions on Graph.
We used the modular building generative model Yankun worked on in the past to generate the synthetic floor plan dataset. Each of the floor plan data could contain the number of boxes from 4 to 8, and we destroy the good "floor plan" to a broken state to train the machine to learn:
- What is bad floor plan?
- Which corner of the box to move in order to fix the "floor plan"?
Graph Neural Network is able to learn the buttom logic of the fixing logic from small batch (2000 data) of small floor plan training samples, and we can apply the training result on relatively larger "floor plan" that contains more boxes. This is greatly advantageous and separates Graph Neural Network from other neural network models.
The result on a relatively larger floor plan(more boxes) is very promising given that we only trained the gnn model with 2000 synthetic simple data, and each training was so fast that it took about 5 minutes. The loss curve is going down and the learning curve is going up, both of the curves do not seem flattening, which gives us the hope that it would perform even better with much larger dataset mixed with realistic floor plan data.
This can't be done without any one of this team, and it is an exciting beginning of something great!
Click the images to visit their github pages!
Synthetic data generator requires Rhinoinside python dependency to be installed, and you need to have Rhino license for it to run. However, feel free to use open-sourced geometry libraries and swap out Rhino dependency. The main geometric operations involved are:
- Find curve and curve intersection
- Create Point
- Create Vector
- Create Geometry plane to plane translation
- Create Curve from Polyline
- Create Polyline
To run this project, you would need:
- python 3.7+
- pytorch 1.12.2
- pytorch.geometric 0.8.0
- networkX