Modeling of Human Skin by the Use of Deep Learning

Deep learning (DL) has matured well over time and resonated in various domains of computer applications. Pattern recognition gets more attention in machine learning field to take advantage of data available for modern life. Recognition by using the technology performance is worthy in terms of skin and other human features; this research tries to extract useful features from the skin and then classify these features under certain condition./emain objective of this study is to detect the skin diseases early and classify them for correct treatment. Using improved classifier (ISVM) to be adaptive with requirements of our task, many advantages can be got with this technique and it is useful in the fields of medicine, human health care, and diagnosis and life threat. Applying good classifier with best feature selection achieved good result in terms of accuracy, 95%, and recognition rate, 93%./is study concluded that adopting best strategy in selecting features and classification yields better prediction in emergency case before medicating the patient even during treatment.


Introduction
Skin cancer is ranked second for causes of worldwide death (except COVID-19 in 2020 [1]); the spread of this cancer is actually uncontrolled as well as separation (division) of the cells [2]. A survey study reported by World Health Organization (WHO) introduced that there were 9.8 million deaths caused by cancer in the year 2018 [3,4]. Cancer in general causes the death of almost 1 in every 6 around the world. 70% of deaths caused by cancer occur in poor and developing countries (low-income countries) [5]. e integumentary system is considered the largest thing in the human, skin which is covering the outer layer of the body [6]. Skin gives immunity to the human body and is considered important to protect the body against pathogens [7].
Cancer of the skin can be classified into squamous and basal cell carcinoma and melanoma which is difficult to detect and cure in time [7]. e survey introduced by WCRF (World Cancer Research Fund) in 2018 shows that melanoma can affect man and woman to the same extent; for example, 0.3 million cases were detected early. Actually, countries with the most cases of melanoma in both men and women are Australia and European Union countries [8]. While this field has been studied for decades, still there is no robust method that can treat prescreening cancerous lesions.
ere is a limitation in terms of factors, which are acquisition time, imaging system cost, computational algorithm, and expertise, necessary for operation technology. Imaging technology plays an important role in diluting the challenge via developing processing of software and hardware [9].
Melanoma is considered as a malignant tumor present in melanocytes cells, which produce light-absorbing pigment named melanin. Melanin is reflected on the skin color in addition to protecting it from UV light that comes from the sun [10]. Image of the skin is classified in the beginning by proliferation of melanocytes among outer layer called epidermis with another layer called dermis. When detected early, the tumor will be less than one mm and then it can be easily treated with local surgery which is a good detection. But, in general, cancer is difficult to detect at this stage and moves around the human body far from the original point of tumor [11]. Unfortunately, there is no blood test that can detect or test the melanoma, so we used image of the tumor to detect the tumor. Exposed region of the skin is named epidermis, while the hidden one is called dermis. e ultraviolet (UV) effect by radiation on the skin causes change in genetics of DNA composition. Melanoma affects different types of skin such as fair skin, dark skin, freckling skin, and heredity [12]. ere is a difference between mole and melanoma in the image as shown in Figure 1.
Color of the melanoma may be black, brown, blue, or red, and it could be colorless. Melanoma may grow on different parts of the human skin exposed to the sun such as face, neck, leg, or trunk. ere are two types of dangerous melanoma, basal and squamous cell, and they are difficult to detect normally or abnormally early. When the cancerous cell is detected at an early stage, this may provide opportunities to treat the tumor. Basal cell carcinoma attacks tissues and bones under the skin and then spreads in other areas of the skin [13].
Skin texture with color gives an important sign to the people to know different cultures between each other and also reflects the age, health, ethnicity, and beauty. Skin in the image and video has been interesting in the last decades with extensive researches [14]. A peculiar process was used to detect skin and nonskin area with image processing by using binary classification to the pixels extracted from segmentation process for finding certain skin region [15]. Skin detection was followed by many processes including training method as well as many methods such as preprocessing and postprocessing. Skin detection usually uses features extracted from pixels mainly by color pixels and illumination from these pixels and acquisition device, which is interesting here. Skin detection consists of many procedures when it is used within applications; it required computational issue, transformation equation, occlusion of partial segment, and complex problem [16]. Nonlinear behavior occurs in skin detection due to pixels' illumination and reflection. Most of pixels' illumination is considered in preprocessing stage of undetectable performance, so corrected method in this issue is required by estimated technique. In real world, static image preprocessing of skin detection can solve some but not all problems, and using some acquisition device may solve this problem.
Skin detection can be considered as a challenging issue and has been researched much in literature. Many methods were suggested in literature to try to get good results with different devices [17]. Good device can help detect skin melanoma by algorithm. Figure 2 shows clear images of different types of melanoma.
Human skin is considered as the largest organ and it can be affected by different parameters such as UV radiation, lifestyle, alcohol, smoking, and environment. Other factors that affect the skin are illnesses and diseases. In this study, an algorithm is proposed and improved to classify skin diseases. Multiple steps are used to increase the performance of the classification. Same as existing methods, as shown in Figure 3, the proposed system consists mainly of three main steps.
In terms of machine learning detection and classification of skin diseases, difference from deep learning will also be explained in this study, as well as the proposed improved method to be used to help human health if applied in such field. Using algorithm with good performing and computer technology for early skin detection is necessary to achieve high accuracy with the aim of advancement in computer devices and image processing techniques.
Traditional techniques in machine learning which produce intelligent diagnosis mostly include preprocessing step, segmentation process, and extracting features from segment object and then the final step is classification [18]. For the first step, preprocessing removes the noise from the image and improves the segmentation; noise in the image is caused by many factors such us capturing environment and devices, in addition to lighting conditions. e noise may be in the form of black frame, bubbles of air, skin lines, circles, hairs, and blood vessels.
is study motivates to use modern algorithms to detect tumors of the skin accurately and avoid or reduce the radiation that arises from the medical examination devices. Use of deep learning algorithm is worthy in this issue and proved by the results of the proposed method.
Early detection of the skin tumors is the main objective here and new features are extracted and classified using improved classifier via weights derived from contributing features, followed by learning system with huge dataset in advance to be able to detect with testing mode in real data. e remainder of the paper is organized as follows: e second section discusses literature review to investigate the most important existing methods. e third section is devoted to discussing deep learning in order to know the background of proposed methods. e proposed method is discussed in detail in the fourth section. Results are analyzed in the fifth section, and the paper ends with conclusion and suggested future works in the sixth section.

