Towards the Performance Investigation of Automatic Melanoma Diagnosis Applications

Melanoma is a type of skin cancer, one of the fatal diseases that appear as an abnormal growth of skin cells and the lesion part often looks like a mole on the skin. Early detection of melanoma from skin lesion by means of screening is an important step towards a reduction in mortality. For this purpose, numerous automatic melanoma diagnosis models based on image processing and machine learning techniques are available for computer-based applications (CBA) and smartphone-based applications (SBA). Since, the smartphones are available as most accessible and easiest methods with built-in camera option, SBA are preferred over CBA. In this paper, we explored the available literature and highlighted the challenges of SBA in terms of execution time due to the limited computing power of smartphones. To resolve this issue of storage of the smartphones, we proposed to develop an SBA that can seamlessly process the image data on the cloud instead of local hardware of the smartphone. Therefore, we designed a study to build a machine learning model of melanoma diagnosis to measure the time taken in preprocessing, segmentation, feature extraction, and classification on the cloud and compared the results with the processing time on the smartphone’s local machine. The results showed there is a significant difference of p value <0.001 on the average processing time taken on both environments. As the processing on the cloud is more efficient. The findings of the proposed research will be helpful for the developers to decide the processing platform while developing smartphone applications for automatic melanoma diagnosis. Keywords—Smartphones; computer based systems; melanoma diagnosis; cloud computing


I. INTRODUCTION
Skin cancer is the abnormal growth of tissues in the skin that often looks like a mole.When the cancerous tissues penetrate the inner layer of skin and spread in the whole body by blood and lymphatic vessels, the condition becomes lifethreatening [1].Melanoma is the most common type of skin cancer and the rate of malignant melanoma has been rising since last 30 years.According to the British Skin Foundation (BSF) [2], every year about 100,000 cases of skin cancer are diagnosed and approximately 2,500 people die due to this deadly disease.Therefore, a person requires self-awareness to identify the early symptoms of the disease by using automatic screening of the skin from time to time.In this regard, the digital devices might help to detect this dangerous disease at the early stage [3].Automation process of melanoma diagnosis started with the CBA (Computer Based Applications) and became part of the medical decision support system.Therefore, different computerized methods are used to prevail over varying problems, which help the users to identify the signs of the disease for seeking the medical help earliest.However, using such systems require the efforts of taking photos, uploading them and sending for the machine learning processing.In the current era, the smartphones are one of the growing industries in the world due to their utility and mobility.The current smartphones are available with the highdefinition cameras that make it easy to take and upload a picture anytime.Furthermore, a big population of the world is the holder of the personal smartphones.It is predicted that there will be around 6.3 billion smartphone subscribers by the year 2021 [60].It is very practical to provide the users with healthcare services through SBA (Smartphones Based Applications).However, we cannot deny the advantages of higher processing power and bigger storage in the CBA systems as compared to the SBA.
For both CBA and SBA, the automatic diagnosis of melanoma approaches consists of various similar steps of analysis like preprocessing, segmentation, features extraction, and classification.Many researchers contributed to improving each step by using different approaches such as ABCD-E rule [3][4][5], seven points checklist [6], three points checklist [7], and Menzies methods [8].Even though numerous researchers explored different techniques for automatic diagnosis of the melanoma and making it available to a common user, many studies still indicate, that automatic detection of melanoma is yet an intricate problem [9].Food and Drug Administration (FDA) [10] encourages smartphone based mHealth applications and they defined an appropriate procedure to regulate such applications.However, finding the suitable application in the app stores for smartphones with reliable results is still a challenging issue.Due to storage and processing limitations, SBA could not execute complex www.ijacsa.thesai.orgalgorithms that make it difficult for a common user to rely on them.Often, the users want such SBA systems that provide the efficient processing time.The app must be reachable, downloadable and executable on various types of smartphone's machines to support the users in the early diagnosis.
To identify the contributions and limitations of the proposed approaches of melanoma diagnosis, this paper explores the available literature on the CBA and SBA for automatic melanoma diagnosis techniques and algorithms.Therefore, our contributions in this paper are in three folds.First, we explored the existing systems for automatic detection of melanoma for CBA and SBA and identified that SBA are preferred over the CBA systems and owned by the wider population of users.Secondly, we discussed various approaches used in literature during the automatic detection of melanoma.As a result of this analysis, we identified the challenges and the limitations of availability of the smartphone apps to a common user.Thirdly, to overcome the limitations of storage and processing time of smartphones, we proposed the solution of offloading where smartphone application executed the detection process on the cloud instead of the local machine of the smartphone.Hence, we developed a melanoma detection model based on cloud and compared the performance of cloud computing with smartphone's hardware.The experimental resulted showed that the cloud takes significantly less time for processing the same data and algorithm in comparison to the smartphone's hardware.
The rest of this paper is structured as followed.In Section 2, we explore the available literature on skin cancer detection for CBA and SBA with the discussion on their pros and cons.Section 3 describes our proposed model to measure the processing time performance of machine learning based automatic melanoma detection model on the cloud in comparison to smartphone's local hardware.In Section 4, we analyze and evaluate the experimental results to validate the proposed approach.Finally, the conclusion and future work are presented in Section 5.

