Skip to content

gperezs/LungCancerDiagnosis-pytorch

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 23 commits ahead of BCV-Uniandes:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 

Automated Diagnosis of Lung Cancer with 3D Convolutional Neural Networks

Pytorch implementation for Automated lung cancer diagnosis using three-dimensional convolutional neural networks. Our cancer predictor obtained a ROC AUC of 0.913 and was ranked 1st place at the ISBI 2018 Lung Nodule Malignancy Prediction challenge.

Table of contents

Getting started

In this section we show how to setup the repository, install virtual environments (Virtualenv or Anaconda), and install requirements.

Click to expand
  1. Clone the repository: To download this repository run:
$ git clone https://github.com/gperezs/LungCancerDiagnosis-pytorch.git
$ cd LungCancerDiagnosis-pytorch

Using Anaconda

  1. Install Anaconda: We recommend using the free Anaconda Python distribution, which provides an easy way for you to handle package dependencies. Please be sure to download the Python 3 version.

  2. Anaconda virtual environment: To set up and activate the virtual environment, run:

$ conda create -n <env name> python=3.*
$ conda activate <env name>

To install requirements, run:

$ conda install --yes --file requirements.txt
  1. PyTorch: To install pytorch follow the instructions here.

Trained models

Trained models are included with this repository at in models/. Detector model was trained with the LIDC-IDRI dataset and the predictor with the Kaggle DSB2017 dataset.

Lung cancer diagnosis

To run the code save the folder of each subject with the dicom files in the folder data/ISBI-deid-TRAIN/ (the program will diagnose all subjects in that folder). We already include a subject (LIDC-IDRI-003) in this repository. To see a demo with this subject:

bash run_diagnose

If a the program is ran in the CPU it might take several minutes to complete. When a CUDA device is available, run:

bash run_diagnose --GPU=<gpu id>

The program will print a single lung cancer probability per subject. Also, the program will save images of the axial, sagittal and coronal planes of the 30 detected nodules with highest score of each patient in folder output/sorted_slices_jpgs/ (As the example shown below).

ranked_nodules

Run with ISBI 2018 lung challenge subjects

To run the code save the folder of each patient with the dicom files (of the ISBI 2018 Lung challenge) in the folder data/ISBI-deid-TRAIN/. Then, run:

bash run_diagnose.sh --IS_ISBI=1

If the dataset from the ISBI 2018 Lung Nodule Malignancy Prediction challenge is used, the AUC will be printed using the challenge released labels (including the mask post-processing).

Citing this work

If you find this work useful in your research, please consider citing:

@article{PA_MBEC2020,
    author = "{G. Perez and P. Arbelaez}",
    title = "{Automated lung cancer diagnosis using three-dimensional convolutional neural networks}",
    journal = "{Medical & Biological Engineering & Computing}",
    year = {2020},
    Month = {jun},
    doi = {10.1007/s11517-020-02197-7},
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • Shell 1.3%