Literature Review
Modeling of human skin is an interesting research, so many literatures tried to contribute to this field. We explore the most important studies in this issue and then will compare them with the proposed method. Hybrid technique using deep neural network was suggested by the authors in [19] for tumor detection. Skin tumor classification suggested by the authors in [20] used deep learning technique depending on CNN classifier in terms of machine learning. Brain tumor classification was based on features extracted from lowquality images taken from 233 patients, and the suggested model was used in the last stage of preprocessing [21]. Expert level brain of tumor detection was presented by the authors in [22] based on deep learning method and using distinguishing of expansively growing tumors; in that study, typical health was considered as no tumor of brain. e proposed method used weights derived from extracted features and used as controlled in improved classifier.

Deep Learning
Deep learning can be defined as a technique of machine learning to learn useful features directly from given images, sound, and text. Many layers are exploited by deep learning for nonlinear data processing of unsupervised or supervised feature extraction for classification and pattern recognition [23]. Deep learning motivation is greatly reduced by Artificial Intelligence (AI) area, which simulates the ability of human brain in terms of analysis, making decision, and learning. e goal of deep learning is to emulate the approach of hierarchical learning of extracting features by human brain directly from unsupervised data. e core of deep learning is the hieratically computed features and representation of information, such as defining the features starting from low level to high level. With images, the standard techniques of machine learning do not work well when running directly due to ignoring the nature of image composition. In deep learning, features are extracted automatically from given images. e characteristics of this method of features are considered as one of learning in the system.
Characterization of input images used as a feature is the key to the success of processing medical image. ere is a limitation for extracted features in medical image such as Haar wavelet and HOG which organize the data [24]. For this reason, deep learning can be used by its feature extraction to solve limitation in medical image.

