a b/README.md
1
# Luna2016-Lung-Nodule-Detection
2
Course Project for Bio Medical Imaging: Detecting Lung Nodules from CT Scans
3
4
This project was inspired by the LUNA 2016 Grand Challenge that uses low-dose CT scans for pulmonary nodule detection in lung scans.
5
6
We use a U-net Convolutional Neural Network for lung nodule detection.
7
8
# Running The Code
9
==================================
10
## Dependencies
11
### Preprocess
12
* SimpleITK
13
* numpy
14
* csv
15
* glob
16
* pandas
17
* scikit-learn
18
* scikit-image
19
20
### UNET
21
* theano
22
* keras
23
---
24
## Preprocessing
25
Before inputting the CT images into the U-net architecture, it is important to reduce the domain size for more accurate results. We perform a variety of preprocessing steps to segment out the ROI (the lungs) from the surrounding regions of bones and fatty tissues. These include
26
27
* Binary Thresholding
28
* Selecting the two largest connected regions
29
* Erosion to separate nodules attached to blood vessels
30
* Dilation to keep nodules attached to the lung walls
31
* Filling holes by dilation
32
33
## Network
34
----
35
LUNA_unet.py contains the code for the actual model. The following arguments can be passed to the network.
36
37
    -batch_size     (default 2,batch size)
38
    -lr             (default 0.001, learning rate)
39
    -load_weights   (default False, load pre-existing model)
40
    -filter_width   (default 3, The default filter width)
41
    -stride         (default 3, The stride of the filters)
42
    -model_file     (default '', The path to the model file )
43
    -save_prefix    (default model prefix, The prefix of the saving of models)
44
 The model expects as inputs the segmented lung images (512x512) as inputs (generated in preprocessing steps) and generates the mask of the nodule (512x512). The loss used is the dice coefficient loss between the predicted mask and the gold mask. 
45
 Model weights are saved using the following convention:
46
 model\_\_script_on_epoch\_ + _epoch number_  + \_lr\_ + _lr_ + \_WITH_STRIDES\_ + _filter stride_ + \_FILTER\_WIDTH\_ + _filter width_ + .weights
47
48
 # Results 
49
 ----
50
 The following are some results we obtain
51
52
![alt text](https://github.com/codedecde/Luna2016-Lung-Nodule-Detection/blob/master/Results/Results%201.JPG)
53
![alt text](https://github.com/codedecde/Luna2016-Lung-Nodule-Detection/blob/master/Results/Results%202.JPG)