An AI-powered web application that detects lung cancer from CT scan images using a Convolutional Neural Network (CNN). The system provides multi-class predictions, risk assessment, and generates a professional medical report in PDF format.
-
π€ Upload CT scan images
-
π§ CNN-based multi-class prediction:
- Benign
- Malignant
- Normal
-
π Confidence score visualization (line graph)
-
β οΈ Risk level classification (Low / Medium / High) -
π§Ύ Auto-generated professional PDF report
-
π€ Patient details form (Name, Age, Sex)
-
πΌοΈ CT scan image included in report
-
Frontend/UI: Streamlit
-
Backend: Python
-
Model: TensorFlow / Keras (CNN)
-
Libraries Used:
- NumPy
- Pillow
- Matplotlib
- FPDF
-
Input: CT Scan Image (224 Γ 224)
-
Architecture:
- 3 Convolutional Layers
- MaxPooling Layers
- Fully Connected Dense Layers
- Dropout for regularization
-
Output: 3-class Softmax (Benign, Malignant, Normal)
Lung-Cancer-Detection/
βββ app.py
βββ lung_cancer_model.h5
βββ requirements.txt
βββ README.md
- Clone the repository:
git clone https://github.com/your-username/lung-cancer-detection.git
cd lung-cancer-detection
- Create virtual environment (optional but recommended):
python -m venv venv
venv\Scripts\activate # Windows
- Install dependencies:
pip install -r requirements.txt
- Run the application:
streamlit run app.py
This app can be deployed using Streamlit Community Cloud:
- Push project to GitHub
- Go to Streamlit Cloud
- Connect repository
- Deploy
app.py
- Prediction label (Benign / Malignant / Normal)
- Confidence score
- Risk level
- Visualization graph
- Downloadable PDF medical report
This system is developed for educational purposes only. It is not intended to replace professional medical diagnosis. Always consult a qualified healthcare professional for medical advice.
Rakshanda Noor B.Tech Project β Lung Cancer Detection using Deep Learning
Dataset sourced from Kaggle. Model trained using CNN architecture for medical image classification.