Performance Improvement of Generative Adversarial Networks to Generate Digital Color Images of Skin Diseases

The main task of creating new digital images of different skin diseases is to increase the resolution of the specific textures and colors of each skin disease. In this paper, the performance of generative adversarial networks has been optimized to generate multicolor and histological color digital images of a variety of skin diseases (melanoma, birthmarks, and basal cell carcinomas). Two architectures for generative adversarial networks were built using two models: the first is a model for generating new images of dermatology through training processes, and the second is a discrimination model whose main task is to identify the generated digital images as either real or fake. The gray wolf swarm algorithm and the whale swarm algorithm were relied on to generate values that improve the performance of GANs and insert them into the generator instead of random values, which in turn worked to reduce the loss values for the generated images. Loss values were adopted as a measure of optimizations for each epoch, and the fastest access time to actual digital images for each skin disease was adopted. Before the optimization operations, 50% accurate images of skin diseases were obtained; after the optimization operations, 98% accurate images of skin diseases were obtained.


Introduction
Generative adversarial networks (GANs) are a fast-developing area that creates real-world examples of various issues.Image-to-image morphing problems include transforming summer photographs into winter ones or day images into night ones, as well as creating realistic representations of items, locations, and people so that it is impossible to guess that these resulting images are fakes.In the field of computer vision, data augmentation is a cornerstone of deep learning architectures.Increasing data leads to improved model performance, which improves model skill and lowers generalization error.It generates new, proportional samples in the problem area to train the model on.When the data is fictitious, simple techniques such as zoom in, zoom out, rotation, etc. are used [1].
If a machine could innovate, it could show that the machine was able to independently model its input data.In the field of machine learning, this type of creation is currently the most feasible way to create models.The computer can plot samples that are not in the training set but follow the same distribution using the learned generative model [2].
The GAN is made up of two neural networks: a generator and a discriminator.The generator is attempting to trick the discriminator by producing genuine samples.The discriminator is attempting to distinguish between real and artificial samples.As a result of this type of confrontation game, the performance of the generator and discriminator improves over time.The generator can attain pseudo-output after reaching Nash equilibrium.However, this theoretical equilibrium between the two networks only exists in theory, and actual GAN training has its own set of issues.The first is the instability of GAN training, and the second is the network collapse, which causes the generation process to collapse [3] and [4].
An image-generating application, GAN, is the most popular.Of course, computer vision has a wide range of applications, including image sketching, image annotation, object detection, and semantic segmentation.Because training GANs for textile programming tasks is more difficult and requires more technology, the use of GANs in processing and creating images that are similar to real photographs is a rapidly growing trend.This makes it a demanding yet exciting research subject [5].

Related Work
Since GAN's inception in 2014, a huge number of studies on the topic have been published in important journals and conferences to develop and examine GAN's mathematical research, improve research on the quality of GAN generation, image generation from GAN in image generation as well as applications (specified image synthesis, text-to-image conversion, image to image, video), and the application of GAN in NLP and other fields.Image generation is the most studied, and experimental research results in the field of medical image generation showed the multiple possibilities of using GANs in generating a diversity of medical images.GAN issues don't just stop with its development.There are plenty of articles about the continuous improvement of the GAN, including: Yu et al. [6] released a study report in 2019 in which a facial recognition system was employed by a variety of entities, including social media, identity verification, and security services, to identify people.Face-transformation techniques, according to the researchers, pose a hostile challenge to a person's facial recognition system.This is especially true when employing the generative adversarial networks (GAN) approach to alter faces.GANs have been researched to detect distorted facial images to combat facial morphing.This was accomplished by generating a huge number of modulated images with GAN.
Researchers Alonso-Monsalve and Whitehead published an article in 2020 [7] proposing the use of a model-assisted generative adversarial network (GAN) to generate fake images that accurately match genuine images by altering model parameters defining visual attributes.The model's parameters are evaluated by the generator, which produces fake images that are closer to the genuine ones.The best-produced match parameters and the real values were found to agree.
Rao et al. [8] presented a study in 2021 that proposed an algorithm to transform the input image matrix into a new output image by applying better noise to the latent space parameters of the original image (LSR).The identity of the synthetic image was concealed by using welldesigned noise computed on the gradient during the learning process, resulting in a realistic image that was resistant to inversion attacks.a lot more simply to improve the efficiency of the technique, the Deep Convolutional Synthetic Adversarial Network (DCGAN) was deployed.
In 2022, researchers Thomas, Nambiar, and Mittal [9] presented a paper that examined a sonar image collection created specially to address the absence of open datasets in the area.To accomplish the task with a small number of data samples, a pre-trained ESRGAN deep learning model of the generative adversarial network (GAN) was employed.Three applications of the suggested method were made.Use of the pre-trained model directly, model tuning using VGG-19 feature extractors in the discriminator, and model tuning using ResNet-34 feature extracts on the discriminator are all examples of tuning methods.Image quality assessment criteria, including PSNR, SSIM, and Perceptual Index, have been used to certify ultra-high-resolution images.
In 2022, Zhang et al. [10] presented a paper that offered a system for producing thinner chips (e.g., greater resolution at the "Z" level) with smoothing and deblurring, termed SOUP-GAN: Optimized Super-Resolution Using a perceptually tuned generative adversarial network (GAN) based on qualitative and quantitative comparisons, the suggested method outperforms existing conventional resolution improvement techniques and SR's earlier work on medical images.The model's ability to generalize SR ratios and randomly choose user-selected imaging modalities was investigated.Our model has the potential to be used in both clinical and research settings as a revolutionary 3D interpolation technique with SR technology.

