This repository contains the code and trained models for Colon Cancer Detection using Convolutional Neural Networks (CNNs). The model is trained to classify histopathological images as Colon Adenocarcinoma (Cancerous) or Colon Benign Tissue (Non-Cancerous).
To download Models, Gmail me at "syedmuhammadhassan367@gmail.com"!
This project aims to develop an AI-based classifier that helps in early detection of colon cancer by analyzing medical images. The deep learning model was trained on a dataset of Colon Adenocarcinoma and Colon Benign Tissue images, achieving high accuracy.
📦 Colon-Cancer-Detection
│── 📂 notebooks/ # Jupyter Notebooks for training and evaluation
│── 📜 colon-c-training.ipynb # Model Traing Notebook
│── 📜 Report Testing.ipynb # Model Evaluation (Accuracy, loss, and confusion matrix analysis)
│── 📂 Report/ # Trained models testing reports
│── 📂 Training Graph/ # Model performance graphs
│── 📜 requirements.txt # Python dependencies
│── 📜 README.md # Project documentation (this file)✅ Binary Classification: Detects whether an image is Cancerous or Benign ✅ Deep Learning Model: CNN-based architecture trained using TensorFlow/Keras ✅ Data Augmentation: Improves model generalization ✅ Model Evaluation: Accuracy, loss, and confusion matrix analysis ✅ Pre-trained Models: Ready to use for inference
- Training Accuracy: 93.54%
- Validation Accuracy: 93.78%
- Test Accuracy: 94.89%
- Training Accuracy: 97.70%
- Validation Accuracy: 93.78%
- Test Accuracy: 93.33%
- Training Accuracy: 100%
- Validation Accuracy: 99.56%
- Training Accuracy: 100%
- Validation Accuracy: 99.89%
- Test Accuracy: 99.89%
- Training Accuracy: 100%
- Validation Accuracy: 100%
- Test Accuracy: 100%
Model performance has been validated using accuracy/loss curves, confusion matrices, and classification reports!
git clone https://github.com/Muhammad-Hassan12/Colon-Cancer-Prediction-CNN-Model.git
cd Colon-Cancer-Prediction-CNN-Modelpip install -r requirements.txtjupyter notebook colon-c-training.ipynbjupyter notebook Report Testing.ipynbThe Dataset I used is "Lung and Colon Cancer Histopathological Images" by "Larxel" from Kaggle! You can download it yourself: https://www.kaggle.com/datasets/andrewmvd/lung-and-colon-cancer-histopathological-images The dataset consists of Colon Adenocarcinoma and Colon Benign Tissue images. The images are resized to 256x256 before training.
- Framework: TensorFlow/Keras
- Optimizer: RMSprop
- Loss Function: Binary Cross-Entropy
- Evaluation Metrics: Accuracy, Precision, Recall, F1-score
- Training & Validation Accuracy & Loss:
- Confusion Matrix:
- Training & Validation Accuracy & Loss:
- Confusion Matrix:
- Training & Validation Accuracy & Loss:
- Training & Validation Accuracy & Loss:
- Confusion Matrix:
- Training & Validation Accuracy & Loss:
- Confusion Matrix:
- Input: Colon biopsy image
- Model Output: Probability score (Cancerous vs. Benign)
🔹 Improve dataset diversity 🔹 Experiment with different CNN architectures 🔹 Deploy the model as a web app for easy access
This project is open-source under the MIT License. Feel free to contribute!
Kaggle Cloud Jupyter Notebook!








