Overview

This is the source code for a skin cancer detection web app which has been implemented with flask framework and deployed on Heroku. The model has been built using fastai deep learning library which is a high level api for pytorch. The classifier has been trained using Kaggle MNIST HAM10000 dataset which contains 10015 images of seven categories of pigmented skin lesions. As a preprocessing step, I have applied random undersampling to data to alleviate the class-imbalance problem. The classifier has been built with transfer learning technique using a pretrained Densenet169 model. The final classifer achieved an accuracy of 91.2% and a F1-score of 91.7% on validation data. You can check out the jupyter notebook that goes along to follow all the steps which have been taken to build the model. The web app is available at https://skin-cancer-detector.herokuapp.com.

Screenshots

Skin Cancer Detector Skin Cancer Detector

Dependencies

  • Python 3.6
  • Fastai 1.0.52
  • Flask
  • Gunicorn

Instructions

First run sudo pip install -r requirements.txt to install the required dependencies. Then launch the app by running python app.py. Open up your browser and navigate to http://localhost:8008