Proposed Method
In the proposed method, we look for designing and developing computer view detection system for segmentation and recognizing skin diseases by extracting set of features from given skin lesions image to produce appropriate classification. e general overview of the proposed system is illustrated in Figure 4.
For any machine or deep learning system, it is necessary that the learning system with labeled data knows results in advance and this is called training system. en original data detected need to be input to the system for testing mode to predict the results according to provided information (extracted from given image).
Many challenges when dealing with digital image of the skin captured by camera may contain air bubbles or noise

Input image
Pre-processing Segmentation

Feature extraction Classification by NN Decision
Diseased skin Healthy skin Complexity [25]. is noise actually affects the processing of segmentation and reduces the quality of extracted features leading to inaccurate classification and wrong prediction. To avoid this problem, the image has to pass various processing steps. Real images are coming from digital camera, so the presence of noise in such images limited segmentation technique and then blurred the images. For this reason, the aim is to apply noise reduction process, which is compulsory. e mean of N image must be calculated for training data. e average of eight neighbors' pixels in still image is calculated in a way of vertical, horizontal, and diagonal directions [26]. Intensities of pixels value A (N, x, y) are located with coordinate (x, y); then the averaging process can be expressed as An image without noise is easy to segment; we perform segmentation of the threshold method. is method considers simple, accurate, and powerful technique for segmentation of images having different background and foreground objects. Segmentation is based on image region and connection among these images. e images are converted into binary images with black and white area by choosing proper threshold (T) and then separating the group of pixels into similar region. Objects consist of coordinate (x, y) as a pixel, if this pixel's intensity is equal to or greater than threshold value (T) which is one group; otherwise, it belongs to background. Presence of object will be subtracted from background performed by St(x.y) � 1, f(x.y) belong to object at time t, 0, otherwise.
Segmentation or Region of Interest (ROI) is important in processing of the image and machine learning [27]. Segmentation of the image broadly consists of three main categories: edge detection, region determination, and pixels classification. Pixels classification here is used for segmentation; then three main steps involve color range, extracting features, and clustering.
Another segmentation type considers part of the image with its relation to background or environment; this process is important with any image classification and most studies in literature focus on this process. Extracted object or area with background provides powerful information to the next stage, which is feature extraction [28]. Figure 5 shows segmentation of object from background.
When the image gets good description, then good recognition rate can be got for the tumor types by using the following formula: recognition rate � number of corrected detection number of given detection × 100%. (3) ree colors are involved in the image, which are red, green, and blue (RGB), and color image consists of mixing chrominance and luminance or in other words hue and saturation. Hue refers to color tone like red, blue, and pink, while saturation refers to brightness of the image or value of pixels.

Feature Extraction
Skin image consists of two kinds of features which can be extracted: texture and color. Color features are used mainly for segmentation and then yield special features, but in this case there might be difficulty when classifying this type of feature [29]. Texture feature is considered the attribute of local intensity that focuses on seeing affected area and region. Both spatial and frequency domains participate in texture features to give classifier the ability to achieve better results. Gabor filter [30] performs both domains as spatial and frequency decomposition, where spatial domain is represented by g(x, y) and frequency Fourier transform is represented by G(u, v), presented as follows: σ u � 1/2πσ x , σ v � 1/2πσ y , and W is considered as constant of frequency with the filter bank in the center.

