## 2 Materials and Methods
### Image Synthesis through GAN  
The size of the dataset used here is small when compared to the ones generally employed in learning-based machine-vision tasks. Hence, augmentation through the adversarial networks was performed to increase the size of the dataset. Typically, a GAN architecture comprises a generator network that generates artificial images and a discriminator that aims to differentiate these artificial images from the real images [29]. Both components are simultaneously trained in an adversarial manner, in which the generator aims to entrap the discriminator using its artificial images. The first proposed GAN models did not have control over any auxiliary information on the data that were being synthesized. Later, researchers introduced a conditional variable into the network's objective functions that contained the network over a particular attribute to synthesize images with the desired features [47]. For instance, GANs were conditioned on text descriptions for text-to-image synthesis and on class labels to generate MNIST dataset digits [48]. Image conditional GAN was first studied by [PERSON] et al. [40] for image-to-image translations.  
In cGANs, the generator and discriminator networks are conditioned on the class label \(y\), i.e., mapping to \(y\) is learned from the input image (or source image) \(x\) and the random vector \(z\). The objective function can be given as:  
\[\mathrm{L}_{cGAN}(G,D)=E_{x,y}[\log D(x,y)]+E_{x,z}[\log(1-D(x,G(x,z)))] \tag{1}\]  
Figure 1: Sample images of (**a**) Charlot, (**b**) Fat Hen, (**c**) Shepherd’s purse, (**d**) Small-flowered Cranesbill, and (**e**) Maize.  
The cGAN architecture employed here is very similar to the model proposed in its original work for image-to-image translation, called the _pix2 pix_ GAN [40]. The model is trained with paired images, i.e., the real and binary analog, in order to learn to map the features of these images. The attributes of the output image are conditioned by the source images (here, the binary images act as the source images). Suppose \(T\in\mathfrak{t}^{w\times h}\) is the binary mask of an image with width \(w\) and height \(h\) pixels, the network's goal is to make the model learn a mapping function that converts \(I\) into a photo-realistic image. Figure 2 shows the image generation workflow. The generator follows the U-Net framework [49], and the discriminator classifier is based on the PatchGAN [50]. The U-Net is an encoder-decoder network where the input is first down-sampled to a bottleneck layer and then up-sampled from this point. Moreover, skip connections (which concatenate the channels for the two layers) are added between the \(i\)-th and \(n-i\)-th layers (\(n\) is the total number of layers). The PatchGAN discriminator classifies every \(patch\) in the image as real or artificial and the final output is determined by the average response. Overall, the generator model used here is a set of convolutional down-sampling layers and transpose convolutional up-sampling layers that are blended through a bottle-neck layer. The discriminator consists of six convolutional layers, such as an \(8\times 8\) pixel patch, which is obtained at the end. From this patch, the binary classification result (real image or generated image) is acquired.  
To monitor the fidelity of the generated images after each iteration, the t-distributed stochastic neighbor embedding (t-SNE) visualization is used. The t-SNE algorithm presents the similarities between the samples by iteratively comparing the probability distribution of the different data points in high- and low-dimensional spaces [51]. By applying t-SNE to the real and generated images, the similarities and variances of the images can be further analyzed. Once the training is complete, new images are generated and amassed to analyze through the classifiers (see Sections 2.3 and 2.4). An Acer Nitro 5 Intel Core i5 9 th Generation Laptop (32 GB/1 TB HDD/Windows 10 Home/GTX 1650 Graphics) was used to run the _MATLAB_ application.