Skip to content

gschandrasekhar/LungCancerDetection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

LungCancerDetection

Lung Cancer Detection Using Deep Learning

This project focuses on building a deep learning-based system to detect lung cancer from CT scan images. The goal is to leverage Convolutional Neural Networks (CNN) and transfer learning models such as ResNet50, VGG16, and MobileNetV2 to assist in early cancer detection and classification.


Features

  • Handles large-scale CT scan image datasets
  • Supports multiple CNN architectures (ResNet50, VGG16, MobileNetV2)
  • Detects and classifies cancerous vs non-cancerous lung tissues
  • Visualizes model performance (accuracy, confusion matrix, loss curves)
  • Includes trained models for quick inference
  • Modular code β€” easy to extend or retrain with custom datasets

Project Structure

LungCancerDetection/
β”‚
β”œβ”€β”€ data/                     # Dataset (not included in repo)
β”‚   β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ test/
β”‚
β”œβ”€β”€ models/                   # Saved trained models (.pkl / .h5)
β”‚   β”œβ”€β”€ model_resnet50.pkl
β”‚   β”œβ”€β”€ model_vgg16.pkl
β”‚
β”œβ”€β”€ notebooks/                # Jupyter notebooks for training & analysis
β”‚   β”œβ”€β”€ lung_cancer_training.ipynb
β”‚
β”œβ”€β”€ src/                      # Python source code
β”‚   β”œβ”€β”€ data_preprocessing.py
β”‚   β”œβ”€β”€ train_model.py
β”‚   β”œβ”€β”€ predict.py
β”‚
β”œβ”€β”€ requirements.txt          # Python dependencies
└── README.md                 # Project documentation

Models Used

Model Description Framework
CNN (Custom) Basic convolutional architecture built from scratch TensorFlow/Keras
ResNet50 Deep residual network (50 layers) for high accuracy TensorFlow/Keras
VGG16 Simpler deep CNN architecture TensorFlow/Keras
MobileNetV2 Lightweight CNN for mobile deployment TensorFlow/Keras

Tech Stack

  • Language: Python
  • Libraries: TensorFlow, Keras, NumPy, OpenCV, Matplotlib, Scikit-learn
  • IDE: Jupyter Notebook / VS Code
  • Frameworks: Deep Learning (CNN, Transfer Learning)

Installation and Setup

  1. Clone the repository

    git clone https://github.com/gschandrasekhar/LungCancerDetection.git
    cd LungCancerDetection
  2. Create a virtual environment (optional)

    python -m venv venv
    venv\Scripts\activate    # On Windows
  3. Install dependencies

    pip install -r requirements.txt
  4. Run the notebook or script

    jupyter notebook notebooks/lung_cancer_training.ipynb

    or

    python src/train_model.py

Results

Model Accuracy Notes
CNN (Custom) 85% Baseline model
VGG16 91% Moderate accuracy, higher training time
ResNet50 94% Best performing model
MobileNetV2 92% Lightweight, good trade-off

(Results may vary depending on dataset and training parameters.)


Future Work

  • Deploy model as a web app using Streamlit or Flask
  • Integrate Grad-CAM visualization for explainability
  • Add real-time prediction from uploaded CT images
  • Optimize for mobile and edge devices

References

  • Kaggle: Lung Cancer CT Scan Dataset
  • Research Paper: β€œDeep Learning for Lung Cancer Detection Using CT Scans”
  • TensorFlow / Keras Documentation

πŸ§‘β€πŸ’» Author

Chandra Sekhar G πŸ“§ Email Me 🌐 LinkedIn πŸ’» GitHub


πŸͺͺ License

This project is licensed under the MIT License β€” feel free to use and modify for research or learning purposes.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published