The Proposed Method
The development in the field of artificial intelligence has progressed so tremendously that it has become difficult to follow it.Although GAN is quite good at creating images, the training process is very insecure and requires a great deal of effort to achieve good results [11].To overcome the model collapse problem, several solutions have been proposed, including using the discriminator to compare the small batch of real samples with the samples created from the short batch [12].Figure 1 shows generator and discriminator models for generating skin disease images.

Figure 1: Generator and discriminator models
By evaluating the sample's distance in the latent space, the discriminator can assess whether the generated sample is too similar to another created sample.Although this method is effective, it is very reliant on the attributes utilized in distance estimations.GAN's main method of generating images is a direct method through an iterative method with a layered approach [13].Figure 2 shows a data processing diagram.The generator Xfake generates the hidden variable (typically random noise with a Gaussian distribution), and the discriminator determines whether the data is Xfake or Xreal.The following is the ideal objective function: Discriminant D considers this problem a binary classification problem, where V (D, G) is the binary classification problem's co-entropy loss.To deceive D as much as possible, use generator G. Multiply the sampling product of the discriminant probability D (G (z)) of the generated dummy sample, i.e., reduce the equation log(1-D (G (z))), and the term D (x) has no bearing on the generator G and may be ignored [14].
During actual successive training processes, the generator and discriminator architectures exchange training and testing processes, i.e. first D training, then G training, and continuous exchange.It should be noted that it reduces maxD V(G, D) for the generator, which works to reduce the large limits of the value of V (D, G).To make sure that V (D, G) is implemented and the best value is achieved, the discriminator is usually trained for k iterations and then iterates the generator once.When the generator G is fixed, we can take the derivative of V (D, G) to find the optimal discriminant D*(x): Using a model to generate forecasts is a problem in creating images of dermatology in deep learning.Thus, the data set must be specified to conduct the training operations, which are called training samples, so that the input variables are (X) as well as the labels for all the inputs, and the output is (Y).After the algorithm starts training the models by displaying the samples, the output prediction stage begins, and the model is corrected so that the output results are consistent with the target output.

Dataset
The dataset was compiled for training and generation of new images from the digital image set of dermatology in the ISIC 2020 (International Skin Imaging Collaboration) archive.ISIC is interested in providing digital images of a variety of dermatological conditions by following the guidelines and directions for dealing with the possibilities, tools, and fixtures used in skin imaging with the latest capabilities of digital cameras and bright lighting, paying particular attention to people's privacy, security issues, interoperability, and allowing image sharing across technology and clinical systems.The ISIC archive also provides open-source data procedures for digital images of dermatology to test and validate proposed criteria [15], [16].Figure 3 shows a selection of dermatology images from the ISIC paper.Increasing the training data set, which is acceptable in the realm of computerized thinking, is one of the most essential approaches to creating and improving the efficiency of artificial intelligence algorithms.Data augmentation improves the capabilities of convolutional neural network architectures for quick learning [17,18].The AI model's data set may be insufficiently rich and appropriate, which reduces the accuracy of the work algorithms.The more training examples the model has, the better it will work and the more accurate it will be [19], [20].Figure 4 shows the use of flip, image cropping, a Gaussian filter, image scaling, 90°, 180°, and 270° rotations, and image offset to improve the training data set.