II. LITERATURE REVIEW
In this section, firstly, we explored the literature regarding the systematic review and the survey papers on the automatic melanoma detection systems.For discovering the contents, we searched on Google Scholar platform of the keywords of "smartphone", "melanoma", "systematic review", "skin cancer diagnosis", "machine learning", and "survey paper".Mainly, we have focused on the studies after the year 2007.Secondly, in the searched collection, we have selected more relevant studies concerning the review of studies related to the automatic diagnosis of melanoma.The remaining of this section is divided into three parts based on the findings from the previous literature: (1) Computer Based Applications (CBA), (2) Smartphone Based Applications (SBA), and (3) Overall system model of CBA and SBA for automatic diagnosis of melanoma.

A. Computer Based Applications (CBA)
Initially, the researchers have developed the melanoma detection algorithms for the computer-based solution to integrate them in the clinical decision support systems.
Hameed et al. [1] provided a comprehensive survey on imagebased melanoma detection systems.The survey provides a comparison of melanoma detection preprocessing steps on the criteria of color space, hair detection, and hair repair techniques.Different types of segmentation have been explored in the survey such as color based, discontinuitybased, soft computing-based, region-based, and thresholdbased segmentations.The authors deliberated various studies for appropriate feature extraction and found the color, ABCD rule, dermal, geometric, contour, histogram, and texture features.Different classification techniques were used, such as SVM, K-NN, Naïve Bayes Classifier, RBF, CART, and ANN, for the cancer detection.The maximum accuracy of cancer detection algorithms was up to 92.09 % with SVM.Therefore, it is required to explore further methods for improving the accuracy of the cancer detection system.Arasi et al., [2] reviewed various CBA systems for malignant melanoma detection.Their study investigated the best classification methods among the available techniques and results indicated the hybrid classifier, such as a combination of DWT (Discrete Wavelet Transforms) and k-nearest neighbor, was the winner because it resulted in high accuracy.Masood and Al-Jumaily [9], investigated various vivo imaging techniques for melanoma detection were photography, dermoscopy, multispectral imaging, and laser-based enhanced diagnosis, optical coherence tomography, ultrasound imaging, and magnetic resonance.The authors emphasized more on the importance of features extraction and selection as the correct features selection can lead to more accurate results.They recommended to use 5 to 10 features to get acceptable classification results.They discussed quality assessment criteria that included the limitations of previous research in image acquisition, extraction, and selection of features.Authors also discussed the risk of overfitting due to few events per variable and proposed a framework to highlight the importance of certain standard for validation as it was ignored in the previous research.They recommended providing quality data to get unbiased results.

