Giter Site home page Giter Site logo

candy_skinlesion's Introduction

Computed Aided Diagnostics Final Project

CAnDy_SkinLesion: Skin Lesion Classification from ISIC dataset based on Deep Learning

MAIA Master 2023


Team Members

  • Borras Ferris Lluis

  • Leon Contreras Nohemi Sofia

This repository contains all the code for our final project on skin lesion classification on dermatoscopic images that we developed for our CAD course. We finetuned different architectures from pretrained Torchvision models. The dataset used can be found on

##Instructions for testing To use the trained networks available in the models directory, you should do:

  • Environmental set up
  • Download the checkpoints for the models

Setting up the environment

  • Create a conda environment
conda create -n cadskin python==3.9.13 anaconda -y && conda activate cadskin
  • Install the requirements
pip install -r requirements.txt

Download checkpoints of pretrained models

The checkpoints for the binary classification are found in models/BinaryClassification/binary_efficient_unfreeze_dropout. The checkpoints for the multiclass classification are found in models/MulticlassClassification/multiclass_efficient_nofreeze_multisteplr01_dropout.

To run the test.py you will need to have a data/MulticlassClassification/test or a data/BinaryClassification/test directory with the images you would like to test. Run the database/metadata.py to have the metadata.csv for the SkinDataset.

##Instructions for training To finetune the models or reproduce our results, you should do:

  • Environmental set up (same as described above)
  • Clone this repository
  • If training the binary challenge, create a data\BinaryClassification\train and data\BinaryClassification\val directory with the images you are going to use for training and validation. If training for the multiclass challenge create a data\MulticlassClassification\train and data\MulticlassClassification\val directory with the images you are going to use for training and validation.
  • Run the database/metadata.py to have the metadata.csv. Use the challenge option of your like
python -m database.metadata --challenge_option BinaryClassification
  • If using segmentation follow the instructions of Download trained U-Net section.
  • Modify the config.yml.example with your desired settings for training and save it as config.yml
  • Run classification_binary/train.py or classification_multi/train.py accordingly.
python -m classification_binary.train
python -m classification_multi.train

Download trained U-net

The trained UNet in the ISIC 2017 to perform the segmentation of the data by using the function segmentation on segmentation.py can be downloaded in the following link: https://drive.google.com/file/d/1Ae0M2pNVBgbKa7b13_kmY3uYmaTv5ayK/view?usp=share_link

Once downloaded the file named Unet_trained.tar must be located in the project sub-folder models.

Run the segmentation

To compute the segmentations from the trained UNet run the following lin eof code.

python -m segmentation.segmentation 

Then will prompt to specify for which challenge you want to perform the segmentation either: BinaryClassification or MulticlassClassification. Then in which set either train, val or test.

candy_skinlesion's People

Contributors

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