Skip to content

Deep Convolutional Neural Networks Enable Discrimination of Heterogeneous Digital Pathology Images

License

Notifications You must be signed in to change notification settings

eipm/cnn-smoothie

Repository files navigation

CNN_smoothie

Source code for manuscript:

"Deep Convolutional Neural Networks Enable Discrimination of Heterogeneous Digital Pathology Images"

Pegah Khosravi, Ehsan Kazemi, Marcin Imielinski, Olivier Elemento, Iman Hajirasouliha EBioMedicine (December 2017)

Published on EBioMedicine, 2017/12/28: https://doi.org/10.1016/j.ebiom.2017.12.026

DOI badge ⬅️ read the manuscript here

CNN Smoothie Logo

Actions Status Github EIPM Docker Hub GitHub Container Registry Python 3.6 License: MIT

The CNN_Smoothie pipeline presented here provides a novel framework that can be easily implemented for many different applications, including immunohistochemistry grading and detecting tumor subtypes and biomarkers. We revised the available Slim codes to fit the algorithms for running them on CPUs. For additional information and reference, please check the pre-print describing the method here:

The Readme file is divided into two parts:

  1. for running the CNN_basic algorithm look at the Readme at CNN_basic file.

  2. for running other architectures of CNN such as Inception and ResNet look at the Readme in the "scripts" directory.

CNN Smoothie Requirements

  • Docker. Get it from here.
  • process and result folders from ML training (Not included in this repository).

Running CNN Smoothie using Docker

Load Environment Variables

DOCKER_CONTAINER_NAME=cnn_smoothie
CNN_SMOOTHIE_PORT=3002
OUTPUT_DIR=/stork/data/cnn_smoothie/output/
UPLOAD_DIR=/stork/data/cnn_smoothie/uploads/
PROCESS_DIR=/stork/data/cnn_smoothie/process/
RESULT_DIR=/stork/data/cnn_smoothie/result/
CNN_SMOOTHIE_TAG=latest

Run Docker Container

docker run -d --name ${DOCKER_CONTAINER_NAME} \
--restart on-failure:5 \
-p ${CNN_SMOOTHIE_PORT}:80 \
-v ${OUTPUT_DIR}:/output \
-v ${UPLOAD_DIR}:/uploads \
-v ${PROCESS_DIR}:/cnn_smoothie/src/cnn_smoothie_src/process/:ro \
-v ${RESULT_DIR}:/cnn_smoothie/src/cnn_smoothie_src/result/:ro \
--env USERS_DICT="{ 'user1': 'password1', 'user2': 'password2' }" \
eipm/cnn-smoothie:${CNN_SMOOTHIE_TAG}

Where:

  • ${DOCKER_CONTAINER_NAME}: The CNN Smoothie docker container name.
  • ${CNN_SMOOTHIE_PORT}: The cnn_smoothie host port.
  • ${OUTPUT_DIR}: Where CNN Smoothie image classification logs will be written.
  • ${UPLOAD_DIR}: Where CNN Smoothie image will be saved.
  • ${PROCESS_DIR}: Required directory from ML training.
  • ${RESULT_DIR}: Required directory from ML training.
  • ${USERS_DICT}: The users credentials dictionary to authenticate.
  • ${CNN_SMOOTHIE_TAG}: The CNN Smoothie Version to deploy.