B. Smartphone Based Applications (SBA)
Since the advent of smartphones, they became the main tool for accessing and manipulating the clinical information and adopted by many to provide the solution of automatic melanoma diagnostic.Rat et al. [11] performed a systematic review of 25 studies related to the melanoma diagnosis with the SBA.The purpose of the study was to provide an evidence on the diagnostic performance of automated smartphone apps and tele-dermatology.The study mainly focused on early detection of melanoma, the impact on patient medical learning, and feasibility criteria based on the efficiency of such apps in terms of time.The results showed the automated smartphone apps are missing of assessment in clinical practice conditions and resulted in low sensitivity measures with low photographic quality.Joel et al. [12] evaluated 188 images of skin lesions on four different mobile applications to measure the performance of the applications in detecting the melanoma and benign control lesions.The results showed that the sensitivity of four apps are ranged from 6.8% to 98.1%, specificity from 30.4% to 93.7%.Moreover, positive predictive values ranged from 33.3% to 42.1% and negative predictive values ranged from 65.4% to 97.0%.Wang et al. [13] made a review on the study www.ijacsa.thesai.org in [12] and classified it as an alarming situation as may be misinterpreted, which can place an unjust burden on users in two ways: first, if the lesion is high risk and classified as low risk then users may miss out the early timeframe to get treatment that can be more beneficial.Second, if the normal lesion is reported as high risk then it can cost the users in terms of their time and money to visit the physician and emotional stress because of this news.Nagoo et al. [14] conducted a perspective study of mobile application and evaluated 3 mobile apps of the data of 57 pigmented lesion images.The results showed that the sensitivity of apps ranged from 21% to 72% and specificity ranged 27% to 100.0% compared with the specialists' decisions.Two of the three apps were unable to analyze 14% and 18% of lesions.Interrater agreement results between the apps and dermatologists were also not so much satisfactory.Chadwick et al. [15] evaluated 15 images of previously excised skin lesions with 5 smartphone apps and found 80% sensitivity for melanoma identification with 3 apps and 20% to 100% specificities with the 5 apps.Therefore, the authors showed concerns about the usage of such mobile applications.
Chao et al. [16] divided the SBA of skin cancer detection and support into four different categories: (1) Educational, (2) Mole mapping, (3) Tele-dermatology, (4) Diagnostic, and (5) Research.The article discussed that although these applications are developed but needed to assess the safety and efficacy of smartphone skin diagnosis apps and should be evaluated for clinical efficacy.Kassianos et al., [17] provided a review of available 40 applications on mobile phones up to the year 2014 for the detection and management of melanoma.The evaluation has been done on the criteria of general information about the melanoma, sun exposure preventive advice, the assessment of present and future melanoma risks, applications providing an automatic classification of disease and mole monitoring over time.The results indicate, that the SBA skin cancer applications are providing general information about the melanoma and mole monitoring.Approximately, the same number of applications using lesions images to provide the dermatologist services and self-monitoring, and one-tenth applications are calculating the probability of the lesion being melanoma, and out of them, only one application is providing a validated risk model of future risk on melanoma.Similarly, none of the application was developed for cancer detection using established research methods.Furthermore, most of the applications are apple platform dependent.Some apps were not updated for more than 3 years and if updated there was not a discussion about whether the updates are based on new evidence or not.In the link to this study in the year 2018, Ngoo et al. [18] have made comparisons similar to methodology in [17] of smartphone applications for melanoma management.The app search and reviewing method were designed based on the quality and risk of bias checklist of studies.The apps were not considered for the reviewing purpose that was targeting the dermatologist and plastic surgeons, other than English, booking tools for cancer clinics or entertainment tools, and cosmetically focused.They have evaluated overall 43 smartphone applications based on their functionalities in terms of information of users regarding melanoma prevention and assessment, analysis of the image using algorithm or forwarding to the dermatologist, tracing lesions overtime, and evidence of scientific research in the development.Mostly, applications were developed for the Apple devices 48.8% and only 23.3% were developed for the Android phones, furthermore, 27.9% were available on both platforms.Only 43.6% of applications were found in the year 2014 in Kassianos et al. study are still available in the year 2017 [18].Moreover, the apps offering the algorithmic image analysis deceased to approximately half from 46.2% in the year 2014 to 23.35% in the year 2017.Out of 43, only 2 apps had peer reviewed research validating their model of care.However, no one referred that the scientific validation studies are performed internally during the development process but not published their work.If we compare the peer review evidence of apps development in the year 2017 and year 2014 then there is only a small increase in the number of apps from one to two.

