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.
- 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
).
The model predicts five types of tissue conditions:
- Colon Adenocarcinoma
- Colon Benign Tissue
- Lung Adenocarcinoma
- Lung Benign Tissue
- Lung Squamous Cell Carcinoma
Ensure you have Python installed along with the following dependencies:
pip install streamlit tensorflow numpy matplotlib
- Clone the repository:
git clone https://github.com/Uni-Creator/LungCancerClassification.git cd LungCancerClassification
- Place the trained model file (
Model.h5
) in the project directory. - Run the application:
streamlit run main.py
- Open the provided local URL in your web browser.
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.
- Upload an image (JPEG only).
- The system will process the image and predict the cancer type probabilities.
- The results will be displayed in a table along with a pie chart visualization.
- 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%
This project is open-source. Feel free to modify and improve it!
- TensorFlow for deep learning.
- Streamlit for interactive UI development.
- Medical image datasets used for training the model.