How can AI detect skin cancer with your smartphone

The following article introduces this work done by Andre Esteva and his team, Dermatologist-level classification of skin cancer with deep neural networks.

It has been estimated that 1 out of 5 Americans will develop skin cancer in their life time. If the diagnosis was discovered before the melanoma affecting lymph nodes, the 5 year survival rate can be about 98% and if it is diagnosed at later stages, the 5 year survival rate would be much lower at 18%. So to provide a timely diagnosis and early treatment for the disease is a no-brainer.

Currently great effort and engaging commercials on advocating early diagnosis of melanoma had been done by the American Academy of Dermatology, including this Spot Skin Cancer campaign. Which a “body mole map” have been developed for self-checking.


Wouldn’t it be nice if a smartphone app can give you board-certified dermatologist level diagnosis with just a picture?

Previous technological bottlenecks

Computer aided skin cancer diagnosis systems has been developed but didn’t really work in real life situations for the following reasons.

Training data

  1. Most of the images for training were taken with a dermoscope, which is a special medical device that we normally don’t get our hands on.
  2. The other form of images came from histology examination, which actually means cutting off a piece of your tissue and exam it under microscope.

For a phone application, we want an app to be able to recognize skin cancer without any special instrument and without the need to cut a piece off from ourselves. And the dataset for ordinary pictures of dermatologist classified skin moles just did not existed.


Dermoscopy and histological exams pictures are very standardised, which is perfect for computer aided classification systems. However, if we want to collect data from a smartphone camera, there will be a great amount of variations including the lighting, the zoom and the angle of the shot taken.

Previous classification systems wasn’t ready to cope with those variations.


How Andrea Esteva and his team tackled the problem


They used a dermatologist labelled dataset comprising 129,450 clinical images (images that is similar of what you can take with your phone).


They used a type of neural network architecture called Convolutional network, which performs especially good in computer vision. Adam Geitgey explained the concept of CNN perfectly in the following post.

And they didn’t use any ordinary convolutional network, they used the GoogleNet Inception v3 CNN architecture that have been pre-trained with approximately 1.28 million images.

Results: comparable to board certified dermatologist

Tasks compared

The system and 21 board certified dermatologist were given biopsy proven-clinical images of moles, and were tested on the following tasks.

  1. Classifying whether the lesion is benign or malignant.
  2. Whether is it melanocytic (the deadliest form of skin cancer)

Metrics for comparison

Sensitivity and Specitifity

Click for source.


The convolutional network outperformed all 21 dermatologists and the average of them, on the task on classifying 135 images of carcinoma, 130 images of melanoma and 111 dermoscopic images of melanoma.

What now?

The above work done by Andre Esteva and his team proved that with proper training dataset and neural network, ML have the potential to outperform dermatologist at diagnosing diseases from clinical images.

What if the neural network can be trained with more data from different diseases? Will it be able to perform at dermatologist level in diagnosing all skin diseases? How will this impact the clinical practice of dermatologist? What about other clinical specialty such as radiology, pathology?

In my point of view, if an app can outperform dermatologist at diagnosing all skin diseases, it is unethical for the dermatologist to not adopt the technology and improve diagnosis accuracy. This may switch the role of the dermatologist from a diagnoser to a caregiver and boost patient-centered medicine.

Show your support

Clapping shows how much you appreciated Keith Kwan’s story.