Today, skin cancer is a public health and economic issue, that for long years have been approached with the same methodology by the dermatology field . This is troublesome when we analyze that for the last 30 years the numbers of cases diagnosed with skin cancer have increased significantly . It is more troublesome when money comes in the equation, seeing that millions of dollars are being spent in the public sector . A major part of this is spent in the individual analysis of the patient. Where the doctor analyzes the lesion and takes action on the pieces of evidence seen. If any of these steps were to be optimized, it could mean a decrease in expenditure for the whole dermatology sector.
Dermatology is one of the most important fields of medicine, with the cases of skin diseases outpacing hypertension, obesity and cancer summed together. That is accounted because skin diseases are one of the most common human illness, affecting every age, gender and pervading many cultures, summing up to between 30% and 70% of people in the United States. This means that in any given time at least 1 person, out of 3, will have a skin disease . Therefore, skin diseases are an issue on a global scale, positioning on 18th in a global rank of health burden worldwide .
Furthermore, medical imaging can show itself as a resource of high value, as dermatology has an extensive list of illness that it has to treat. In addition, the field has developed its own vocabulary to describe these lesions. However, verbal descriptions have their limitations and a good picture can replace successfully many sentences of description and is not susceptible to the bias of the message carrier.
In addition, the recommended way to detect early skin diseases is to be aware of new or changing skin growths . Analysis with the naked eye is still the first resource used by specialists, along with techniques such as ABCDE, that consists of scanning the skin area of interest for asymmetry, border irregularity, uniform colors, large diameters and evolving patches of skin over time . In this way, the analysis from medical images is analogous to the analysis with the naked eye and thus can be applied the same techniques and implications. This supports the idea that skin cancer often is detectable through naked eye and medical photography.
Worldwide the most common case of cancer is skin cancer, been melanoma, basal and squamous cell carcinoma (BCC and SCC) the most frequent types of the disease . This type of the disease is most frequent in countries with the population with predominant white skin or in countries like Australia or New Zealand .
In Brazil, it is estimated that for the biennium of 2018-2019, there will benew cases of non-melanoma skin cancer (BCC and SCC mostly) . Moreover, it is visible that the incidence of these types of skin cancer had risen for many years. This increase can be due to the combination of various factors, such as longer longevity of the population, more people being exposed to the sun and better cancer detection .
In the United States, the numbers add up to deaths estimated for 2017 . Skin cancer accounts for more than cases (not including carcinoma in situ, nor non-melanoma cancers) in the US alone in the year of 2017 .
Despite skin cancer being the most common type of cancer in society, it does not represent a great death rate in its first stages, since the patient has a survival rate of . However, if the patients are diagnosed in the later stages the 5-year survival rate decreases to .
In Brazil, were expected to occur new cases of non-melanoma skin cancer in 2010. From that, it was expected that were diagnosed in early stages. However, even with early diagnosis this amount of cases means around R$ million (Reais) to the health public system and R$ million to the private system per year .
Moreover, we can divide skin lesions into two major groups, one being malignant lesions and the other benign lesions. The first is composed mostly of skin cancers and the latter being composed of any lesion that does not pose a major threat. One counterexample of this division is the actinic keratosis, that presents itself as a potential SCC, as it has the potential to develop into it. Thus, actinic keratosis is classified as a precancerous lesion. Furthermore, this work analyzed and chose lesions in total, 4 malignant and 8 benign (being 1 precancerous), as seen on Figure 1. The lesions where chosen mainly on the public data available online, to be described in subsection III-A.
Seeing the problems involved in diagnosing skin lesions, this work envisions to create a learning model to classify skin lesions in one of 12 conditions of interest. With this purpose, the classifier aims to correct distinguish lesions analyzing clinical images with the condition. Furthermore, this can prove to be a useful tool to aid patients and doctors on a daily basis operation.
Furthermore, this work is done with the vision of being the stepping stone for newer approaches that democratize and distribute access to health care. A good lesion classification model may be the motor that will accelerate the construction of tools that puts the possibility of early diagnosis and alert on patient‘s hands, even far isolated patients, where few doctors can reach. These tools may save many lives and reduce several costs with the treatment of late-stage diseases.
The related work in this field proved that there are many algorithms capable of tackling this problem, but there is an astonishing difference between shallow and deep methods in machine learning. With that in view, this work will guide its efforts in using deep neural networks to achieve its main objective. For this to happen, the gathering of good practices and techniques used to approach the classification of clinical images is needed.
Ii Related Work
. This has proven to add more reliability and confidence to doctors in their practices as they have more information to diagnose patients. For dermatology and skin lesions detection has not been different. History shows that many approaches had been made over the course of years, applications with shallow algorithms such as K-Nearest Neighbors (KNN)
and Support Vector Machines (SVM) had been proven to accomplish good results, but are as well tiresome to build applications that involve such approaches.
Seeing this, some researchers have been applying this approach to classifying skin lesions with success. One common thing in this domain is the lack of quality and scarcity of open data. It is common to see works with only a couple hundred of examples. That is a characteristic of the medical field. There are many hospitals and clinics that hold huge amounts of data and do not make it public mainly because of privacy issues with patients. However, many authors still apply efforts to push forward the technology in such fields, overcoming these barriers. For the purposes of this work, we listed some related researches that uses deep learning in dermatology, applying neural networks to skin lesions.
) proposed an approach to classify melanoma, seborrheic keratosis, and nevocellular nevus, using dermoscopic images. In their work, they proposed an ensemble solution with two binary classifiers, that still leveraged from age and sex information of the patients, if they were available. Furthermore, they utilized techniques of data augmentation, using a combination of 4 transformations (rotation, translation, scaling and flipping). For the architecture, they chose the ResNet-50 implementation on the framework Keras, with personal modifications. This model was pre-trained with the weights for a generic object recognition model and finally used two optimizers AdaGrad and RMSProp. This work was then submitted to the ISBI Challenge 2017 and won first place, ahead of other 22 competitors.
Nasr-Esfahani et al. (2016) showed a technique that uses imaging processing as a previous step before training. This result in a normalization and noise reduction on the dataset, since non-dermoscopic images are prone to have non-homogeneous lightning and thus present noise. Moreover, this work utilizes a pre-processing step using k-means algorithm to identify the borders of a lesion and extract a binary mask, which the lesion is present. This is done to minimize the interference of the healthy skin in the classification. Furthermore, Nasr-Esfahani et al. (2016) used a technique called data augmentation to increase the dataset, using three transformations (cropping, scaling and rotation) and multiplied the dataset by a factor of 36 times. Finally, a pre-trained convolutional neural network (CNN) is used to classify between melanoma and melanocytic nevus for epochs ( iterations, using a batch size of 64 and a dataset with examples).
) presented a thorough study for the 2017 ISIC Challenge in skin-lesion classification. In this work, it is presented experimentations with some pre-trained deep-learning models on ImageNet for a three-class model classifying melanoma, seborrheic keratosis, and other lesions. Models such as ResNet-101 and Inception-v4 were vastly experimented with several configurations of the dataset, utilizing 6 data sources for the composition of the final dataset. It was also reported the use of data-augmentation with at least 3 different transformations (cropping, flipping, and zooming). Also, it is reported that the points that were critical to the success of the project were mainly due to the volume of data gathered, normalization of the input images and utilizing meta-learning. The latter is elucidated as an SVM layer in the final output of the deep-learning models, that map the outputs to the three classes that were proposed in the challenge. Finally, this work won the first place in the 2017 ISIC Challenge for skin lesion classification.
) present a solution similar to the previous 3. This is due to the inherent limits and problems that are existent in this domain, data scarcity. In this work transfer-learning is applied, using two different learning models, VGG-19 and ResNet-50, both pre-trained on ImageNetclasses dataset. These were used to classify between malignant and benign lesions, using
dermoscopic images. For the correct learning process, it was also used the up-sampling of the underrepresented class. This process was done using a random number of transformations, chosen between rotation, shifting, zooming, and flipping. Furthermore, in this paper, it was presented 3 experiments, first with the VGG-19 architecture with the addition of two extra convolutional layers, two fully connected layers, and one neuron with a sigmoid function. Second it experimented with the ResNet-50 model, and finally a implementation of VGG-19 with an SVM classifier as the fully-connected layer. As a final result, the modified implementation of the VGG-19 had the best results. However, the main reason for the poor results in the ResNet-50 model was due to the small amount of training data. Maybe with larger amounts of data, it would be possible to train a small model and produce better results.
Esteva et al. (2017) presented a major breakthrough in the classification of skin lesions. This research compared the result of the learning model with 21 board-certified dermatologists and proven to be more accurate in this task. It was performed to classify clinical images, indicating whether a lesion is a benign or malignant one. For this result were used images, consisting of different diseases and including dermoscopic images. Furthermore, it was used a data-augmentation approach to mitigate problems as variability in zoom, angle, and lighting present in the context of clinical images. The augmentation factor was by 720 times, using rotation, cropping, and flipping. Here, an Inception-v3 pre-trained model was utilized as the main classifier, fine-tuning every layer and training the final fully connected layer. Moreover, the training was done for over than 30 epochs using a learning rate of
, with a decay of 16 after every 30 epochs. The classification was done in such a way that the model was trained to classify between 757 fine-grained classes, and then as the probabilities were predicted it was fed into an algorithm that selected the two different classes (malignant or benign). Using this approach, this work achieved a new state of the art result.
Seog Han et al. (2018) proposed to classify the skin lesions as unique classes, not composing meta-classes such as benign and malignant. It used the ResNet-152 pre-trained on the ImageNet model to classify 12 lesions. However, for training was used other 248 additional classes, that were added to decrease the false positive and improve the analysis of the middle layers of the model. Furthermore, this was done in such a way that the train sampling for the 248 diseases did not outgrow the main 12, thus when used for inference the model predicted one of the 12 illness, even when the lesion does not belong to one of them. For training was used images, augmented approximately 20 to 40 times, using zooming and rotation. These images were gathered from two Korean hospitals, two publicly available and biopsy-proven datasets, and one dataset constructed from 8 dermatologic atlas websites. Furthermore, the training lasted for 2 epochs using a batch size of 6 and a learning rate of without decay before 2 epochs. This early stopping was done to avoid overfitting on the dataset. Finally, it was reported that the ethnic differences presented in the context were responsible for poor results in different datasets, thus it was necessary to gather data from different ethnics and ages to correct mold the solution to reflect the real world problem present in skin lesions classification.
Finally, we can observe that every one of these works has one aspect in common, data scarcity. This is a characteristic of the medical domain, there are very few annotated examples of data that are publicly available. The works that proven to have more impact had to collect data from other sources, mainly private hospitals or clinics. Furthermore, this step of data collection did not fully mitigate the problem, it was still necessary to use techniques such as transfer-learning [24, 25] and data-augmentation [26, 27, 28].
Iii Methods and Materials
Due to the scarcity of data present in the medical field, the datasets chosen were not the selection of the best on a collection of options. The process of choosing one mainly took into account the criterion of public availability. Aside from that, the only pre-requisite was that the dataset was composed with only clinical images (photos taken from cameras without other tools or distorting lenses).
From these criteria, only two datasets fitted the description. The datasets contained 10 (ten) distinct lesions, containing 4 malignant illnesses at maximum. Another additional dataset was gathered from dermatologic websites, using a script for scrapping pages. The latter dataset was acquired from the work of Seog Han et al. (2018) and is not publicly available due to copyrights owned by the websites. Finally, these datasets are further discussed below.
The first dataset used is provided by the Department of Dermatology at the University Medical Center Groningen (UMCG) . This dataset contains 170 images that are divided between 70 melanoma and 100 nevus cases. Furthermore, these images were processed with an algorithm for hair removal.
The second dataset is provided by the Edinburgh Dermofit Image Library  and is publicly available for purchase, under an agreement with the license of use111Available at https://licensing.eri.ed.ac.uk/i/software/dermofit-image-library.html.. This dataset is the more complete one found on the web. It contains images, that are divided into 10 lesions, including melanoma, BCC, and SCC. These images are all diagnosed based on experts opinions. In addition, it is also provided the binary segmentation of the lesion, for each one. It is valid to note that the images are not all in the same size.
Furthermore, the lesions and its respective numbers are listed in the table I.
|Lesion Type||Number of images|
|Basal Cell Carcinoma||239|
|Melanocytic Nevus (mole)||331|
|Squamous Cell Carcinoma||88|
This last dataset, was acquired from running several scripts for scrapping different dermatological websites222These websites included, http://dermquest.com, http://www.dermatlas.net, http://www.dermis.net/dermisroot/en/home/index.htm, http://www.meddean.luc.edu/lumen/MedEd/medicine/dermatology/melton/atlas.htm, http://www.dermatoweb.net, http://www.danderm-pdv.is.kkh.dk/atlas/index.html, http://www.atlasdermatologico.com.br, http://www.hellenicdermatlas.com/en.. So that is the reason that this dataset was baptized as Atlas. This dataset was obtained from Seog Han et al. (2018) in a personal submitted request. It contains images downloaded from websites and distributed between six lesions.
The difference from the Edinburgh dataset is that this contains two lesions that are not present on the first, Wart and Lentigo – both benign lesions –, as it can be seen on table II. This, alongside with the Atlas and MED-NODE datasets, sums up to 12 lesions, that are the interest of this work.
|Lesion Type||Number of images|
|Basal Cell Carcinoma||1,561|
|Melanocytic nevus (mole)||626|
One difference between Atlas and the first two datasets is the quality of the images, since the dataset was collected from web pages, is not all images that present the same quality, nor the same common viewpoints observed on the Edinburgh dataset. Therefore, this dataset is the most heterogeneous in matters of quality of imaging, viewpoints, the age of patients and ethnicity. However, this dataset in its entirety is not officially diagnosed by specialists, but on the other hand, these photos were displayed on websites that are reliable and used by students. So, there is a heuristic that these images were revised before putting to display in these websites and can be trusted.
Iii-B Handling data scarcity
As noted previously, for the correct generalization of the weights and biases of a network, a huge amount of data is needed. However, the medical field lacks this amount of images and if only used the data public provided, a good generalization of the problem cannot be met if we wish to train a deep neural network.
Iii-B1 Transfer Learning
In practice, the domains that are faced in the industry, rather than the academia, usually have low numbers of labeled data. This poses a major obstacle to train a deep convolutional neural network from scratch, since the data may not demonstrate a true representation of the real world. Thus, it is common to see works that utilize the pre-trained weights of a previously trained architecture, this can lead to 2 major approaches.
The approaches are: using a CNN as a fixed feature extractor or fine-tuning the trained model. The first is mostly used to collect features of images and then use them to train a linear classifier in a new dataset. The second strategy is to continue the training of the network, replacing completely the final layer, but updating the parameters through backpropagation.
A common use of transfer in computer vision, more specifically object classification, is to use pre-trained models that were trained on the ImageNet dataset. Some recent work done byKornblith et al. (2018
) shows that ResNets take the lead in performance when treated as feature extractors. While only fine-tuning some models to other datasets, they achieved a new state-of-the-art. All these tests used pre-trained weights and fine-tuned them with Nesterov momentum forsteps, which sometimes corresponded as more than epochs using a batch size of . Finally, it was proven, empirically, that the Inception-v4 architecture achieves overall better results for this task than the other 12 pre-trained classification models.
Therefore, transfer learning optimizes and cuts short most of the time in the training of new applications. However, this can add some constraints to the work. One example of this is when using a pre-trained network is not possible to extract and change arbitrarily the layers of the network. Another point is that normally, small learning rates are applied to CNN weights that are being fine-tuned. This is because we already expect that the weights are good, and we do not want to distort them too much .
Iii-B2 Data augmentation
Data augmentation is a technique used where we do not have an infinite amount of data to train our models. This can be done by introducing random transformations to the data. In image classification, this can be translated as rotating, flipping and cropping the image. These perturbations add more variability to the input, thus this could mean an overfitting reduction in our model by teaching it about invariances in the data domain [28, 31, 32]. Therefore, these transformations do not change the meaning of the input, thus, the label originally attributed to it still holds its importance.
Although some transformations in an image can be done agnostic to the field of application (e.g. translation), some other transformations are entitled to domain-specific characteristics. For this work we used an additional transformation that randomizes the natural light effect in the picture, this was done to mimic the transformations seen in indoors clinics due to different light sources. Furthermore, to increase the variability added by augmenting data, the probability of application and magnitude variability are added to the transformations.
Have seen the needs for augmentation, it was used the Augmentor Python library 
for implementing the process of augmenting the dataset. The library has predefined transformations and has a hot-spot for new implementations of transformations. This was quite useful when implementing the method to add light variance to the augmentations.
Each transformation chosen to be applied had been based on general guidelines of data augmentation [31, 32] or on the nature of the data. Thus, the transformations were aligned in a pipeline fashion, where each had a probability that defined the likelihood of being applied to the image and at the end, the new image was saved in the destination. Furthermore, the operations used for this work were the ones listed in table III.
Iii-C Datasets Preparation
The first thing done, before applying transformations to the dataset, was to separate a test set, usually a 10% to 20% of each lesion, depending on the experiment. Following this, if needed for the experiment, was done the data augmentation process. Then the remaining sample was analyzed to see how much was necessary to augment each class. The process augmented the remaining dataset, usually, by a factor of 29 times. That summed with the original dataset was accounted to 30 times the original amount.
After processing the images necessary to compose the training and test datasets, the images for the training dataset were processed to create an LMDB file  for fast access to the data in training time. In this process the training dataset is divided between a training set and a validation set. Thus, this split is done in a way that 80% of the data is used for training and 20% is for validation. However, this split is done in a stratified way, so that each split has a fair amount of each class.
Finally, these slices of the dataset are kept separated and are used as such for the experiment.
The architecture used for this work has been the ResNet-152, used with pre-trained weights trained on ImageNet database. This architecture was chosen mainly for the results the family (ResNet-50, ResNet-101, and ResNet-152) had achieved on other related works.
The metrics used in the experiments were consistent throughout this work. This decision was made to build the ground necessary to compare the results between different experiments. Therefore, two metrics were used in training time and three for the testing step.
For the training time, the main metric used was the accuracy metric. Nonetheless, as the model classifies 12 classes, the accuracy reported has two variants: top-1 accuracy and top-5 accuracy (or accuracy@5).
For the testing step, it was created a process that the predictions for both the validation and the test datasets were generated. With these predictions in hand, as well as the true labels of the examples, it was possible to create a confusion matrix for the model. Furthermore, with the confusion matrix at hand, was simple to compute other metrics, such as precision, recall (or sensitivity), and accuracy as well.
Another metric used to evaluate the models was the AUC (Area Under the Curve), along with the ROC (Receiver Operating Characteristic) curve. The ROC curve is a mapping of the sensitivity (probability of detection) versus 1specificity (probability of false alarm), using various thresholds points. Typically, this metric is implemented in systems to analyze how accurately the diagnosis of a patient state is (diseased or healthy) . Furthermore, the AUC summarizes the ROC curve and effectively combines the specificity and the sensitivity that describes the validity of the diagnosis .
Alongside with the ROC curve analysis, is common to calculate the optimal cut-off point. This is used to further separate the test results, so that a diagnosis of diseased or not is provided. When the point is closest to where the sensitivity is equal one and specificity is equal zero, it has achieved the best result possible [37, 38].
Iii-F Best Experiment
The best results achieved on this work were with the use of the ResNet-152 architecture, trained over an augmented dataset with a mixture of MED-NODE, Edinburgh and Atlas datasets. The augmentation made was of 29 times for each class, leaving the classes unbalanced.
Furthermore, the ResNet architecture had to be modified to accommodate the needs of the problem at hand. So, the last layer of the architecture was changed from classes to classes. Therefore, the final architecture produced followed the same schema seen in Figure 2.
Moreover, the technique of transfer learning was applied to generate the best results more rapidly. For that, the hyperparameters of the network had to be tuned and carefully set, for that same purpose.
The dataset used for the experiment was a derivative of the previous experiment. The original dataset consisted of a mixture of MED-NODE, Edinburgh and Atlas images, moreover, the dataset did not go under augmentation processes and was divided into three separated directories following the division of %, %, and % for testing, evaluation, and training, respectively.
Moreover, the training and validation datasets were augmented, using the transformations listed in table III, by a factor of 29 times. The testing dataset did not suffer any transformations. Finally, the final numbers for the datasets can be seen in table IV.
|Number of images|
|Basal Cell Carcinoma|
|Melanocytic Nevus (mole)|
|Squamous Cell Carcinoma|
For the training phase, it was used transfer learning techniques. Thus, it was necessary to gather the ResNet-152 pre-trained weights for the ImageNet dataset333Available at https://github.com/KaimingHe/deep-residual-networks. Last accessed on June 26th, 2018. first, and then modify the network for the purpose of this work.
The learning rate was chosen to be higher than the used in the related works, for two major factors. First of all, one of the early experiments done showed that with a low learning rate it was found a plateau on the very start of the training. Thus, the network did not have the power to learn the features of the skin lesions. Secondly, it was found that increasing the learning rate often aids to reduce underfitting .
Additionally, the final dense layer has a 10 times factor of multiplication for the learning rate, compared to the other layers of the network. However, different from the process of freezing the early layers, used in the same research, this work approximates more to the approach implemented in , that fine-tuned all the layers of the network.
This was done with the premise in mind, that although the ImageNet dataset is far diverse and comprehends many different objects, it does not have classes that approximate in characteristics and problems encountered in this dataset of skin lesions. Furthermore, it the weights in the early layers may not be properly trained to extract fine features such as the ones found within the problem that is faced in this work. Therefore, it was needed to fine-tune the learnable parameters since the early layers and learn the final classifier from scratch.
For this work it was used the Caffe framework, since it allowed and simplified the changes that were needed to do in the layer levels. Furthermore, all the hyperparameters were defined in a separated configuration file called “Solver”, necessary to define a .prototxt file with free parameters used in the training. These hyperparameters can be seen in table V.
Due to the infrastructure limitations it was only possible to set the batch_size to 5. However, the Caffe framework provides an hyperparameter that serves as a hold on the update of the gradients. The iter_size
defines how many iterations the gradients will wait until the update. Altough using this hyperparameter may affect the batch normalization layers used in the architecture, the final results did not show this effect. Furthermore, the maximum iteration parameter was chosen to calculate the number ofepochsto 10.
All the experiments were conducted under the same environment, that consisted of Antergos 18.3 (Linux kernel 4.16) running BVLC Caffe  with support for an NVIDIA GTX 1070 GPU (Cuda 9.1 and cuDNN 7.1).
Finally, the model used in the testing phase was the product of the iteration number . This training phase took an uninterrupted total time of 35 hours (approximately seconds for every 50 iterations).
Iv-a Metric Results
With the confusion matrix generated for the predictions in the testing dataset, was found that for all the 11 lesions, with exception of the Actinic Keratosis, achieved a accuracy higher than 80%. Thus accounting for a 78% total accuracy for the model. However, this metric has a bias attached to it, since the distribution of the classes is not even, and therefore can cause misleading in the analysis of this metric.
|Lesion||Esteva et al.||Seog Han et al.||This work|
|Basal cell carcinoma||-||0.90||0.91|
|Lentigo||-||0.95444Metric calculated with an Asian dataset, thus may not serve as a comparative in a stricto sensu.||0.95|
|Squamous cell carcinoma||-||0.91||0.95|
For this work, it was judged to be important to bring an input of the model‘s interpretability, since the application is sensible with human life. Moreover, this work want to raise the importance for the use of interpretability techniques for machine learning in medical applications. In addition, an model with an explainability may be more well received by medical practitioners, since it demystify the decisions taken by the model.
Moreover, model interpretability is important at several points. For example, in the training phase if a model is behaving unexpectedly an engineer must know what is happening in order to reverse the situation. For that, if the engineer has in hands the interpretability features of the data, it may found out that the reasons to the behavior might be because of a hindsight bias  present in the dataset. So, when debugging an application that has a machine learning model, it is important to have the tools to debug properly.
Another fact that is important to discuss is trust. When people are using systems, specially life-critical systems such as medical software, people want to trust that nothing unexpected will happen. And trust for machine learning models can be gained in two ways: through daily use evidence, that can be achieved by getting a high accuracy, for example; another route is to explain how did the model reach the decision, that in this way the end-user will have not only proof that the decision was correct, but how did it know it was a correct decision to make. The second approach can lead to a scenario that the “black-box” becomes less so, and less intimidating, thus leading the user to be more inclining to use the prediction to take action . According to Gunning and DARPA (2016), it is necessary to create a new approach to how the machine learning models present their predictions.
Iv-B1 Preliminary Results
An analysis of the model predictions was made, as a way to discover which were the examples in the validation dataset, that the model most got right and wrong. This is used as an artifact for interpretability, since it can bring new insights about the heuristics that are causing the model‘s decisions. Additionally, it is also commonly used even among simpler applications due to the simplicity of using this technique.
Furthermore, the GradCAM technique 
was applied for this work, as a method to have visual feedback to where the network‘s activations, previous to the softmax layer, were more predominant. This gives more artifacts to build an explanation for the model decisions. This can also be used to identify problems where the network learns adjacent features that may be present in lesion samples, but does not necessarily hold meaning with the lesion (e.g. nails or hair in a scalp near the lesion),vide the “Husky vs Wolf” experiment in , where background snow was a predominant feature in classifying a Wolf.
For the most wrong predictions, it was found that the causes may fall under 2 factors: the lesion analyzed indeed caused confusion between the lesions (Figure 3(a)); the model did not generalize well and was struggling to extract predominant features in some of the images, thus giving more importance to areas that were not relevant, from a practical perspective (Figure 3(b) and 3(c)).
The most correct lesions brought more information on what the model was already good at, and how this translate in a perspective of image features. For example, in Figures 4(a) and 4(b), the model found out that the regions that mostly identify the lesions as Malignant Melanomas are indeed the ones that would bring more relevance to the doctor‘s decision making process. However there are still some examples, such as Figure 4(c), that are more emblematic and need a expert‘s eye to shed a light on it. Moreover, we can speculate that the model took advantage of the geometric and color asymmetry in the lesion to make an accurate decision.
Furthermore, it was found that the model generalizes well for the examples that it was shown, correctly activating the regions that contained the lesion, even in images that the pose made challenging the localization of the lesion.
Nonetheless, this kind of interpretation is important not only in a developer vision but also for the possible doctors that were to receive a simple prediction and to take action on another human life based on it. With these other tools, the doctor has much more to support the next decision that is necessary to take on the patient. Therefore, making the models as interpretable as accurate can transform a tool in a good counselor.
In this paper, we discussed the importance of automatic classification method to support skin lesions diagnosis. Furthermore, we listed a group of researches and their achieved results for the same problem. However, it is still a problem with several difficulties, even more when we study clinical images, that may present an immense diversity due to variables such as cameras and environments.
Seeing this, this work presented a model capable of classifying 12 skin lesions, that reached results comparable with state-of-the-art. Additionally, it was presented studies on the model decision taking process with interpretability techniques. However, regardless of the excellent results encountered in this work, it is necessary to further test the model with more data, with more diversity (different ethnics and ages), and then investigate the results for improvements.
- Hamblin et al.  M. R. Hamblin, P. Avci, and G. K. Gupta, Imaging in Dermatology. Academic Press, 2016.
- American Cancer Society  American Cancer Society, “Cancer facts & figures 2018,” Available at https://www.cancer.org/research/cancer-facts-statistics/all-cancer-facts-figures/cancer-facts-figures-2018.html, 2018, accessed in 19/05/2018.
- de Souza et al.  R. J. S. A. P. de Souza, A. P. Mattedi, M. P. Corrêa, M. L. Rezende, and A. C. A. Ferreira, “Estimativa do custo do tratamento do câncer de pele tipo não-melanoma no estado de são paulo - Brasil,” Anais Brasileiros de Dermatologia, 2011.
- Bickers et al.  D. R. Bickers, H. W. Lim, D. Margolis, M. A. Weinstock, C. Goodman, E. Faulkner, C. Gould, E. Gemmen, and T. Dall, “The burden of skin diseases: 2004: A joint project of the american academy of dermatology association and the society for investigative dermatology,” Journal of the American Academy of Dermatology, vol. 55, no. 3, pp. 490–500, 2006.
- Hay et al.  R. J. Hay, N. E. Johns, H. C. Williams, I. W. Bolliger, R. P. Dellavalle, D. J. Margolis, R. Marks, L. Naldi, M. A. Weinstock, S. K. Wulf et al., “The global burden of skin disease in 2010: an analysis of the prevalence and impact of skin conditions,” Journal of Investigative Dermatology, vol. 134, no. 6, pp. 1527–1534, 2014.
- American Cancer Society  American Cancer Society, “Cancer facts & figures 2017,” Available at https://www.cancer.org/research/cancer-facts-statistics/all-cancer-facts-figures/cancer-facts-figures-2017.html, 2017, accessed in 29/04/2018.
- Nachbar et al.  F. Nachbar, W. Stolz, T. Merkle, A. B. Cognetta, T. Vogt, M. Landthaler, P. Bilek, O. Braun-Falco, and G. Plewig, “The abcd rule of dermatoscopy: high prospective value in the diagnosis of doubtful melanocytic skin lesions,” Journal of the American Academy of Dermatology, vol. 30, no. 4, pp. 551–559, 1994.
- American Cancer Society  American Cancer Society, “About basal and squamous cell skin cancer,” Available at cancer.org/content/dam/CRC/PDF/Public/8818.00.pdf, 2016, accessed in 29/04/2018.
- Stewart et al.  B. Stewart, C. P. Wild et al., “World cancer report 2014,” Health, 2014.
- Instituto Nacional de Câncer José Alencar Gomes da Silva  Instituto Nacional de Câncer José Alencar Gomes da Silva, “Estimativa 2018 – incidência de câncer no brasil,” Available at http://www1.inca.gov.br/inca/Arquivos/estimativa-2018.pdf, 2018, accessed in 29/04/2018.
- Prajapati and Barankin  V. Prajapati and B. Barankin, “Answer: Can you identify this condition?” Canadian Family Physician, vol. 54, no. 5, pp. 699–699, 2008. [Online]. Available: http://www.cfp.ca/content/54/5/699
- Aerts et al.  H. J. Aerts, E. R. Velazquez, R. T. Leijenaar, C. Parmar, P. Grossmann, S. Carvalho, J. Bussink, R. Monshouwer, B. Haibe-Kains, D. Rietveld et al., “Decoding tumour phenotype by noninvasive imaging using a quantitative radiomics approach,” Nature communications, vol. 5, p. 4006, 2014.
- Esteva et al.  A. Esteva, B. Kuprel, R. A. Novoa, J. Ko, S. M. Swetter, H. M. Blau, and S. Thrun, “Dermatologist-level classification of skin cancer with deep neural networks,” Nature, 2017.
- Lee et al.  H. Lee, S. Tajmir, J. Lee, M. Zissen, B. A. Yeshiwas, T. K. Alkasab, G. Choy, and S. Do, “Fully automated deep learning system for bone age assessment,” Journal of digital imaging, vol. 30, no. 4, pp. 427–441, 2017.
- Vandenberghe et al.  M. E. Vandenberghe, M. L. Scott, P. W. Scorer, M. Söderberg, D. Balcerzak, and C. Barker, “Relevance of deep learning to facilitate the diagnosis of her2 status in breast cancer,” Scientific reports, vol. 7, p. 45938, 2017.
- Kermany et al.  D. S. Kermany, M. Goldbaum, W. Cai, C. C. Valentim, H. Liang, S. L. Baxter, A. McKeown, G. Yang, X. Wu, F. Yan, J. Dong, M. K. Prasadha, J. Pei, M. Ting, J. Zhu, C. Li, S. Hewett, J. Dong, I. Ziyar, A. Shi, R. Zhang, L. Zheng, R. Hou, W. Shi, X. Fu, Y. Duan, V. A. Huu, C. Wen, E. D. Zhang, C. L. Zhang, O. Li, X. Wang, M. A. Singer, X. Sun, J. Xu, A. Tafreshi, M. A. Lewis, H. Xia, and K. Zhang, “Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning,” Cell, 2018.
- Ballerini et al.  L. Ballerini, R. B. Fisher, B. Aldridge, and J. Rees, “A color and texture based hierarchical k-nn approach to the classification of non-melanoma skin lesions,” in Color Medical Image Analysis. Springer, 2013, pp. 63–86.
- Gilmore et al.  S. Gilmore, R. Hofmann-Wellenhof, and H. P. Soyer, “A support vector machine for decision support in melanoma recognition,” Experimental dermatology, vol. 19, no. 9, pp. 830–835, 2010.
- Matsunaga et al.  K. Matsunaga, A. Hamada, A. Minagawa, and H. Koga, “Image Classification of Melanoma, Nevus and Seborrheic Keratosis by Deep Neural Network Ensemble,” 2017.
- Nasr-Esfahani et al.  E. Nasr-Esfahani, S. Samavi, N. Karimi, S. Soroushmehr, M. Jafari, K. Ward, and K. Najarian, “Melanoma detection by analysis of clinical images using convolutional neural network,” in 2016 38th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), 2016.
- Menegola et al.  A. Menegola, M. Fornaciali, R. Pires, F. V. Bittencourt, S. Avila, and E. Valle, “Knowledge transfer for melanoma screening with deep learning,” in Proceedings - International Symposium on Biomedical Imaging, 2017.
- Kwasigroch et al.  A. Kwasigroch, A. Mikołajczyk, and M. Grochowski, “Deep neural networks approach to skin lesions classification – a comparative analysis,” 2017.
- Seog Han et al.  S. Seog Han, M. Shin Kim, W. Lim, G. Hun Park, I. Park, and S. Eun Chang, “Classification of the clinical images for benign and malignant cutaneous tumors using a deep learning algorithm,” The Journal of Investigative Dermatology, 2018.
- Pan and Yang  S. J. Pan and Q. Yang, “A survey on transfer learning,” IEEE Transactions on knowledge and data engineering, vol. 22, no. 10, pp. 1345–1359, 2010.
- Yosinski et al.  J. Yosinski, J. Clune, Y. Bengio, and H. Lipson, “How transferable are features in deep neural networks?” CoRR, vol. abs/1411.1792, 2014. [Online]. Available: http://arxiv.org/abs/1411.1792
- Simard et al.  P. Y. Simard, D. Steinkraus, J. C. Platt et al., “Best practices for convolutional neural networks applied to visual document analysis.” in ICDAR, vol. 3, 2003, pp. 958–962.
- Van Dyk and Meng  D. A. Van Dyk and X.-L. Meng, “The art of data augmentation,” Journal of Computational and Graphical Statistics, vol. 10, no. 1, pp. 1–50, 2001.
- Krizhevsky et al.  A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Advances in neural information processing systems, 2012, pp. 1097–1105.
- Giotis et al.  I. Giotis, N. Molders, S. Land, M. Biehl, M. F. Jonkman, and N. Petkov, “Med-node: a computer-assisted melanoma diagnosis system using non-dermoscopic images,” Expert systems with applications, vol. 42, no. 19, pp. 6578–6585, 2015.
- Kornblith et al.  S. Kornblith, J. Shlens, and Q. V. Le, “Do better imagenet models transfer better?” arXiv preprint arXiv:1805.08974, 2018.
- Perez and Wang  L. Perez and J. Wang, “The effectiveness of data augmentation in image classification using deep learning,” CoRR, vol. abs/1712.04621, 2017. [Online]. Available: http://arxiv.org/abs/1712.04621
- Cubuk et al.  E. D. Cubuk, B. Zoph, D. Mane, V. Vasudevan, and Q. V. Le, “Autoaugment: Learning augmentation policies from data,” arXiv preprint arXiv:1805.09501, 2018.
- Bloice et al.  M. D. Bloice, C. Stocker, and A. Holzinger, “Augmentor: An image augmentation library for machine learning,” CoRR, vol. abs/1708.04680, 2017. [Online]. Available: http://arxiv.org/abs/1708.04680
- Chu  H. Chu, “Mdb: A memory-mapped database and backend for openldap,” in Proceedings of the 3rd International Conference on LDAP, Heidelberg, Germany, 2011, p. 35.
- Swets  J. A. Swets, “Indices of discrimination or diagnostic accuracy: their rocs and implied models.” Psychological bulletin, vol. 99, no. 1, p. 100, 1986.
- Kumar and Indrayan  R. Kumar and A. Indrayan, “Receiver operating characteristic (roc) curve for medical researchers,” Indian pediatrics, vol. 48, no. 4, pp. 277–287, 2011.
- Hajian-Tilaki  K. Hajian-Tilaki, “Receiver operating characteristic (roc) curve analysis for medical diagnostic test evaluation,” Caspian journal of internal medicine, vol. 4, no. 2, p. 627, 2013.
- Unal  I. Unal, “Defining an optimal cut-point value in roc analysis: An alternative approach,” Computational and mathematical methods in medicine, vol. 2017, 2017.
- Smith  L. N. Smith, “A disciplined approach to neural network hyper-parameters: Part 1 - learning rate, batch size, momentum, and weight decay,” CoRR, vol. abs/1803.09820, 2018. [Online]. Available: http://arxiv.org/abs/1803.09820
- Jia et al.  Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell, “Caffe: Convolutional architecture for fast feature embedding,” arXiv preprint arXiv:1408.5093, 2014.
- Fischhoff and Beyth  B. Fischhoff and R. Beyth, “I knew it would happen: Remembered probabilities of once—future things,” Organizational Behavior and Human Performance, vol. 13, no. 1, pp. 1–16, 1975.
- Lombrozo  T. Lombrozo, “The structure and function of explanations,” Trends in cognitive sciences, vol. 10, no. 10, pp. 464–470, 2006.
Gunning and DARPA 
D. Gunning and DARPA, “Explainable artificial intelligence (xai),” Available atcc.gatech.edu/~alanwags/DLAI2016/(Gunning)%20IJCAI-16%20DLAI%20WS.pdf, 2016, accessed in 27/06/2018.
- Selvaraju et al.  R. R. Selvaraju, A. Das, R. Vedantam, M. Cogswell, D. Parikh, and D. Batra, “Grad-cam: Why did you say that? visual explanations from deep networks via gradient-based localization,” CoRR, vol. abs/1610.02391, 2016. [Online]. Available: http://arxiv.org/abs/1610.02391
- Ribeiro et al.  M. T. Ribeiro, S. Singh, and C. Guestrin, ““Why should I trust you?”: Explaining the predictions of any classifier,” CoRR, vol. abs/1602.04938, 2016. [Online]. Available: http://arxiv.org/abs/1602.04938