Excellent mini-project presented by Sebastien Thrun
- Create folders to hold the training, validation, and test images.
mkdir train; mkdir valid; mkdir test
-
Download and unzip the training data (5.3 GB).
-
Download and unzip the validation data (824.5 MB).
-
Download and unzip the test data (5.1 GB).
-
Place the training, validation, and test images in the
data/
folder, atdata/train/
,data/valid/
, anddata/test/
, respectively. Each folder should contain three sub-folders (melanoma/
,nevus/
,seborrheic_keratosis/
), each containing representative images from one of the three image classes.
You are free to use any coding environment of your choice to solve this mini project! In order to rank your results, you need only use a pipeline that culminates in a CSV file containing your test predictions.
If you would like to read more about some of the algorithms that were successful in this competition, please read this article that discusses some of the best approaches. A few of the corresponding research papers appear below.
- Matsunaga K, Hamada A, Minagawa A, Koga H. “Image Classification of Melanoma, Nevus and Seborrheic Keratosis by Deep Neural Network Ensemble”. International Skin Imaging Collaboration (ISIC) 2017 Challenge at the International Symposium on Biomedical Imaging (ISBI).
- Daz IG. “Incorporating the Knowledge of Dermatologists to Convolutional Neural Networks for the Diagnosis of Skin Lesions”. International Skin Imaging Collaboration (ISIC) 2017 Challenge at the International Symposium on Biomedical Imaging (ISBI). (github)
- Menegola A, Tavares J, Fornaciali M, Li LT, Avila S, Valle E. “RECOD Titans at ISIC Challenge 2017”. International Skin Imaging Collaboration (ISIC) 2017 Challenge at the International Symposium on Biomedical Imaging (ISBI). (github)
While the original challenge provided additional data (such as the gender and age of the patients), we only provide the image data to you. If you would like to download this additional patient data, you may do so at the competition website.
All three of the above teams increased the number of images in the training set with additional data sources. If you'd like to expand your training set, you are encouraged to begin with the ISIC Archive.
Throughout this repository, we will try to evaluate the various pretrained model available on these datasets. We will evaluate the results against the various ROC categories specified below
In the first category, we will gauge the ability of your CNN to distinguish between malignant melanoma and the benign skin lesions (nevus, seborrheic keratosis) by calculating the area under the receiver operating characteristic curve (ROC AUC) corresponding to this binary classification task.
If you are unfamiliar with ROC (Receiver Operating Characteristic) curves and would like to learn more, you can check out the documentation in scikit-learn or read this Wikipedia article.
The top scores (from the ISIC competition) in this category can be found in the image below.
![Category 1 Rankings][image2]
All of the skin lesions that we will examine are caused by abnormal growth of either melanocytes or keratinocytes, which are two different types of epidermal skin cells. Melanomas and nevi are derived from melanocytes, whereas seborrheic keratoses are derived from keratinocytes.
In the second category, we will test the ability of your CNN to distinuish between melanocytic and keratinocytic skin lesions by calculating the area under the receiver operating characteristic curve (ROC AUC) corresponding to this binary classification task.
The top scores in this category (from the ISIC competition) can be found in the image below.
![Category 2 Rankings][image3]
In the third category, we will take the average of the ROC AUC values from the first two categories.
The top scores in this category (from the ISIC competition) can be found in the image below.
![Category 3 Rankings][image4]
Add as many model as possible in different Jupyter notebook.
- Dermato_ai.ipynb will provide some outlines so we can follow the same logic for the various pretrained model
- Create an IPYNB for each model Dermato_ai_vgg16, Dermato_ai_resnet...
import os
import random
import requests
import time
import ast
import numpy as np
from glob import glob
import cv2
from PIL import Image, ImageFile
import time
from collections import OrderedDict
import torch import torchvision from torchvision import datasets import torchvision.transforms as transforms import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torchvision.models as models
import matplotlib.pyplot as plt
%matplotlib inline
Import Helper
Copyright (c) 2017 Udacity, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.