# Vectorization of Floor Plans Based on EdgeGAN
## 2 Problem Description  
In this section, the ZSCVFP dataset and the goal of the new VFP framework are introduced.  
Framework Based on EdgeGANAs mentioned, current public datasets are all black and white without decorative disturbance. However, the original FPs provided by customers in practical applications are complex and diverse. Thus, the new dataset ZSCVFP is established for this reason. ZSCVFP contains 8800 FPs in the training set and 2000 FPs in the test set. For a given FP \(\mathbf{X}\in\mathbb{R}^{n\times h\times 3}\) where \(w\) and \(h\) are the width and height, respectively, the pseudo-annotations of walls, windows, and doors are given in the form of a point set \(\mathcal{P}=\{p_{1},p_{2},\cdots\}\) and three line sets \(\mathcal{L}_{wall}=\{w_{1},w_{2},\cdots\}\), \(\mathcal{L}_{window}=\{v_{1},v_{2},\cdots\}\), and \(\mathcal{L}_{door}=\{d_{1},d_{2},\cdots\}\), respectively. The elements of \(\mathcal{L}_{wall}\), \(\mathcal{L}_{window}\), and \(\mathcal{L}_{door}\) are paired points from \(\mathcal{P}\). The corresponding PFM \(\mathbf{Z}\in\mathbb{R}^{w\times h\times 3}\) is also provided in the dataset, as shown in the center subfigure of Figure 1.  
The walls' annotations are obtained by a conventional pipeline that has been developed by ourselves in a previous work. The doors and windows are annotated manually with a tool (Figure 3). When the annotations are inconsistent, the windows and doors will be adjusted according to the walls to keep the geometrical constraints on the primitives. This adjustment will reduce the accuracy of annotations more or less.  
In the new framework based on EdgeGAN, the generated PFM is denoted as \(\mathbf{Y}=G_{1}(\mathbf{X})\in\mathbb{R}^{w\times h\times n_{c}}\) where \(n_{c}\) is the number of categories of primitives to be recognized. For the dataset ZSCVFP, \(n_{c}=3\). Each channel of \(\mathbf{Y}\) is a binary image that corresponds to one primitive category. The final goal of the task, which is to extract \(\mathcal{H}=(\mathcal{P},\mathcal{L}_{wall},\mathcal{L}_{window},\mathcal{ L}_{door})\) from \(\mathbf{Y}\), is very easy if the quality of \(\mathbf{Y}\) is good enough.  
The set of text annotations detected in \(\mathbf{X}\) is denoted as \(\mathcal{T}=\{t_{1},t_{2},\cdots\}\), and the set of subspaces extracted from \(\mathbf{Y}\) is denoted as \(\mathcal{S}=\{s_{1},s_{2},\cdots,s_{n-1},s_{n}\}\). For each subspace \(s_{i}\), the feature vector consists of the number of windows, number of doors, ratio of area, etc. The feature matrix \(\mathcal{S}\) is denoted as \(\mathbf{X}^{\partial}\in\mathbb{R}^{n\times m}\), where \(m\) is the length of the feature, \(n\) is the number of subspaces. The probability matrix predicted by a GNN \(G_{2}\) is denoted \(\mathbf{C}=G_{2}\left(\mathbf{X}^{\mathcal{G}}\right)\in\mathbb{R}^{n\times n}\), where \(n_{s}\) is the number of classes.  
The formal representation of the new task's goal can be summarized as follows:  
1. Design a \(G_{1}\) to obtain the PFM that is robust with decorative disturbances in variant styles;
2. Search for efficient criteria to inspect whether \(\mathcal{S}\) is fully connected;
3. Design a GNN \(G_{2}\) to predict the category of subspaces.