# Vectorization of Floor Plans Based on EdgeGAN
## 1 Introduction
[21] in 2014. GAN has sprouted many branches, including conditional GAN [23; 24], Wasserstein GAN [25; 26], pix2 pix [27], and has been used successfully in image translation, style migration, denoising, superresolution and repair, image matting, semantic segmentation, and dataset expansion [28; 29]. GAN is a general-purpose solution for translating an input image into a corresponding output image with the same setting, which is mapped pixels to pixels. One important milestone of GAN for image translation is pix2 pix introduced by [PERSON] et al. [27], which is developed from conditional GAN [24]. The most usual architecture of the generator is the encoder-decoder or its improved version \"U-Net\" with skip connections between mirrored layers in the encoder and decoder stacks [20]. [PERSON] et al. [30] expanded pix2 pix to high-resolution image synthesis and semantic manipulation by introducing a new robust adversarial learning objective together with new multiscale generator and discriminator architectures. In another work of [PERSON] et al. [31], a video-to-video translation framework with spatial-temporal adversarial objective achieved high-resolution, photorealistic, and temporally coherent video results on a diverse set of input formats including segmentation masks, sketches, and poses. CycleGAN is another important milestone for the unpaired image-to-image translation [32]. Two independent works also proposed the same method inspired by different motivations, namely, as DuelGAN [33] or DiscoNet [34]. Pix2 pix learns the forward mapping (i.e., \(y=G(x)\)), whereas CycleGAN learns two-cycle mappings (i.e., \(x=F(y^{\prime})=F(G(x))\) and \(y=G(x^{\prime})=G(F(y))\)) with the input \(x\) and output \(y\) unpaired. Considering that pixel-level annotation for most tasks is impossible, CycleGAN has a wider range of applications while requiring the training of more samples. In this work, a new VFP framework based is proposed based on pix2 pix. The main contributions of this work are presented as follows:  
1. A colorful and larger dataset called ZSCVFP is established. Unlike current public datasets, which only contain black and white FPs without decorative disturbance or style variation, such as CVC-FP [14] and CubiCasa5K [35], ZSCVFP's FPs are drawn with decorative disturbance in different styles, thereby causing difficulty in the extraction of primitives. The ground truth annotations in the form of points and lines, together with the corresponding images, are provided. Furthermore, ZSCVFP has a total of 10,800 samples. This number is higher than the 121 and 5000 samples of CVC-FP and CubiCasa5K, respectively. 2. VFP is formulated as an image translation task innovatively, and EdgeGAN based on pix2 pix is designed for the new task. EdgeGAN projects the FPs into the primitive space. Each channel of the primitive feature map (PFM) only contains some lines that represent one category of primitives. A self-supervising term is added to the generative loss of EdgeGAN to enhance the quality of PFM. Unlike conventional pipelines (even if some modules are replaced with deep-learning methods) that consist of a series of carefully designed algorithms, EdgeGAN obtains the FVG in an end-to-end manner. EdgeGAN is about 15 times as fast as the conventional pipeline. To the best knowledge of the authors, this study is the first to apply GAN in VFP. 3. Four criteria, which are sufficient conditions for a fully connected graph, are given to inspect the connectivity of subspaces segmented from the PFM. The connective inspection can provide auxiliary information for the designers to adjust the FVG. 4. The graph neural network (GNN) is used to predict the categories of subspaces segmented from the PFM. Given that GNN treats the adjacent matrix of the connective graph as weights directly, it can utilize global layout information and achieve higher accuracy than other common classifying methods. This work is organized as follows. Section 2 establishes the ZSCVFP dataset and introduces the goal of the new VFP framework.