GithubHelp home page GithubHelp logo

melanoma-detection-assignment's Introduction

Melanoma Detection Assignment

To build a CNN based model which can accurately detect melanoma. Melanoma is a type of cancer that can be deadly if not detected early. It accounts for 75% of skin cancer deaths. A solution that can evaluate images and alert dermatologists about the presence of melanoma has the potential to reduce a lot of manual effort needed in diagnosis.

Table of Contents

Problem Statement

Business Understanding

The dataset consists of 2357 images of malignant and benign oncological diseases, which were formed from the International Skin Imaging Collaboration (ISIC). All images were sorted according to the classification taken with ISIC, and all subsets were divided into the same number of images, with the exception of melanomas and moles, whose images are slightly dominant.

The data set contains the following diseases:

  • Actinic keratosis
  • Basal cell carcinoma
  • Dermatofibroma
  • Melanoma
  • Nevus
  • Pigmented benign keratosis
  • Seborrheic keratosis
  • Squamous cell carcinoma
  • Vascular lesion

Business Goal

you are required to build a multiclass classification model using a custom convolutional neural network in TensorFlow.

Business Risk

  • Predicting an incorrect class of skin cancer.

Project Pipeline

  • Data Reading/Data Understanding → Defining the path for train and test images
  • Dataset Creation→ Create train & validation dataset from the train directory with a batch size of 32. Also, make sure you resize your images to 180*180.
  • Dataset visualisation → Create a code to visualize one instance of all the nine classes present in the dataset Model Building & training :
  • Create a CNN model, which can accurately detect 9 classes present in the dataset. While building the model, rescale images to normalize pixel values between (0,1). Choose an appropriate optimiser and loss function for model training Train the model for ~20 epochs Write your findings after the model fit. You must check if there is any evidence of model overfit or underfit.
  • Chose an appropriate data augmentation strategy to resolve underfitting/overfitting Model Building & training on the augmented data :
  • Create a CNN model, which can accurately detect 9 classes present in the dataset. While building the model rescale images to normalize pixel values between (0,1). Choose an appropriate optimiser and loss function for model training Train the model for ~20 epochs Write your findings after the model fit, see if the earlier issue is resolved or not?
  • Class distribution: Examine the current class distribution in the training dataset
  • Which class has the least number of samples?
  • Which classes dominate the data in terms of the proportionate number of samples?
  • Handling class imbalances: Rectify class imbalances present in the training dataset with Augmentor library. Model Building & training on the rectified class imbalance data :
  • Create a CNN model, which can accurately detect 9 classes present in the dataset. While building the model, rescale images to normalize pixel values between (0,1). Choose an appropriate optimiser and loss function for model training Train the model for ~30 epochs Write your findings after the model fit, and see if the issues are resolved or not.

Observations

  • As the training accuracy increases linearly over time, whereas the validation accuracy increases in the training process.
  • As the training loss decreases with epochs the validation loss also decreases.
  • The plots show that training accuracy is 92% and validation accuracy is around 83%.
  • The difference in accuracy between training and validation accuracy is much less
  • Class rebalancing not only reduced overfitting it also improved the accuracy from 48% to 81%.

Technologies Used

  • pandas - 1.3.4
  • numpy - 1.20.3
  • matplotlib - 3.4.3
  • seaborn - 0.11.2
  • plotly - 5.8.0
  • sklearn - 1.1.2
  • statsmodel - 0.13.2
  • tensorflow - 2.11.0

Acknowledgements

This project was an assignment provided by the Upgrad. Reference taken for this assignment are:-

Contact

Created by Kuldeep Lodha - feel free to contact me!

melanoma-detection-assignment's People

Contributors

kuldeeplodha avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.