Skip to content

ayush9304/Lung_Cancer_Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lung Cancer Detection

Lung cancer is the leading cause of cancer-related death worldwide. Screening high risk individuals for lung cancer with low-dose CT scans is now being implemented in the United States and other countries are expected to follow soon. In CT lung cancer screening, many millions of CT scans will have to be analyzed, which is an enormous burden for radiologists. Therefore there is a lot of interest to develop computer algorithms to optimize screening. A vital first step in the analysis of lung cancer screening CT scans is the detection of pulmonary nodules, which may or may not represent early stage lung cancer.

This project is about segmentation of nodules in CT scans using 2D U-Net Convolutional Neural Network architecture.

Dependencies

  • numpy
  • pandas
  • opencv
  • SimpleITK
  • scikit-learn
  • scikit-image
  • tensorflow
  • matplotlib

Dataset

The LUNA16 dataset has been used in this project.

Preprocessing

The CT-Scans images passed through various preprocessing steps before inputting it to U-Net model for more accurate result. These processes includes segmenting the ROI (the lungs) from the surrounding regions of bones and fatty tissues. These include

  • Binary Thresholding
  • Erosion & Dilation for removing noise
  • Filling Holes by contours
  • Extracting Lungs
  • Extracting nodule masks

preprocessing_steps

Training

I used a 2D UNet convolutional neural network architecture which is mainly used for image segmentation. U-net is an encoder-decoder deep learning model which is known to be used in medical images. It is first used in biomedical image segmentation. U-net contained three main blocks, downsampling, upsampling, and concatenation. The dice coefficient loss is selected as the loss function. Dice coefficient as is often used in medical image segmentation.

unet architecture

This model was able to achieve a dice score of 0.83 in training data and 0.75 on test data. The model was trained for 94 epochs.

unet accuracy

Result

Below shown predictions on randomly chosen test sample. In Each box left figure shows lung with actual tumor highlighted in white and right figure shows predicted tumor highlighted in white.

result

License

Licensed under the MIT License.