Skip to content

This repository contains a deep learning-based cancer type prediction system using a trained convolutional neural network (CNN). The model is deployed using Streamlit, allowing users to upload medical images and receive predictions with a probability distribution displayed in a pie chart.

License

Notifications You must be signed in to change notification settings

Uni-Creator/LungCancerClassification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cancer Type Prediction using Deep Learning

GitHub Repo stars GitHub forks

This repository contains a deep learning-based cancer type prediction system using a trained convolutional neural network (CNN). The model is deployed using Streamlit, allowing users to upload medical images and receive predictions with a probability distribution displayed in a pie chart.

Features

  • Upload an image of a tissue sample.
  • Get real-time cancer type predictions.
  • Visual representation of prediction probabilities using a pie chart.
  • Uses a trained CNN model (Model.h5).

Cancer Types Detected

The model predicts five types of tissue conditions:

  • Colon Adenocarcinoma
  • Colon Benign Tissue
  • Lung Adenocarcinoma
  • Lung Benign Tissue
  • Lung Squamous Cell Carcinoma

Requirements

Ensure you have Python installed along with the following dependencies:

pip install streamlit tensorflow numpy matplotlib

How to Run

  1. Clone the repository:
    git clone https://github.com/Uni-Creator/LungCancerClassification.git
    cd LungCancerClassification
  2. Place the trained model file (Model.h5) in the project directory.
  3. Run the application:
    streamlit run main.py
  4. Open the provided local URL in your web browser.

File Descriptions

  • main.py: Contains the Streamlit-based web app for cancer type prediction.
  • README.md: Documentation for setting up and using the project.
  • lung_colon_image_set: Contains about 2% of the original data. You can download the full dataset from: LC25000 Dataset.

Usage

  1. Upload an image (JPEG only).
  2. The system will process the image and predict the cancer type probabilities.
  3. The results will be displayed in a table along with a pie chart visualization.

Example Output

  • Prediction Probabilities:
    • Colon Adenocarcinoma: 90.0%
    • Colon Benign Tissue: 10.0%
    • Lung Adenocarcinoma: 0.0%
    • Lung Benign Tissue: 0.0%
    • Lung Squamous Cell Carcinoma: 0.0%

License

This project is open-source. Feel free to modify and improve it!

Acknowledgments

  • TensorFlow for deep learning.
  • Streamlit for interactive UI development.
  • Medical image datasets used for training the model.

About

This repository contains a deep learning-based cancer type prediction system using a trained convolutional neural network (CNN). The model is deployed using Streamlit, allowing users to upload medical images and receive predictions with a probability distribution displayed in a pie chart.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published