Generative Adversarial Networks Architectures
To generate samples from the generator model side, work is done to insert a random vector with a fixed length and generate a sample in the problem area.A vector space contains hidden variables, also known as latent variables, that must be related to the problem domain and are not visible.Vector space can be defined as the densely distributed data within the problem domain that represents high-level concepts of the raw data, such as the distribution of input data.On the other hand, the new data generated from the latent field is fed and considered input into the generator model to generate new and unique examples.The statistical latent space is introduced into the machine learning architectures to produce the shapes, types, and colors of skin diseases by generating new technical images of a similar nature to the training data images for the problem area.After the training is completed, the generated models must be kept for use in generating new digital images [21].
After obtaining the generated models that are different in the training process, the generator model creates a set of samples that are then presented to the discriminator in parallel with the real examples to be classified as real or fake.Figure 5 shows the generation architectures.The next stage is the process of updating the discrimination model to improve the discriminators, and this will update the generator model depending on the quality of distinguishing new samples from the discriminator.A generator can be considered a tool for creating new samples that are very similar to the original samples, and a discriminator is a tool for identifying counterfeit samples.To achieve the highest accuracy in image generation, the generator model must learn to generate samples from the same training data and create new images that are indistinguishable from the original images.On the other hand, the two models must compete in a zero-sum game by deceiving one of the models for the other [22].
The discriminant model's main purpose is to discriminate between actual and manufactured samples.When the procedure works, the model parameters are not changed, whereas the generator model is penalized by making significant changes to the model parameters.The generator deceives the discriminator by rewarding the generator for not changing the model parameters while penalizing the discriminator for making significant changes to the model parameters.With these procedures, the generator will be able to generate flawless replicas of the input field every time, and the discriminator will be unable to discern the difference by half in each case [23].
Generative adversarial networks have been developed to be used to conditionally generate results to train the generative model to create various new cases of input augmentation areas, where the input comes from a vector, by applying intelligent optimization algorithms from the conditional latent space with some additional inputs [24].The used optimization algorithms, Gray Wolf Optimization and Whale Swarm Algorithm, direct the generator to generate better skin disease images, as shown in Figure 6.In this case, entering the values is a conditional model directed so that the generation processes are in a specific field.In this way, to produce samples from a domain of a specific type, conditional generative adversarial networks might be employed.

Swarm Optimization 3.3.1 Gray Wolf Optimization
Gray wolves in nature have a leadership structure and a hunting process that the Gray Wolf Optimization algorithm resembles.Wolves are divided into alpha, beta, delta, and omega wolves [25].The most important characteristic of the wolf's community is that it has a strict social hierarchy and is divided into four levels.The social order of wolves has been linked to the solution of a mathematical model [26].The alpha solution is the one that is most suitable.The second and third best answers are beta and delta, respectively.Omega is assumed for the rest of the possible solutions [27].The hunt (optimization) is led by alpha, beta, and delta wolves, with omega wolves trailing behind.

Whale Swarm Algorithm
Whales are a gregarious species that live in pods.In the search area, all of the whales use ultrasound to communicate with one another [28].Each whale has a degree of computing capacity that allows it to compute the distance between itself and other whales.Each whale's fitness is linked to the type and quantity of food it finds.The movement of a whale is led by the whale closest to it, which is fitter than it [29], [30].

