A two-stage 3D convolutional network for object detection in medical image processing...
Basically, this project is an (non official) reimplementation of the paper "Automated Pulmonary Nodule Detection via 3D ConvNets with Online Sample Filtering and Hybrid-Loss Residual Learning" .
However this project varies from what the paper states in the flowing aspects:
- Instead of using two batch in the second stage, with one batch for classifiacation, another for regresssion, this model don't perform regression for proposals (thus only one batch left in the second stage model).
- This model adopts a different input size, (15, 30, 30) on the first stage, (25, 60, 60) on the second stage, which is intened to aneurysm detection.
- The data augmentation strategy.
recall(%) | FPs (False Positives per Scan |
---|---|
88.64 | 28.52 |
This project is developed on keras and tensorflow and tested on python3.6.
The convnet3d/utils/kfold_dataset.py
is a demo that show how to generate dataset and train model based on the existing functionalities of this project. Overall, these steps are:
-
Prepare the original dataset in csv file. The expected format of each line is:
path/to/series,class,x,y,z,d,group
where
x,y,z
are zero-based andgroup
is id/tag of series, one series one id, which could be a number started from 0.In addition configure the default mapping via
DATASET_CLASSES
andDATASET_LABELS
. It may contain multiple classes and in whichever situation the background class musted be included. (bg, 0
) -
Input the original csv dataset to
makeKFold
to get k fold dataset for k-fold-cross-validation. (kfoldCV
) -
Input the kfoldCV dataset to
makePatchesForDetection
to generate patches dataset for candidates screening model, along with amapping.csv
file. Now the format of each line for patches dataset comes:/path/to/patch,class,x,y,z,d,path/to/series
with
path/to/series
indicates where this patches comes from. (cs-dataset
) -
Train the candidates scrrening model with one fold of patches
cs-dataset
. (cs-model
) -
Input the trained
cs-model
as well as the related patchescs-dataset
tomakePatchesForReduction
to generate patches dataset for false positive reduction model. (fpr-dataset
) -
Train the false positive reduction model with
cs-model
(for transfer learning) and patchesfpr-dataset
. (fpr-model
) -
Repeat 4-6 to complete the remaining part of
kfoldCV
.
Add python2.7 support.
If you want to develop a framework exactly as the paper states, you may find all the neccessary components already shiping in. Thus you should merely rewrite a training script and a evaluation script. One suggestion is you should be careful the Out-of-Memory (OOM) error when combining the evaluation callback with training process.