III. OVERALL SYSTEM MODELS OF CBA AND SBA FOR AUTOMATIC DIAGNOSIS OF MELANOMA
Smart diagnoses play a vital role in diagnosing and taking the preventive action for the malignant melanoma.Previously, the research has been conducted in many application areas such as informative or educational, automatic melanoma diagnosis, tracking and monitoring of mole, and tele-dermatologist to provide a support for skin cancer care.This paper is mainly focused on the automatic diagnosis of melanoma conditions.The previous research investigated smart diagnostic methods are based on the traditional image processing and machine learning process in the CBA, whereas, in SBA, same steps are performed on the phone by using the limited computing power of the phone.The steps involved in the automatic diagnosis of melanoma are shown in Fig. 1.In this research, we will focus on the highlighted components of the model and the detail of each component is as follows.

A. Data Sources
The first step in the automatic diagnosis of melanoma is to get the accurate data.For this purpose, the captured images of the lesion are used to analyze for diagnosis purpose.The system works on the principals of automatic diagnosis of melanoma are trained on a dataset of similar images.In the published research of the last 10 years, it has been observed the dataset size varies from tens of images to thousands of images.The most prominent datasets used for the model training are Atlas of Dermoscopy [19], Interactive Atlas of Dermoscopy [20,21], Healthcare centers in Kottayam [22], DermISand and DermQuest [23], Spectroscopic system [24], National Cancer Institute [25], Dermoscope [26], Dermquest, Dermnet [27], Dermnet Dermofit [2,28], Allergologie [29], and PH2 database from Pedro Hispano hospital [30].One of the limitations in training the melanoma diagnosis model is availability of open source melanoma images dataset.Mostly, the available resources are paid, however, there are few open source datasets are available from the International Skin Imaging Collaboration (ISIC) [31].They have developed the dataset of 10015 dermatoscopic images and released for the purpose of the training set for academic machine learning and the users can access the dataset through ISIC archive [32].www.ijacsa.thesai.org

B. Preprocessing
The input of the automatic diagnosis system is the digital images on which the further steps can be applied.To the digital images, the preliminary processing is applied in which the extra effects of the image not required in further processing such as hair [33][34][35][36], irregular lighting, arteries, dermoscopic gel as noise.Due to these elements, the detection of lesion area with high accuracy is tough, so, it might result in a decrease of the exactness, and the processing time can be elevated.To refine the quality of the scan, cropping image [37], contrast intensification [26,38], image resizing [29,39], RGB to Greyscale imaging, morphological image processing, filters application [24], Gaussian filter [29] and color quantization, are applied to the scan which makes the image segmentation less challenging.Therefore, it is required to apply a few preliminary processing for the ejection of these elements.The RGB to grey scale conversion is done due to the thousands of colors in the RGB scale.Such a large amount of colors is strenuous to handle.For this purpose, the color quantization is used which reduces the colors in the lesion to approx.20 for accurate quantization [40].The inadequate image contrast makes the border detection in digital images another challenge.For this purpose, the image contrast is intensified to make the boundary of the lesion notable [41].
Other unwanted elements such as ink marks, bubbles, blood vessels, hairs, and skin lines exist in the dermoscopic image known as black frames.These black frames are introduced during the process of converting the details of the image into digital format.In digital format the details of the image are shown in bits, so, that bits can be addressed separately or in the form of sets i.e. byte.Multiple techniques have been introduced by the researchers for separating the black frames from the image.Celebi et al., [42] used a general-purpose filter such as the Gaussian (GF), median (MF), or anisotropic diffusion filters (ADF) techniques for separating the black frames.Korjakowska and Tadeusiewicz [36] made use of the identical color space in which the value of L<15 was supposed to be black.Sultana et.al. [43] proposed technique for the ejection of black frames and the hair from the scans.Shapes like ellipse and circle were applied to the scans to fix a limit for the black frames and skin areas.

