This project aims to detect and classify kidney diseases (Cyst, Normal, Stone, Tumor) from CT-scanned images. Leveraging machine learning and deep learning techniques, the project automates the classification process to assist medical professionals in diagnostics.
- Dataset Name: CT-KIDNEY-DATASET
- Categories:
- Cyst
- Normal
- Stone
- Tumor
- Structure:
The dataset is organized into subdirectories for each class. Each subdirectory contains CT scan images corresponding to its label.
numpy
matplotlib
seaborn
tensorflow
keras
scikit-learn
imblearn
(for SMOTE)Pillow
(for image processing)os
andshutil
(for file operations)
Install all dependencies with:
pip install -r requirements.txt
project_root/
│
├── CT-KIDNEY-DATASET-Normal-Cyst-Tumor-Stone/
│ ├── Cyst/
│ ├── Normal/
│ ├── Stone/
│ └── Tumor/
│
├── notebooks/
│ ├── data_visualization.ipynb
│ ├── model_training.ipynb
│ └── evaluation.ipynb
│
├── models/
│ └── saved_model.h5
│
├── README.md
├── requirements.txt
└── main.py
- Image Resizing: All images are resized to a consistent shape (e.g., 32x32).
- Normalization: Pixel values are normalized to a range of [0, 1].
- Class Balancing: SMOTE (Synthetic Minority Oversampling Technique) is used to balance the dataset.
- Distribution of classes.
- Examples of CT-scanned images for each category.
- Model Architecture: Convolutional Neural Networks (CNN).
- Variants:
- Base Model
- Dropout for regularization.
- Hyperparameter-tuned models.
- Optimizer: Adam.
- Loss Function: Categorical Cross-Entropy.
- Accuracy and F1 Score.
- Confusion Matrix to visualize class-wise performance.
- Clone this repository:
git clone https://github.com/Oulakbir/Kidney_Deseases_Detection.git
- Navigate to the project directory:
cd Kidney_Deseases_Detection
- Install dependencies:
pip install -r requirements.txt
- Run the main script for training:
python main.py
- View results and evaluation in the
evaluation.ipynb
notebook.
Model | Accuracy | F1 Score |
---|---|---|
Base CNN | 85% | 0.84 |
CNN + Dropout | 88% | 0.87 |
Tuned CNN | 91% | 0.90 |
Or Run the app.py to use the streamlit application:
- Explore advanced architectures like ResNet or EfficientNet.
- Extend the dataset with additional cases.
- Implement real-time prediction for CT-scanned images.
This project is licensed under the MIT License. See the LICENSE
file for more details.