Skip to content

Commit

Permalink
Merge pull request #814 from SayantikaLaskar/main
Browse files Browse the repository at this point in the history
Add Kidney Stone Detection
  • Loading branch information
abhisheks008 authored Jun 23, 2024
2 parents 0420cd2 + d92f424 commit 42e1fd5
Show file tree
Hide file tree
Showing 11 changed files with 13,825 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Kidney Stone Detection/Dataset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The link to the dataset:
https://www.kaggle.com/datasets/nazmul0087/ct-kidney-dataset-normal-cyst-tumor-and-stone
Binary file added Kidney Stone Detection/Images/CNN1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Kidney Stone Detection/Images/CNN2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Kidney Stone Detection/Images/CNN3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Kidney Stone Detection/Images/ResNet1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Kidney Stone Detection/Images/Resnet2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Kidney Stone Detection/Images/VGG1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

6,789 changes: 6,789 additions & 0 deletions Kidney Stone Detection/Model/Kidney_Stone_detection2.ipynb

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions Kidney Stone Detection/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Kidney Condition Classification

## 🎯 Goal
The main goal of this project is to accurately classify kidney conditions (Normal, Cyst, Tumor, Stone) using deep learning models. The purpose is to assist medical professionals in diagnosing kidney-related issues efficiently through automated image classification.

## 🧵 Dataset
The dataset used in this project is the CT-KIDNEY-DATASET, which can be found at [this link](https://www.kaggle.com/datasets/nazmul0087/ct-kidney-dataset-normal-cyst-tumor-and-stone). It contains a total of 12,000 images categorized into four classes: Normal, Cyst, Tumor, and Stone.

## 🧾 Description
This project involves the development and comparison of three deep learning architectures—VGG-like, CNN with spatial attention, and ResNet-like—to determine the most effective model for kidney condition classification. The models are trained, validated, and tested on a dataset of CT kidney images to identify the best performing architecture based on accuracy and other evaluation metrics.

## 🧮 What I had done!
1. **Dataset Preparation**:
- Collected and split the dataset into training, validation, and test sets.
- Applied data augmentation to enhance the training dataset.

2. **Model Development**:
- Implemented three deep learning models: VGG-like, CNN with spatial attention, and ResNet-like.

3. **Model Training**:
- Trained each model using the training dataset.
- Used Early Stopping, Model Checkpoint, and ReduceLROnPlateau callbacks for efficient training.

4. **Model Evaluation**:
- Evaluated the models using the validation dataset.
- Compared the performance of the models based on accuracy, precision, recall, F1-score, and confusion matrices.

5. **Testing**:
- Tested the final models on the test dataset to ensure robustness.
- Visualized and analyzed the results to determine the best model.

## 🚀 Models Implemented
- **VGG-like Model**: Chosen for its simplicity and proven effectiveness in image classification tasks.
- **CNN with Spatial Attention**: Selected to enhance feature extraction and focus on important regions in the images.
- **ResNet-like Model**: Implemented for its capability to handle deep networks efficiently and prevent vanishing gradients.

## 📚 Libraries Needed
- TensorFlow
- Keras
- NumPy
- Matplotlib
- Scikit-learn
- Splitfolders

## 📊 Exploratory Data Analysis Results
![EDA Results]
![1](https://github.com/SayantikaLaskar/DL-Simplified/assets/127471376/314defef-03d5-47ab-b571-58631966e368)

![image](https://github.com/SayantikaLaskar/DL-Simplified/assets/127471376/547c0a6a-4296-40d8-a04d-559a49223c7b)


- Distribution of images across different classes.
- Sample images from each class.
- Data augmentation examples.

## 📈 Performance of the Models based on the Accuracy Scores
- **VGG-like Model**: Accuracy - 40.79%
- **CNN with Spatial Attention**: Accuracy - 90.82%
- **ResNet-like Model**: Accuracy - 97.77%

## 📢 Conclusion
The ResNet-like model achieved the highest accuracy of X.XX%, making it the best fit for classifying kidney conditions among the three developed models. This project demonstrates the effectiveness of deep learning models in medical image classification and highlights the potential of automated diagnosis tools in healthcare.

## ✒️ Your Signature
*GitHub: https://github.com/SayantikaLaskar*

*LinkedIn: https://www.linkedin.com/in/sayantika-laskar-098aa2250/*
8 changes: 8 additions & 0 deletions Kidney Stone Detection/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**Requirements For Project :-**

1. NumPy: Fundamental package for numerical computing.
2. pandas: Data analysis and manipulation library.
3. scikit-learn: Machine learning library for classification, regression, and clustering.
4. Matplotlib: Plotting library for creating visualizations.
5. Keras: High-level neural networks API, typically used with TensorFlow backend.
6. seaborn: Statistical data visualization library based on Matplotlib.

0 comments on commit 42e1fd5

Please sign in to comment.