C. Segmentation and Feature Extraction
After the preliminary processing, the healthy skin needs to be separated from the lesion by segmentation techniques such as color based, pixel based, region based, edge based and soft computing-based segmentation methods.The homogenous regions are separated based on shape, color, texture, and area [44].Due to the smooth changeover of the lesion and the healthy skin, it is a difficult task to segment the regions accurately [45].As per a few researchers, the identification of these two regions is more accurate if performed manually [29] but for automated diagnosis, the segmentation needs to be automated based on various segmentation algorithms.Silveira et al. [46] compared various segmentation techniques such as adaptive thresholding, adaptive snake, EM level set, and fuzzy-based split-and merge algorithm.However, the best results are obtained using the adaptive snake and the EM level set.The techniques such as fuzzy logic are used in soft computing-based segmentation.Furthermore, one of the interactive segmentation techniques for images is Grab cut algorithm [47] that divides the image into four parts: (1) Exactly Background, (2) Probably Background, (3) Exactly Foreground, and (4) Probably Foreground.
After the segmentation, the next step is the feature extraction as this step plays an important role in skin lesion classification [1].The purpose of features extraction is to select certain properties appropriate to the problem by reducing the amount of original data.As the computational efficiency of handheld devices is lower than the normal computers, therefore, proper features selection can increase the efficiency of classification, storage requirements, accuracy of results, ease training, and testing.Malignant melanoma is hard to distinguish from dysplastic nevi with the naked eye, but the situ neoplasm needs to be separated from dysplastic nevi for successful feature extraction.Spotting the most effective pattern classification and algorithm that segregates those lesions is vital.There are many features that can play an important role for skin lesion classification such as ABCD rule (including Asymmetry, Border irregularity, Color, and Diameter) [29], texture and shape features (including skin elasticity, epidermis volume, skin impedance and cellular, and collagen densities) [1,48], and statistical features [49] (including mean values, standard deviations, entropy, skewness, and kurtosis).Various feature extraction techniques are found in the literature such as model based, statistical based and filtering based methods and among them, the multichannel filtering is very efficient and precise one [9].To further reduce the unnecessary details researchers used wavelet packet transform [50], grey level co-occurrence matrix [51,52], principal component analysis [53], decision boundary [44,54], Fourier power spectrum [55] and Gaussian derivative kernels [56].In general, dyadic Gabor [57], Law Mask and Wavelet Transform [58] are used for filters.It is observed that most of the time the features extraction process is subject to error [9].The previous studies lack the discussion or have minor details regarding the meaning of the features and the criteria of their selection being used for classification purpose.www.ijacsa.thesai.org

