A CNN-based model to accurately detect melanoma, a type of skin cancer that accounts for 75% of skin cancer deaths. This solution evaluates images and alerts dermatologists about the presence of melanoma, potentially reducing manual diagnostic effort.
The dataset consists of 2,357 images of malignant and benign oncological diseases from the International Skin Imaging Collaboration (ISIC). The images are classified into multiple disease categories with melanomas and moles slightly dominant.
The dataset includes the following diseases:
- Actinic keratosis
- Basal cell carcinoma
- Dermatofibroma
- Melanoma
- Nevus
- Pigmented benign keratosis
- Seborrheic keratosis
- Squamous cell carcinoma
- Vascular lesion
To build a multiclass classification model using a custom convolutional neural network (CNN) in TensorFlow to classify skin diseases.
Here are a few samples from the dataset:
- Incorrect classification of skin cancer poses significant health risks.
- Data Reading/Data Understanding: Define the path for train and test images.
- Dataset Creation: Create train & validation datasets with a batch size of 32. Resize images to 180x180.
- Dataset Visualization: Visualize one instance of each of the nine classes present in the dataset.
- Model Building & Training:
- Build a CNN model to detect the 9 classes. Normalize pixel values (0,1).
- Choose an optimizer and loss function.
- Train for ~20 epochs, checking for overfitting or underfitting.
- Data Augmentation: Apply augmentation to resolve overfitting/underfitting.
- Class Distribution: Examine class distribution, identifying the least and most dominant classes.
- Handling Class Imbalances: Use the Augmentor library to address class imbalances.
- Final Model Training: Train the model for ~30 epochs on the augmented and balanced data.
Below is the accuracy and loss graph for the model:
pandas
- 1.3.4numpy
- 1.20.3matplotlib
- 3.4.3seaborn
- 0.11.2plotly
- 5.8.0sklearn
- 1.1.2statsmodel
- 0.13.2tensorflow
- 2.11.0
- This project was developed as part of a group case study.
- Resources:
Created by [@madhanmohan2301] - feel free to contact me!