/melanoma-classification

A service for identifying melanoma in images of skin lesions using machine learning models.

Primary LanguageJupyter NotebookMIT LicenseMIT

Melanoma diagnosis service

Identify melanoma in lesion images

This repository holds the source code for my master thesis "Model as a Service: Development of a prototype for computer-aided skin cancer diagnosis".

To identify a melanoma, several neural networks were trained based on the Kaggle dataset from the "SIIM-ISIC Melanoma Classification" competition: https://www.kaggle.com/c/siim-isic-melanoma-classification/overview

The training process as well as the jupyter notebooks for all models can be found here: https://www.comet.ml/saschamet/master-thesis

A Kaggle notebook showing the training process of a single EfficientNet B5 model is available here: https://www.kaggle.com/saschamet/melanoma-efficientnetb5-noisy-student

This Kaggle notebook can be used to easily reproduce the results from this work.

Model as a Service

The ensemble can be deployed with a Docker image. The image can be retrieved here: https://hub.docker.com/r/smet/melanoma-service

The source code can be found in the /service directory.

To start the service, execute the following two commands:
docker pull smet/melanoma-service
docker run -d --name melanoma-service -p 80:80 smet/melanoma-service
The service is now available on port 80.

There are two routes. The first route returns simply a prediction. The second route returns a grad cam image.

  1. /predict

Method: POST;
Parameters:
  • image_url: URL of an image to predict
  • number_of_models: Either 1 or 2 - How many models should be used for the prediction.

  1. POST ​/cam

Method: POST
Parameters:
  • image_url: URL of an image to predict

Additional documentation on how to create your own service can be found in the /docs folder.

Important Note

This application is created for scientific purposes only!