D. Classification
After the successful feature extraction there is a need to categorize these features for complete identification of the region.The focus of categorization is to differentiate the benign and malignant part based on the extracted features.Machine learning algorithms are used for categorization, which helps us to reach conclusion [59].The classification can be divided into supervised, unsupervised and hybrid algorithms.In supervised classifications the dataset should be provided with appropriate labels of melanoma and non-melanoma.The previous literature showed the Support Vector Machine [29,38], K-NN [37,52], Naïve Bayes [24,60], Artificial Neural Networks [24,52,[61][62][63], Multilayer Perceptron [52,62], Logistic Model Tree [20], Hidden Naive Bayes [44] Decision Trees [23,64,65], Proximal Support Vector Machine (PSVM) and Active Support Vector Machine (ASVM) [28] are the supervised machine learning algorithms used for automatic diagnosis of melanoma.Furthermore, the techniques like Clustering [63] and fuzzy C-means are unsupervised machine learning algorithms used for diagnosis purpose.Soft computing techniques like Neurofuzzy are used by Hybrid systems among emerging algorithms for diagnostic with higher accuracy rates [2].Deep learning neural networks are found effective technique of the melanoma detection.In [66] Haenssle et al., compared the detection results of convolutional neural networks (CNN) with the group of 58 dermatologist diagnosis and CNN outperformed the team of dermatologists.CNN is applied for melanoma detection in [67] that resultant in 81% of accuracy.

E. Assessment
The usage of any application is dependent on its percentage of providing correct results.One of the approaches to identifying the correctness of the developed automatic melanoma diagnosis model is the validation of the trained model using the testing dataset.The assessment could be done by discrimination (how well melanoma and benign are differentiated) and calibration (resemblance between the prediction of modal to expert knowledge) [7].The most common measures for performance evaluation in the previous literature is discrimination on the measurements of accuracy, sensitivity, and specificity.The previous research reported various level of accuracy on different automatic melanoma detection models such as DWT feature extraction with clustering and probabilistic neural network (PNN) resultant in 93% and 95 % accuracy [63], histogram analysis feature with fuzzy systems 90% accuracy [31], with feed forward backpropagation artificial neural network 95% and K-ANN 97.5% [61].Similarly, ABCD rule and Histogram feature extraction with SVM reported accuracy of 80% [29], Morphological features, color features and GLCM features with combining Self Organizing Map (SOM) and Radial Basis Function (RBF) classification showed accuracy of 96.15 [27], differential evolution-based feature selection with SVM classification resultant in 89.1% accuracy [41].2-D Fast Fourier Transform, 2-D Discrete Cosine Transform, Complexity Feature Set, Color Feature Set, Lesion Orientation Feature, Lesion Margin Feature, and Lesion Intensity Pattern Feature with SVM classifier came up with 91.5% and 93.5% accuracy [62].Histograms of edge intensity with SVM classifier reported with accuracy 97.32% [21], Morphological and Watershed Algorithms feature extraction with a classifier of Naive Bayes reported the accuracy of 80%, J48, and MLP with the accuracy of 85% [62].Segmentation using the Wavelet -Fuzzy C-Means algorithm then feature extraction using the ABCD rule and Grey Level Co-Occurrence Matrix (GLCM) with a reported accuracy of 88% [68].

F. Discussion
The previous studies have proved that it is possible to detect the melanoma problem with higher accuracy using the Computer Based Applications (CBA).This provides us the proof of concept that digital technology can facilitate a common user in detecting this deadly condition and to take preventive actions earliest by visiting the dermatologist.Although, the CBA are beneficial for their processing power, but, this technology has few limitations such as usability, size, convenience, and cost.In the traditional CBA, it is required to use a camera for capturing the image of lesion area and additional efforts to upload this image to the computing device for the future processing.Currently, the smartphones made this process more efficient.
There are many healthcare applications including melanoma care available on different mobile operating systems such as IOS and Android platforms.Most of the well-rated available applications are just for mole tracking and educating the users about the melanoma and a very few applications are available for the automatic detection of melanoma [18].Though a huge amount of previous literature exists on developing the automatic melanoma diagnosis algorithms but the studies in [14,17] discovered the limited availability of such SBA due to their support for the specific operating system.The reasons for lacking such SBA to the users should be investigated, even so, the availability of high-performance algorithms.Furthermore, the users who have access to such apps mentioned many limitations in their reviews, such as no device compatibility, the camera not taking photos, sign-in problems, technical problems, no support with updated versions of the operating system and the usability issues.The memory consumption and processing time issues should be considered to execute the melanoma detection algorithm using SBA.Since, the smartphones' hardware limitations make it difficult the processing of the proposed algorithms, furthermore, the melanoma diagnosis apps might take more hardware storage resources.
To increase the performance time without causing much battery consumption we proposed to offload the data on the cloud i.e. all the computations will be done at cloud and results will be sent back to the application from the cloud.In this way, the application will store data at the cloud rather than on the smartphone.Hence, the application would get more space for storage of data as compared to the smartphone's storage capacity, so time efficiency will be achieved.The focus of our study is the performance, not the accuracy, therefore, we did not consider the comparison of various machine learning classifiers.In our proposed model the same steps for automatic melanoma diagnosis have been tested in different processing environments of cloud and smartphone.www.ijacsa.thesai.orgIV.PROPOSED METHOD TO ACHIEVE THE ADVANTAGES OF CBA AND SBA The proposed method discusses the steps involved in the melanoma diagnosis on the cloud as compare the results with the processing time of same steps on a smartphone's hardware.The proposed methodology is divided into four main steps i.e. pre-processing, segmentation, feature extraction, and classification as shown in Fig. 2. The details of each module are described in the following sections.

A. Data
The dataset is taken from the Klinik und Poliklinik für Dermatologie und Allergologie, Technische Universitat München, Germany [29] that consists of the dermoscopic images of skin lesion consists of 120 of melanoma and nonmelanoma images and used for training and testing purpose.The dataset consists of images without any distracting elements like jewelry, clothes and any background.In the images' dataset, the region of interest was manually selected consisting of non-melanoma and melanoma skin pigments.We randomly split the dataset into two parts i.e. training and testing part with a ratio of 70% and 30%.

B. Pre-Processing
In the preprocessing stage, images are prepared by making them in same dimensions and noise-free to achieve better segmentation results.In this study, the images were available in the RGB format.Firstly, we have resized the images in 640 x 480 dimensions.Secondly, we have applied the Gaussian filter [29] with window size 3 to remove the noise.

C. Segmentation
The segmentation is done on the resultant images from preprocessing stage.Grab Cut [47] algorithm is used for the segmentation of the images to achieve good segmentation results in real time.We have provided the facility to the users to draw a rectangle around the lesion part.However, drawing the rectangle is users' dependent that may take long reliant on the ability of users, in many cases, it takes 4 to 5 seconds.To keep all the processes in the background thread and avoid the application crash, we have used AsyncTask [69].

D. Feature Extraction and Classification
It has already been discussed that successful classification is dependent on the appropriate set of the features.In this context, the main challenge is to select the features while considering the processing time out of many features of the segmented image.Using mobile-offloading strategy, storage and battery utilization limitations are almost eradicated but still to keep processing time as small as possible only limited features of the image are extracted so that processing speed will not be affected.In features extraction phase, we have mainly used the histogram and ABCD features [29].The extracted features from the segmented image consist of the extracted area of the lesion, the perimeter of lesion, eccentricity, mean, standard deviation, L1 norm, L2 norm angle of lesion, major and minor axis of the lesion.
For the classification, the model is trained using the SVM [29] classifier.The main reason for selecting SVM is its simplicity and suitability for the classification of melanoma.
More sophisticated classifier such as deep neural network, convolutional neural networks, and ensemble models can also be applied but the discussion trade-off between the improved classification quality is beyond the scope of this work.

E. Implementation
We have used the Amazon S3 cloud services [70] for the implementation.As first step images were uploaded as an object to source bucket in Amazon S3.Amazon S3 detects this object created as an event and publishes the s3:ObjectCreated:* event to AWS Lambda by invoking the Lambda function and passing event data as the parameter.Further, AWS Lambda executes this Lambda function by assuming the executive role that is specified at the creation of the Lambda function.While calling the Lambda function, it receives the source bucket and objects key name from the event data as parameters.The Lambda function reads the object and creates a thumbnail using graphics libraries and saves it to the target bucket.
After the classification, the results are sent back to the application from the cloud in the form of a JSON object.The application then reads the JSON object and displays the result to the user in a form of a message stating if the lesion is cancerous or not.This allows to perform all the basic heavy computation at cloud that can preserve battery utilization of smartphone as well as reducing the performance time and saves the huge storage space of local machine by using the cloud storage.

F. Results and Discussion
This section reports the comparison of the processing time results of automatic melanoma detection model for the cloud and the smartphone's local machine.The processing time of automatic melanoma detection is recorded at each stage i.e. pre-processing, segmentation, feature extraction, and classification.The measurements are made to compare the melanoma detection image processing efficiency on both the smartphone's local machine and cloud processing.Furthermore, the accuracy of melanoma and non-melanoma images detection was measured.Table I presents the results of images processing and classification on the smartphone's local machine.The average time of the application for classifying of an image is 14938.00ms.Average time classifier used for training is 30405.00ms.Table II presents the results of images processing and classification on the cloud.The average time of the application for classifying the images is 1297.28ms.The results of our proposed model showed the difference between the average processing timings of melanoma images using cloud offloading and processing on smartphone's local machine 1.2 sec and 15 secs respectively.We applied Wilcoxon test [71] to find the difference between total image processing time in the cloud and smartphone local machine environment and found the pvalue is .0002<0.001.Therefore, there is a significant difference in melanoma detection time in both environments.While processing the lesion image on smartphone's local machine the segmentation stage took significantly more time and the average time exceeded to almost 14808.67milliseconds as compared to average segmentation time on the cloud is 44.8 milliseconds.It means the most expensive stage in terms of processing time on the smartphone's local machine is segmentation.However, each stage of cloud processing is consuming on average less amount of time that can significantly contribute to make the melanoma detection process more efficient.Furthermore, we have found no difference in diagnostic accuracy in both conditions i.e. melanoma detection is 80% of the test images data and the accuracy of non-melanoma detection is 75% the test images data, as this is because the same algorithms are applied for each stage of classification in both environments.Though, in both cases there are various challenges, in local hardware of smartphone, the bottleneck is the limited storage space and processing speed, while on the cloud it always required data streaming for uploading and downloading of images.A few limitations of our proposed study are that it is trained and on one type of dataset and accuracy of diagnosis is not measured on the various machine learning algorithms.

V. CONCLUSION AND FUTURE WORK
Early diagnosis of melanoma leads to its timely treatment, but if it is not, cancer can spread to other parts of the body and becomes hard to treat and can be fatal.The previous studies have discovered that technology may play an important role in the diagnosis of diseases like melanoma in its early stages.This can facilitate the patients to seek medical help earliest.The previous research showed that the diagnosis of melanoma is possible with the high accuracy by using machine learning algorithms in the CBA systems.However, the users preferred to use the SBA over the CBA system in their everyday life for healthcare monitoring and diagnosis.The limited availability and diagnostic inaccuracy of SBA can delay the timely diagnosis of melanoma and harm the users.One of the reasons for such limitations could be processing performance of image data and machine learning algorithms on the smartphone hardware.Therefore, we proposed to process the data and apply machine learning algorithms on the cloud instead of smartphone local hardware to increase the accuracy with time efficient solution.The results of our study showed that processing at the cloud takes significantly less time for all stages of diagnosis in comparison to smartphones local machines.
The lessons learned in this study can serve as the guidelines for the developers for developing systems for early cancer detection.In the future, we intend to train the model on the various dataset and report the accuracy by applying different machine learning algorithms including the deep neural networks.As, we are proposing to test the system by using deep learning neural networks as the skin can cancer detection algorithms.Since, it is an emerging example to enhance smartphones for cancer detection outside the dermatologists' clinics; it provides the capability of working on huge data-sets using tiny devices like smartphones.

Fig. 1 .
Fig. 1.Overall System Models of CBA and SBA for Automatic Diagnosis of Melanoma.

TABLE I .
PROPOSED MODEL PROCESSING TIMINGS IN (MS) ON SMARTPHONE LOCAL MACHINE FOR AUTOMATIC MELANOMA DETECTION

Average Time Consuming on the Classification Per Image = 14938 (15 Seconds Approx.)TABLE II .
PROPOSED MODEL PROCESSING TIMINGS IN (MS) ON THE CLOUD FOR DIFFERENT PHASES OF AUTOMATIC MELANOMA DETECTION

Image ID Pre-Processing Segmentation Feature Extraction and Classification Total Time on One Image (in ms)
Average Time Consuming on the Classification Per Image = 1297.28(1.2 Seconds Approx.)www.ijacsa.thesai.org