Skip to content

Using PyTorch's C++ frontend to visually diagnose melanoma nevus and seborrheic keratosis, using the 2017 ISIC Challenge on Skin Lesion Analysis Towards Melanoma Detection

License

mrdvince/dermatologist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skin Cancer Detection

This is an hobby project to design an algorithm that can visually diagnose 3 classes of skin cancer using PyTorch's C++ frontend.

Disclaimer: Melanoma is one of the most deadliest forms of skin cancer, so definetly don't use anything on this repo to diagnose yourself.

These classes include:

  • Melanoma
  • Nevus
  • Seborrheic keratosis

The algorithm will distinguish this malignant skin tumor from two types of benign lesions (nevi and seborrheic keratoses).

Requirements

  1. C++
  2. CMake (minimum version 3.14)
  3. LibTorch v1.8.0
  4. Conda

Getting started

  1. Clone this repo and cd into the cloned directory
  https://github.com/mrdvince/dermatologist.git
  cd dermatologist
  1. Create a build and cd into it. Then build the project using cmake.

The build process will download the training, testing and validation datasets (it's a large dataset)

mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH=~/libtorch ..
  1. Build
cmake --build . --config Release

Note: if the a data folder is not created and the dataset downloaded modify the CMakelists.txt file and set the download option to ON

  1. Run the python convert file included in the cloned folder. This file will download the resnet18 pretrained model and "trace" it and save on disc without the final fully connected layer.
python ../convert.py
  1. Finally train the model
./dermatologist resnet18_without_last_layer.pt

That's pretty much it.

Acknowledgements

About

Using PyTorch's C++ frontend to visually diagnose melanoma nevus and seborrheic keratosis, using the 2017 ISIC Challenge on Skin Lesion Analysis Towards Melanoma Detection

Topics

Resources

License

Stars

Watchers

Forks