## 4 Proposed Method  
### The GAN Architecture  
Our method aims at translating images from the target domain to the source domain using two GAN networks as illustrated in Figure 3. The entire procedure makes the target domain images imitate the source domain characteristics, which include the quality of images, types of sensors and resolution, among others. The mapping process between the target and the source is done in two steps. First, the chosen image from the target is mapped into semantic label using the first GAN Network. Then, the generated label is mapped using the second GAN network into another image that looks like images from the source domain distribution. The two networks are trained separately using paired datasets. We used a modified architecture from the standard GAN that is inspired by some recent architectures [20; 45]. The first GAN Network is designed by substituting the noise vector in the traditional GAN Network by images from the target distribution. The data generated by this GAN Network are the semantic label of the entry image. The training process is done using a small-sized dataset constructed from a few samples from the target domain and their semantic labels. The mapping function of the generator, \(G:X\to L\), learns through an adversarial training how to produce the semantic label \(L\) of the target image \(X\). Because the target is supposed to have a minimal set of labels, we assume that the provided labeled images are only a few significant samples from the target dataset. We mean by significant samples the existence of two constraints during the selection of the images. First, the sampled images should contain all the semantic classes of the dataset. Second, for each class, we should choose samples with the most available representations of the class inside the dataset. The discriminator \(D\) learns during the adversarial training how to differentiate between real pairs \((X,L_{original})\) and the fake pairs \((X,L_{generated})\). While the discriminator improves its ability to detect fake pairs from real pairs, the generator improves its ability to generate the true semantic labels of the input image. The architecture of the generator and the discriminator in the first GAN network is illustrated in Figure 4.  
Concerning the generator, it is an encoder-decoder architecture with skip-connections. It is similar to U-Net [10] architecture. Eight convolutional layers are used for downsampling in the encoder part and similarly, eight deconvolutional layers are used for upsampling in the decoder part. Leaky ReLu [46] is used as the activation layer for all the layers of the encoder except the first one. Leaky ReLu is identical to the standard ReLu in the positive region. However, in the negative part, it has a small slope \(\alpha\). Explicitly, it is defined as \(LeakyReLu(x)=x\), if \(x>=0\); and as \(LeakyReLu(x)=\alpha x\), if \(x<0\). \(\alpha\) has a small value, which gives small gradient where \(x<0\). The encoder part ends by giving us a small feature vector of size \((1\times 1\times 512)\). This feature vector will pass through the decoder part to rebuild the original feature vector. We used skip connections to concatenate every layer output in the encoder part with the corresponding layer in the decoder part. ReLu is used as the activation function for all the layers of the decoder. Batch normalization [47] is used after every layer of network except the first layer of the encoder and the last layer of the decoder. We used dropout [48] in the first three layer of the decoder to reduce overfitting. We apply _tanh_ as an activation function to the last layer of the decoder to get the predicted label for the input image. Figure 3: The GAN architecture. Concerning the discriminator, it takes as input pairs of images from two sets. The first set is images from the target dataset associated with their real label \((X_{target},L_{original})\). Data from this set should be classified by the discriminator as real pairs of data.