Skip to content

elsayedelmandoh/Medical-Image-Analysis-with-VGG16-ResNet-CNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Medical Image Analysis with CNN

Table of Contents

Project Objectives

Developed multi-models to analyze X-ray medical images for detecting diseases or abnormalities. Utilized VGG16 with a training accuracy of 74% and a test accuracy of 77%. Implemented a ResNet model, achieving a training accuracy of 93% but a test accuracy of 62%. Additionally, trained a custom CNN model with a training accuracy of 74% and a test accuracy of 62%.

  1. Exploratory Data Analysis (EDA): Analyze the dataset, explore correlations between features, and handle outliers or missing values.

  2. Preprocessing: Preprocess the dataset by splitting it into training and testing sets. Normalize pixel values to prepare for model training.

  3. Build CNN Model: Utilize TensorFlow and Keras to build a VGG16, ResNet and CNN model. Experiment with different architectures, activation functions, and learning rates to find the optimal model for medical image analysis.

  4. Model Evaluation: Evaluate the model's performance using metrics such as accuracy, precision, recall, and F1 score. Visualize the results with confusion matrices.

Dataset

Chest X-Ray Images

NIH Clinical Center

  • Dataset Link: NIH Clinical Center
  • Number of Images: 100,000+
  • Disease Labels: 14 different labels

Code Structure

The code is organized into different sections:

  • Verify GPU: Check the availability of GPU.
  • Data Acquisition: Download and preprocess the dataset using TensorFlow and OpenCV.
  • Data Exploration and Preprocessing: Explore the dataset and preprocess it for training.
  • EDA (Exploratory Data Analysis): Visualize the distribution of classes in the dataset.
  • CNN Model Architecture and Hyperparameter Tuning: Build and optimize a CNN model using scikeras and RandomizedSearchCV.
  • VGG16 Model Architecture and Hyperparameter Tuning: Build and optimize a VGG16 model.
  • ResNet Model Architecture and Hyperparameter Tuning: Build and optimize a ResNet model.
  • Callbacks: Implement callbacks such as ModelCheckpoint, ReduceLROnPlateau, and EarlyStopping.
  • Training the Model: Train the models with the prepared dataset.
  • Displaying Metrics: Visualize the training and validation metrics.
  • Evaluation Metrics for the Test Set: Evaluate the models on the test set and display classification reports and confusion matrices.
  • Model Comparison: Compare the performance of different models

How to Use

  1. Clone the repository:

    git clone https://github.com/elsayedelmandoh/Medical-Image-Analysis-with-VGG16-ResNet-CNN.git
    cd Medical-Image-Analysis-with-CNN

Contributing

Contributions are welcome! If you have suggestions, improvements, or additional content to contribute, feel free to open issues, submit pull requests, or provide feedback.

GitHub watchers GitHub forks GitHub stars

Author

This repository is maintained by Elsayed Elmandoh, an AI Engineer. You can connect with Elsayed on LinkedIn and Twitter/X for updates and discussions related to Machine learning, deep learning and NLP.

Happy coding!

About

Developed multi-models to analyze X-ray images for detecting diseases or abnormalities. Utilized VGG16 with a training accuracy of 74% and a test accuracy of 77%. Implemented a ResNet model, achieving a training accuracy of 93% but a test accuracy of 62%. Additionally, trained a CNN model with a training accuracy of 74% and a test accuracy 62%

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors