Git Product home page Git Product logo

ogemarques / matlab-experiment-manager-skin-lesion-classification Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 594.8 MB

Example of how to use MATLAB Experiment Manager to test different classifiers for skin lesion classification using transfer learning.

License: MIT License

image-classification skin-lesion-classification experiment-manager experiment-tracking transfer-learning resnet-18 googlenet squeezenet matlab

matlab-experiment-manager-skin-lesion-classification's Introduction

View Managing medical image classification experiments on File Exchange

Managing medical image classification experiments with MATLAB Experiment Manager App

This repository shows an example of how to use MATLAB Experiment Manager for a medical image classification task.

Experiment objective

To test the best combination of pretrained deep learning model and optimizer for a binary (malignant or benign) skin lesion classification task using transfer learning.

Common components

Dataset

Annotated images1 from the ISIC 2016 challenge, Task 3 (Lesion classification) dataset, consisting of 900 dermoscopic lesion images in JPEG format for training and validation, distributed in two classes (727 images were labeled as ‘benign’, 173 as ‘malignant’) plus 379 test images of the exact same format as the training data, and associated ground truth for all images.

Common hyperparameters

  • Dataset partition (e.g., 70% for training, 30% for validation)
  • Loss function
  • Mini-batch size
  • Initial learning rate
  • Learning rate schedule
  • Number of epochs
  • Validation patience
  • Validation frequency
  • Performance metrics

Preprocessing scripts

  • Image resizing (to the size expected by the input layer of each model)
  • Image augmentation (e.g., translation, scaling and rotation)

Variable sets

A total of nine (3 x 3) combinations of:

  • Model: ResNet-18, GoogLeNet or SqueezeNet
  • Optimizer: ‘adam’, ‘sgdm’, or ‘rmsprop’

Requirements

Suggested steps

  1. Download or clone the repository.
  2. Open MATLAB.
  3. Edit the contents of the dataFolder variable in the experiment1_setup.mlx file to reflect the absolute path to your selected dataset2.
  4. Open the Experiment Manager app (you can type experimentmanager in the MATLAB Command Window or select the app from the "APPS" ribbon).
  5. Select the "New Project" option and click on the "Create" button.
  6. On the next screen, select the "Image Classification Using Transfer Learning" option and click on the "ADD" button.
  7. Specify a folder for your project.
  8. Edit the textbox containing the name of the Setup Function to reflect the name experiment1_setup.
  9. Configure (i.e., edit manually) the hyperparameters table to reflect your choice of Solver (["adam" "sgdm" "rmsprop]) and Network (["squeezenet" "googlenet" "resnet18"]) (see figure below).

  1. Copy the resulting experiment1_setup.mlx file to the project folder created by the Experiment Manager app.
  2. (Optionally) click the "Use Parallel" button to run experiments in parallel.
  3. Click the "Run" button and watch the progress bars change as the different trials are run.
  4. Once the experiment concludes, explore/sort/filter/annotate the results.
  5. Save and close the project.

Additional remarks

  • You are encouraged to expand and adapt the example to your needs.
  • The choice of pretrained networks and their hyperparameters (learning rate, mini-batch size, number of epochs, etc.) is merely illustrative.
  • Most of the resulting Network/Solver combinations do not show a stellar performance and all of them show signs of overfitting (see figure below).

  • You are encouraged to (use Experiment Manager to) tweak those choices and find a better solution.

Notes

[1] This example uses a small subset of images to make it easier to get started without having to worry about large downloads and long training times.

[2] You can choose to use either the data folder or the balanced_data folder: both contain subfolders labeled benign and malignant.

matlab-experiment-manager-skin-lesion-classification's People

Contributors

ogemarques avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.