Results:
GAN has had a lot of success with image generation, which is unquestionably dependent on GAN's modeling abilities in the game and ultimately results in the generation of both fake and actual images.Separate iterative training is performed because the generative and discriminative models in the generative adversarial network are fully different and cannot be taught at the same time.Regardless of the quality of the sample that was manufactured, the discriminant model serves to identify the label of the original sample as real and the label of the created sample as fabricated.
The difficulty of converting a possible representation of one scene to another, such as translating an image's structure into an RGB image or vice versa, is known as "image-to-image conversion."This issue has to do with transferring a style from one form to another.The output is an image in the style of the content image and image style, and the style transfer can be from the content style or image style.Because it not only transfers the pattern of the image but also manipulates the properties of the object, image-to-image conversion can be considered a generalization of pattern transmission.Figure 7 shows the images of skin diseases produced before optimizing the architectures of generative adversarial networks.An interesting and important thing is the ability to modify fake images created as a method of pattern transmission, where the characteristics of one image of a skin disease are combined with those of other images of the same skin disease, and the resulting digital image is changed accordingly.This experiment allowed the creation and modification of skin images to an amazing degree by improving the architectures of the generative adversarial networks based on the intelligent swarm algorithms, and the effect of this can be seen in Figure 8 within the resulting image network.The shape contains the original images that have the characteristics of a particular skin disease and is then combined by transferring the pattern to the other images to produce a new network of images of the same skin disease that were not present.The architectures, after optimization, were trained to generate dermatological images with 50 epochs, and in each epoch, 50 new digital images of dermatology are generated.Table 1 shows the value of the loss scale for each epoch and the quantum of improvement that occurred for each architecture.The resulting skin disease images have dimensions of 128 x 128, and these dimensions are considered very suitable to be inserted into the convolutional neural network architectures to perform classification operations, but by observing the resulting images, it was found that their quality and accuracy are low, as shown in Table 1, and this negatively affects the classification operations.The performance of the used generative adversarial network architectures needed to be improved.When generating images of specific skin diseases, it was found that the distance between the image in the source field and the corresponding image in the target field is highly correlated.It can be proved that the model will converge and the two will find equilibrium when the amplitudes of G and D are sufficient.
The training dataset, for example, contains digital photographs of five classes of dermatology data, but in extreme instances, the generator must learn to create one class perfectly to entirely mislead the discriminator, after which it must stop trying to create the other four.The lack of four more digits is an example of the breakdown of the model between classes.One example of the breakdown of the situation within the class is that each class of skin disease contains many texture patterns and color variations, but the generator only learns to create an ideal sample for each class to successfully deceive the discriminator.The loss scale graphs for all generation architectures are shown in Figure 9.     Before the optimization operations, 1250 digital images of dermatology data were obtained from a total of 2500 images, thus the accuracy rate is 50%.After the optimization operations, 2450 accurate actual images of skin diseases were obtained from a total of 2500 images, thus the accuracy rate is 98%.

5.Conclusions
The process of generating digital images of dermatology has the significant and distinct benefit of increasing training data and, thus, the accuracy of classification.The traditional data augmentation processes are done through repetition of the same data in different formats such as rotation, displacement, and others, while in this research, completely new data was generated inspired by the original dermatology data, which will give a wider space for realizing the diversity of these diseases.New and diverse digital color images of three types of skin diseases (nevus, basal cell carcinoma, and melanoma) with dimensions of 128 x 128 and type (RGB) were generated.After applying the working architectures and obtaining the results, it was found that the images generated after performing the optimization operations were much better in terms of texture clarity and color accuracy when compared to real photos of each skin disease.One measure of accuracy that has been relied upon is determining the fastest access to actual digital images of each skin disease.Before the optimization operations, actual images that could be used for training data were obtained after the 25th epoch, while the same actual digital images were obtained after applying the optimization architectures after the second epoch.The optimization operations led to obtaining the actual digital image data more effectively and in a shorter amount of time.

Figure 2 :
Figure 2: Generator and discriminator models, B: Data processing diagram

Figure 5 :
Figure 5: Architectural image generation of dermatology, A: Discriminator model B: Generator model

Figure 6 :
Figure 6: Scheme of the optimization algorithm for generation architectures

Figure 7 :
Figure 7: Images of the resulting skin diseases before optimizing the architectures of

Figure 8 :
Figure 8: Samples of images of generated dermatology, A: Nevus, B: Basal Cell Carcinoma,

Figure 9 :
Figure 9: Schematics of dermatology image generation architectures before Enhancement, A: Nevus Image Generation Results Diagram, B: Basal Cell Carcinoma Image Generation Results Diagram, C: Melanoma Image Generation Results Diagram , and 12 illustrate the training schemes after the improvement processes.

Figure 10 :
Figure 10: Nevus Image Generation Scheme, A: Enhancing Using GWO Algorithm, B: Enhancing using the WSA algorithm

Figure 11 :
Figure 11: Basal Cell Carcinoma Image Generation Scheme, A: Enhancing Using GWO Algorithm, B: Enhancing using the WSA algorithm

Figure 12 :
Figure 12: Melanoma Image Generation Scheme, A: Enhancing Using GWO Algorithm, B: Enhancing using the WSA algorithm

Table 1 :
Loss values for dermatology image generation processes