Complexity
Hand-pass filter is controlled by standard deviation derived from Gaussian function, and band-pass filter contains bandwidth, orientation, and varying frequencies.
Given image Q (x, y) to be used with Gabor wavelet g(x, y) can be performed as follows: Consider R mn (x.y) response filter with coordinate (x, y), with m & n scale from 1 to M & N sequentially representing the number of scales and orientation. Standard deviation or response filter can represent region derived from classification of image regions.
In Figure 6, the texture features start as filters of channels from given image and then are clustered to produce segmented image.
In frequency domain, components of low frequency represent the intensity and contrast, while those of high frequency are related to sharpness and edge of the objects.
en segmented image will have produced from these properties.
Skin was treated as 10 layers as Lambertian material, giving bidirectional reflection [31]. Layers 1-5 are considered as strata of the human skin, which are stratum corneum, stratum granulosum, stratum lucidum, stratum basale, and stratum spinosum. Layers 6-9 are considered dermises which are papillary dermis, reticular dermis, upper blood net dermis, and deep blood net dermis. e last layer is subcutaneous tissue layer, which should be thick. Parameters and their descriptions are shown in Table 1.
Each layer of the human body skin consists of different variable percentage values of water. is map is described as follows: For example, P � p m .p c .p bo .p wl .p bl .p dt .p sr T .
So the skin parameters will be in vector: is represents corresponding hyperspectral signature vector. After gathering extracted features and storing them in corresponding vectors, the information is ready for classification with classifier stage. Figure 7 illustrates the entire process from the beginning till the decision stage which is the segmentation stage.
Classification is considered as an important stage due to the fact that decision occurs at this stage. To improve the SVM, the classifier first has to control the factors of classifier and find the new path so the algorithm can be adapted with required results [32,33].
ere are linear and nonlinear Since w is a weight vector and b is the bias, the training is linearly separated and then coordinate (w, b) is defined as e function of linear classifier is defined as follows: So, during training, for a given dataset, to decide the plane i-th margin of sample x i when defining the plane (w, b) can be defined as Function margin, given image from dataset during training to make decision boundary that consists of two lines, that is, gap called margin and width of this margin, is controlled critically, where the width is defined as w in equation (14).
Minimizing the margin makes the classifier more accurate and the classifier has to be optimized as given information below.
Control w, b and E i ≥ 0.
After minimizing, the function will be In this regard, SVM is designed to find a 1 , . . ., a n in the following equation: a i a j y i y j K x i .x j . (17) Here is the maximization with respect to a factor since N i�1 a i y i � 0, C ≥ a i ≥ 0.
So the classifier can be applied by using the following equation: For given skin images in dataset provided have some tumors, try to train the system using improved SVM to classify six types. e system can run for more tumors image through training and then proceed with testing the system. Weighting features extracted are also used as the factor of classification Γ all � Γ 1 .Γ 2 . . . Γ m .
Vectors of features can be variable and jumping among activities x. Weight in one activity is different from the others due to the nature of the weight, with proposed method's features used as clusters and illumination of the Melanosome fraction by volume in the epidermis 0.80%-43% P c (%) Collagen fraction by volume in the reticular dermis 15%-30% P bo (%) Percentage of oxygenation of hemoglobin in blood 70%-100% P bl (%) Percentage of blood by volume in the dermis 0.25%-2.00% P dt (mm) ickness of each layer measured in mm 1.20-3. 6 Complexity regions of tumor with pixels' value inside and outside tumor segmented region and so on. In this paper, the confusion matrix was used to measure the performance of classification and determine whether or not the target output results are accurate [34]. e confusion matrix is a table with two dimensions, "Actual" and "Predicted," and sets of "classes" in both dimensions. e Actual classifications are given in columns and the Predicted ones are given in Rows (Table 2). e meanings of TP (true positive), FP (false positive), FN (false negative), and TN (true negative) are defined in Table 3.
To apply these logical parameters within classifier the same information belonging to Table 3 can be illustrated practically in Figure 8; these images are classified during the system directly to the user, so the person responsible for reading system result does not need to be complex.
In this study, five metrics were used to evaluate the performance of the proposed multitrainable model technique, which includes the specificity, sensitivity, precision, accuracy, and F-measure, as described in detail later. Firstly, the specificity refers to the rate of true negative which is predicated as correctly negative. e specificity is illustrated in the following equation: Secondly, the sensitivity refers to the rate of true positive which is predicated as correctly positive. e sensitivity is illustrated in the following equation: irdly, the precision refers to the consistency of the results. e precision is illustrated in the following equation: Fourthly, the accuracy refers to the overall correctness of proposed classifier. e accuracy is illustrated in the following equation: Finally, the F-measure refers to the measure of tests accuracy.
e F-measure is illustrated in the following equation: SVM classifier is improved to be suitable for extracted features from skin image [35]; the images do not all have the same properties but have the same kind of features; they are different just in weights; therefore distribution of the images around the merging line of the classifier is binomial. Nonlinear classifier behaves well with proposed type of features, and then the distribution mapping of illustrated images over classifier is shown in Figure 9. e proposed method performed is worthy with tumor skin images due to three statuses, proper segmentation of the image to allow using powerful object features, and full features extracted from tumor object with its weights to be suitable for improved SVM classifier.

