Coder Social home page Coder Social logo

prostate_cancer_diagnosis's Introduction

Deep Learning model for prostate cancer diagnosis and cancer stage prediction from H&E histology images

Based on internal benchmarking we settled with DenseNet for the cancer stage prediction, and ResNet56 for the cancer/benign classification task.

For details and medical background check our report at BE_223B_final.docx.pdf.

For details, see report.pdf.

Cancer diagnosis (Cancer vs healthy classification)

Running

python benign_cancerous_resnet56_final.py

performs the following tasks

  • create matrices for the images and for the label of the train, val, test sets
  • covert to categorical, normalize pixel values, and decide whether to subtract mean
  • define a function that creates a DenseNet, and a function that prints the learning rate at the end of each epoch
  • perform grid search for hyperparameters
  • create a t-SNE plot with PCA preprocessing
  • perform manual err analysis
  • save plot of confusion matrices at the tile level and the patient level.

Cancer stage (Gleason Level) prediction

Running

python densenet_3class_cancer.py

implements the following pipeline

  • create dictionary based on the csv file with the labels
  • create matrices for train, test data
  • normalize pixel values in the data and split them into train, validation and test sets
  • define lr_schedule
  • define ResNet layer
  • define ResNetv2 architecture
  • subtract mean and convert to categorical
  • create function evaluate_network which has x_train, x_val as global variables, returns only the val_acc, and is solely used for the Bayesian Hyperparameter Optimization
  • create function create_train_return_model, which fulfills a similar goal as evaluate_network but also retunrs the model, to do manual hyperparameter tuning
  • implement the Bayesian Hyperparameter Optimization to roughly tune the hyperparameters.
  • do some further manual tuning of the Hyperparameters using the function create_train_return_model
  • plot training history for best model, and evaluate on test set
  • make t-SNE plots
  • print statements for manual err analysis
  • plot accuracy vs image size

Manual err analysis using grad_cam_heat

grad_cam_heat.ipynb shows what features the model uses to make its prediction in one of the false positive diagnoses.

prostate_cancer_diagnosis's People

Contributors

stathismegas avatar

Stargazers

Dorothea Böken avatar  avatar

Watchers

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