{'fraction_non_alphanumeric': 0.03253218339780582, 'fraction_numerical': 0.01832709746971907, 'mean_word_length': 4.978013646702047, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Mobile-based Skin Lesions Classification Using Convolution Neural Network

Nazia Hameed, Antesar Shabut, Fozia Hameed, Silvia Cirstea, Sorrel Harriet and Alamgir Hossain, "Mobile-based Skin Lesions Classification Using Convolution Neural Network”, Annals of Emerging Technologies in Computing (AETiC), Print ISSN: 2516-0281, Online ISSN: 2516-029X, pp. 26-37, Vol. 4, No. 2, 1st April 2020, Published by International Association of Educators and Researchers (IAER), DOI: 10.33166/AETiC.2020.02.003, Available: http://aetic.theiaer.org/archive/v4/v4n2/p3.html. Research Article


Introduction
The human skin is the largest human organ, and it acts as a barrier between the human body and microbes as well as pathogens [1]. When this barrier breaches and the harmful environmental www.aetic.theiaer.org elements invade the human body, skin problems originate. Inflammatory skin lesions are one such example of these problems. Inflammatory skin lesions are commonly seen, and a high morbidity cost is associated with them. Inflammatory skin diseases include a broad range of disorders.
Inflammatory skin lesions include acne, rosacea, psoriasis, chronic wounds etc. [2]. In this research work, we are considering acne, eczema and psoriasis, as these are mostly occurring inflammatory skin lesions. Acne affects 50% of the teenagers, eczema affects 20% population, and psoriasis affects 2% population [2]. These skin lesions have a psychologic and social impact on the patient's life [3].
These skin conditions get worse over time if not treated timely. Therefore, early classification is very critical. Mobile-enabled skin lesions classification systems can be very beneficial in the early classification of skin lesions, especially in resource-limited areas. They can save effort, time and human life.
A recent boom in mHealth applications has been witnessed. Recently, a tremendous increase in the mHealth applications has seen due to development in the technology infrastructure.
Approximately 318,000 mHealth applications are available on various app stores, with an increase of 200 mHealth applications daily, nearly more than double the available in 2015 [4]. But, surprisingly, only a few automated mobile-enabled skin lesion classification systems exist [5], [6]. Illness directly affecting the skin is the fourth most frequent cause of all human disease, and there is a gross mismatch between the illness and the expertise required to manage them [7], [8], [9]. Therefore, this research work is aimed at minimising this burden by proposing a mobile-enabled expert system for skin lesions classification. An automated mobile-enabled expert system enabled to categorise inflammatory skin lesions is the core contribution of this research. This system can diagnose acne, eczema, and psoriasis promptly. It is worth mentioning that our automated expert system has clearcut benefits for concerned patients as well as practising medical doctors and that it is not aimed at ignoring human expertise, nor would it be a cause for replacing human medical doctors. On the contrary, with such a technological innovation of an automated expert system, human medical doctors would focus more on finding ways how to treat diseases rather than spending much of their training and treating sessions on classifying health and non-healthy skins in a clear example of a more realistic vision of human-machine coexistence [10]. This paper is an extension of our already published work [11] and is structured as below. State of the work done in the field of skin lesions classification is discussed in Section 2. Section 3 is dedicated to the detailed description of the dataset used to conduct this research. The methodology is presented in section 4, while the results are presented in section 5. Conclusion and future work are given in the last section, i.e. section 6.

Literature Review
To reduce the global impact caused by skin lesions, researchers are proposing classification schemes for early diagnosis of skin lesions that can be accessed globally. These classification schemes can be broadly classified as computer-aided classification or mobile-based classification. Computer aided-classification schemes use a computer for delivering the classification model whereas in mobile-based classification mobile and smartphones are used for classifying skin lesion images [8]. In the computer-aided classification schemes, researchers are using traditional machine learning as well as deep learning for diagnosis of skin lesions. In the traditional machine learning, noise from the images is removed in the pre-processing step, after removing noise, the region of interest (ROI) is Different colour and texture features were extracted from the ROI and Support Vector Machine (SVM) was applied for classification. For experiments, 1800 images were used, and 83% accuracy was achieved. Later on, an improved classification algorithm was proposed by same researchers [9] where an improved classification framework for classifying multiple skin lesions was proposed. In preprocessing, images are resized, and hairs are removed. Improved bag of features containing different colour and texture features are extracted from the ROI and the classification is performed using SVM.
Experiments are performed using 10-fold cross-validation on 1800 images and 94.74% accuracy was achieved.
Abbas et al. [12] used the traditional machine learning approach for classification of benign and malignant skin lesions. In their proposed methodology, 900 images were used. First, the image was segmented using an edge detection technique to extract the ROI. Different texture features were extracted and SVM was applied on them to find the final classification label and an accuracy of 99.02% was achieved.
After a huge success of deep learning, deep learning models are also used for the classification of skin lesions. Using pre-trained deep learning models AlexNet [13], VGG16 [14] and ResNet-18 [15]; a fully automated classification scheme was proposed by Mahbod et al. [16]. In the proposed classification scheme, features were generated using AlexNet, VGG16 and ResNet-18 and passed to SVM classifier for final classification. The proposed classification scheme was evaluated on 150 images and an area under curve of 83.83% and 97.55% was yielded for melanoma and seborrheic keratosis.
Hekler et al. [17] combined human and artificial intelligence for classifying skin cancer. A single CNN was trained using 11,444 dermoscopic images to classify skin lesion images into five classes.
These images were also classified by dermatologists and it was found that combine human and artificial intelligence, superior results can be achieved. Their proposed methodology achieved an accuracy of 82.95%.
With advancements in mobile technology, mobile phones are also used for the classification of skin lesions. One such effort was made by Ahmed et al. [18] where 48,373 dermoscopic images were trained using Convolutional Neural Network model MobileNetV2 for binary classification of skin lesions. Using the trained model, a skin lesion image was classified as benign or malignant with an accuracy rate of 91.33%. After training the classification model, an iOS-based mobile application was developed to evaluate its performance on unseen images.
A mobile-based expert system was proposed by Aleem et al. [19] for classification of benign and malignant lesions. The mobile application was trained and tested on the dataset containing only 84 images. Experimenting on limited dataset result in 80% sensitivity and 75% specificity.
Ramlakhan et al. [20] used the traditional machine learning approach for designing a classification algorithm for classifying benign and malignant lesions. An accuracy of 66.7% was achieved when experiments were performed on 83 images. Some researchers are also working on skin diseases other than skin cancer. Islam et al. [21] focused on designing a mobile-enabled classification system for pigmented skin lesions. The proposed skin-lesion classification scheme uses image processing and computational intelligence to analyse the image-based of the texture features extracted from the disease image. The precision and recall rate for arsenic detection is 88% and 84%.
The state of the artwork done in compared in Table 1.

Dataset
To implement the mobile-enabled expert system for classifying inflammatory skin lesions, different sources are used for collecting skin image data. As the main focus of the system is the classification of the given image into one of four classes; thus, a dataset from different sources related to these classes is gathered.
The sources for collecting dataset, includes online medical data repositories, research challenges, and publically available dataset by different researchers. The online data repositories include DermIS [23], DermQuest [24] and DermNZ [25]. The images in these data repositories are freely available for educational purposes. For healthy images, the "11K Hands" dataset [26] is used. A subset of images related to eczema and healthy category used in IEEE research article [27] is also used in this research study. The table given below summarises each category with details used for collecting the data.  Table 2. Details of data collection sources for healthy, acne, eczema, and psoriasis categories After gathering dataset from various sources, the number of images in each class was not equal, leading to the data imbalance problem. Data imbalance problem is a critical problem, as the results may be inclined toward the majority class [28], [29]. Various techniques are proposed in the literature to solve this problem. In this research work, we have used a random downsampling technique. The rationale to choose this approach is that this approach is widely used in the existing studies related to the skin lesions classification [29]. Psoriasis class have the least number of images, i.e. 464, so the images in other classes are downsized randomly to 464. The detailed distribution of images in the training and testing phase is provided in Table 3.

Methodology
For classifying inflammatory skin lesions using i-Rash, the model is trained using a pre-trained deep learning model "SqueezeNet" [30]. The dataset is gathered from different sources and transfer learning approach is used for training the model for skin lesions classification. Transfer learning is the process of reusing pre-trained model and fine-tuning it with our skin image dataset [31]. The transfer learning process can be visualised in Figure 1. and it also saves much time.

SqueezeNet is a convolution neural network (CNN) introduced by UC Berkeley and Stanford
University [32]. SqueezeNet is a pre-trained CNN which is trained on more than a million images from the ImageNet [33] data. The SqueezeNet consists of 10 layers; starts with a convolution layer. The SqueezeNet model provides accuracy similar to accuracy provided by AlexNet [13], but with 50 x fewer parameters. As the re-trained model has to be deployed on the server, therefore size is the most important element, hence the rationale behind SqueezeNet usage. For the mobile-enabled expert system, the client-server architecture is used. The model is retrained on the skin dataset. Using the transfer learning approach, the last two layers of the SqueezeNet model are replaced and retrained on the skin image dataset. The model is trained and is hosted on a remote server.

Results and Discussions
The experiments were conducted on the Intel® Core™ i7 CPU having 8 GB of RAM having the 70%:30% ratio is used to divide the dataset for training and testing. i.e. For training of classification model,70% of data is utilised while 30% is utilised for testing purpose. Before retraining the model, some hyper-parameters need to be initialised. The hyperparameters, used in this research work, are given in Table 4.
The retrained classification model will have four neurons in the last fully connected layer, instead of 1000, i.e. one neuron for each class. The training progress per epoch for SqueezeNet can be visualised in Figure 3.   After the training, the testing dataset is provided to the trained model to calculate the testing performance. For testing, the image is resized to 227 x 227 x 3 and passed to the trained model, and the final classification label is computed. After training the model, the performance metrics are computed from the training and testing confusion matrix. The confusion matrix attained from the training and testing is presented in Table 5 and Table 6. Accuracy, sensitivity and specificity achieved in the training phase is 100% each, whereas, in the testing phase, the 97.21% accuracy, 94.42% sensitivity, and 98.14% specificity is achieved. Table 7 presents the performance measures achieved from the classification step.
The time required for re-training SqueezeNet model on the skin lesion dataset is 45 min 1 sec whereas the re-trained model size is approximately 3.03 MB. The training time is just required once.
Once the model is trained, a new image can be classified in a fraction of seconds (.09s on average).
The limitation of the proposed classification system is that it can classify the provided skin image into one of the four classes, i.e. healthy, acne, eczema, and psoriasis. If a rarer (i.e., image other than the considered classes or related to considered classes but having distinguishing features), the system will produce false positives and false negatives that decrease the performance which is considered as a limitation because of the lack of sufficient dataset. For classifying a new image using the i-Rash mobile expert system, a new image is captured using a mobile camera and send to the model hosted on a remote server, where an image is classified, and the results are sent back to the client. In this research work, this is done by utilising the MATLAB production server and MATLAB mobile application. MATLAB production server provides the facility to host the MATLAB trained models. To classify the image, the input is provided by using the third party application, e.g. IP Webcam [34] as MATLAB mobile offers limited functionality and cannot take input image without using a third-party application. For the client-server based architecture, other applications and servers can also be used instead of using MATLAB© mobile application, and MATLAB© production server. After placing the trained model on the production server, a remote connection is established between the mobile application and the server. The framework for the mobile application based on client-server architecture is graphically shown in

Conclusion
Due to ever-growing skin lesion cases, mobile-enabled skin lesions classification systems are needed. This research work investigates the multi-class skin lesions classification problem and presents an intelligent mobile-enabled expert system titled "i-Rash" for categorising of the considerable inflammatory skin diseases. The proposed system can classify the skin image into one of the four non-overlapping classes, i.e. healthy, acne, eczema, and psoriasis. The classification model is trained using transfer learning technique, and pre-trained deep learning SqueezeNet model is used. The overall accuracy, sensitivity and specificity achieved by the i-Rash is 97.21%, 94.42% and 98.14% respectively. The computational time for classifying an unseen image is only 0.09 sec. i-Rash can be used as an early classification system, especially by people living in distant areas and with scarce resources.In our future work, we will validate our proposed model on the clinical dataset to make it more generalisable. Moreover, it can also be enhanced using by adding more skin lesions.