Results
Interesting tumor skin image from standard dataset is used in this study to evaluate the system. e image used gets high resolution of 2598 × 1944 pixels, and overall dataset used consists of 15000 images; training system based on these types of images performs well especially when the dataset has a large number of images.
It is important to detect cancer early to avoid dangerous future symptoms. erefore, such systems are important in the early diagnosis of cancer as well as to reduce the effort of specialists even in the case of late diagnosis; they provide accurate progression of the disease [36]. ree types of skin cancer are classified. e most important one is melanoma, which is also classified into three types according to cells contained; basal, squamous, and melanoma cell.
en the system can recognize these types by equation (3), and confusion matrix in Figure 10 shows the different recognition rate of each tumor type (Table 4).
Cells with gray color in confusion matrix refer to the best recognition produced by classifier, while the rest refer to wrong prediction. Actually these results are from one standard dataset to detect three types of tumor.
ere is a need to test the accuracy of each system, and the accuracy is very important in such system. Any system needs to achieve better performance due to the fact that the purpose of any automatic method is to save effort and time for human. Table 5 shows the performance within training mode. e proposed method achieved worthy performance in terms of accuracy even when manual effort accuracy is considered to be good. e total F-measure as in equation (25) reflects the total accuracy for comparison. e examination was performed through visual human standard measurement techniques. In addition, our work was evaluated by comparing results with the manual examination implemented by some experts in the field of detection of tumor cancer. e proposed trainable segmentation technique was compared with the manual model. Figure 11 shows the comparison of the manual measurement versus the proposed automatic model. Accuracy can be calculated manually for some of skin images but for huge amount it makes it very difficult; in the figure above, testing was with 184 images for both manual and automatic methods, so it can be easily noticed that manual section under the line was far from precision and vice versa.

Conclusion
In this study, we report a system for detecting and recognizing tumor skin images taken from standard medical dataset. Due to the fact that deep learning algorithms have been widely used recently and machine learning is more interesting in studies of medical image, we proposed a system to recognize the tumor from skin image and detect the melanoma, basal, and squamous cells. e objective here is to detect tumor of human skin taken from images and early detect the tumor for early treatment in addition to reducing the effect of radiation on the human body during scanning. On the other hand, malignant and benign tumors are also detected by applying improved SVM classifier. e proposed method based on noise reduction at the first step prepares image for segmentation (background subtraction) and then extracts useful features with their weights for supporting the classifier to classify the tumor according to these features. High recognition rate and accuracy were achieved by this study and, to improve the worthiness of this study, a comparison with manual methods with systematic effort applied in terms of accuracy was performed. For future study, one can extract or find new features, and training on different dataset also can enhance the image in preprocessing stage for more informative data.

Data Availability
All data, models, and code generated or used during the study appear in the submitted article.