# GAN-Based Map Generation Technique of Aerial Image Using Residual Blocks and Canny Edge Detector
## 3 Map Generation from Aerial Image  
This paper proposes a method for converting aerial images into high-quality maps. The core of this transformation process is to focus on key features such as roads and buildings in the aerial imagery while excluding extraneous elements not represented on the map. For instance, roads must be color-coded based on their type (e.g., regular roads, highways). Additionally, only the edges of buildings are marked, with the interior areas of buildings represented in a single color. The paper introduces a GAN-based generative network for image-to-image translation to achieve this. The proposed system comprises two main modules: a generator and a discriminator. The generator aims to generate indistinguishable images from real ones, while the discriminator's objective is to classify the provided images as real or fake accurately. However, existing image-to-image translation studies often encounter errors in accurately converting authentic aerial images to maps, with unnecessary details lowering the quality of the images. To address these issues, the proposed method incorporates Residual Blocks into each layer of the generator's architecture to better preserve critical features. Additionally, the method applies computational operations commonly used in image processing as loss functions to enhance the quality of the generated maps. Specifically, the difference between the Canny edge detection results is used as a loss function to process the edges of roads and buildings and remove unnecessary interior details. This approach is illustrated in the process described in Figure 1.  
The generator takes aerial image \(a_{real}\) as input and generates fake map images \(G(a_{real}))\) that closely resemble real maps. The generator mainly comprises three types of blocks: Down Block, Up Block, and Residual Block. Down Block is designed to increase the depth of the feature maps while decreasing the width and height dimensions. This block includes zero padding, convolution, normalization, and the ReLU activation function. After passing through a Down Block, the height and width of the feature map are halved and the channel depth is doubled. In contrast with the aforementioned Down Block, the Down Block* is the most proximal to the input. The kernel size is 7, the stride is 1, and replicate padding is employed to compute the feature map. In contrast, the Up Block performs operations that are opposite to those of the Down Block, with the objective of restoring the image size. In comparison to the conventional convolution operation, transpose convolution results in a reduction of the channel depth while simultaneously doubling the height and width. The Up Block* incor  
Figure 1: The overall process of the proposed method. portates replicate padding prior to the transpose convolution and replaces the activation function with Tanh. The application of zero padding serves to streamline the calculations and mitigate the risk of overfitting. However, this may result in the loss of edge information. Consequently, the design employs zero padding in certain blocks, while replication padding is utilized for sections proximate to the input and within the Residual Blocks. The generator's Residual Block consists of a sequence of convolution, normalization, ReLU activation, convolution, and normalization. In this block, replicate padding is used during convolution to maintain the same feature map size with a fixed kernel size of 3. The generator performs this Residual Block \(N\) times across four layers. After executing each block, the output is added to the previous layer's output and passed through the ReLU activation function. The discriminator includes three convolutional layers, with output channel depths set to 64, 128, and 1, respectively. A Leaky ReLU activation function follows each convolution operation, and after the final convolution, a Sigmoid function adjusts the output values between 0 and 1. Table 1 describes the detailed specifications of the proposed network.