DenseSharp Networks are parameter-efficient 3D DenseNet-based deep neural networks, with multi-task learning the nodule classification labels and segmentation masks. Segmentation (top-down path) learning elegantly guides classification (bottom-top path) to learn better. In this study, our networks learn to classify early-stage lung cancer from CT scans on pathological level. The deep learning models outperforms the radiologists (2 senior and 2 junior) in our observer study, which indicates the potentials to facilitate precision medicine.
More details, please refer to our paper:
3D Deep Learning from CT Scans Predicts Tumor Invasiveness of Subcentimeter Pulmonary Adenocarcinomas
Wei Zhao†, Jiancheng Yang†, Yingli Sun, Cheng Li, Weilan Wu, Liang Jin, Zhiming Yang, Bingbing Ni, Pan Gao, Peijun Wang, Yanqing Hua and Ming Li (†indicates equal contribution)
Cancer Research (DOI: 10.1158/0008-5472.CAN-18-0696)
mylib/
:
dataloader/
: PyTorch-like datasets and dataloaders for Keras.models/
: 3D DenseSharp and DenseNet models together with the losses and metrics.utils/
: plot and multi-processing utils.explore.ipynb
: plots and basic views of networks.train.py
: the training script.plotly
installed. Higher versions should also work (perhaps with minor modifications).
Unfortunately, our dataset is not available publicly considering the patients' privacy, and restrictions apply to the use.
However, you can still run the code using the sample dataset
(download).
Please note, the sample dataset is just demonstrating the code functionality.
Unzip the sample dataset, then modify the "DATASET"
in
mylib/dataloader/ENVIRON
.
The DenseSharp Networks are generally designed for 3D data, with classification and segmentation labels. You can run the code on your own data if your dataset are processed following the sample data format.
Each sample (e.g., demo1.npz
) is a nodule-centered patch with a size of 80mm x 80mm x 80mm,
which is larger than the actual input size to ease the data augmentation implementation.
Each npz
file contains a voxel
(a 3D patch of pre-processed CT scan, as described in the paper)
and a seg
(the corresponding manual segmentation masked by the radiologists). The csv
file contains
the classification information.
The 3D mesh plots are used for illustration interactively. See the following example:
The helper functions are provided in mylib/utils/plot3d.py
.
See explore.ipynb
for the demo code.
Control the mesh step by setting step_size
.
The code is under Apache-2.0 License.
The sample dataset is just for demonstration, neither commercial nor academic use is allowed.