Skip to content

Chittesh-ST/Skin-Disease-Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Powered Skin Disease Classifier

A Deep Learning solution designed to classify 9 different types of skin diseases with high precision. This project utilizes a custom Convolutional Neural Network (CNN) and advanced digital signal processing techniques (Fourier Transform) for image enhancement.

Key Features

  • Multi-Class Classification: Capable of identifying 8 specific skin diseases + Normal skin.
  • Advanced Preprocessing: Implements Discrete Fourier Transform (DFT) for frequency domain filtering to enhance skin lesions and remove noise before training.
  • Custom CNN Architecture: A sequential model trained from scratch with ~9.6M trainable parameters.
  • User-Friendly Inference: Includes a demo notebook to test the model on individual images.

Medical Classes

The model is trained to recognize the following categories:

  1. Cellulitis
  2. Impetigo
  3. Athlete's Foot
  4. Nail Fungus
  5. Ringworm
  6. Cutaneous Larva Migrans
  7. Chickenpox
  8. Shingles
  9. Normal Skin

Technical Approach

1. Image Enhancement Pipeline

Before feeding images into the neural network, each image undergoes a rigorous enhancement process to improve feature extraction:

  • Gaussian Blur: Reduces high-frequency noise.
  • YUV Color Space Conversion: Separates luminance (Y) from chrominance (UV).
  • Fourier Transform (DFT): Applied to the Y-channel to process the image in the frequency domain, enhancing structural details of the skin lesions.
  • Inverse DFT: Reconstructs the enhanced image back to the spatial domain.

2. Model Architecture

  • Input: 224x224x3 Images.
  • Feature Extraction: 4 blocks of Conv2D layers (filters: 32, 64, 128, 128) with ReLU activation and MaxPooling.
  • Classification Head: Flatten layer followed by a Dense layer (512 units) and a final Softmax output layer (9 units).
  • Optimizer: Adam.
  • Loss Function: Sparse Categorical Crossentropy.

Repository Structure

├── Model_training.ipynb        # Main notebook: Data loading, preprocessing, and model training
├── Inference_demo.ipynb        # Demo notebook: Load the saved model and test on new images
├── Skin_Disease_final.keras    # The trained model file (stored via Git LFS)
└── README.md                   # Project documentation

Getting Started

Prerequisites

Ensure you have Python installed along with the following libraries:

pip install tensorflow opencv-python numpy matplotlib pandas

How to Run

  1. Clone the Repository:

    git clone [https://github.com/Chittesh-ST/Skin-Disease-Classifier.git](https://github.com/Chittesh-ST/Skin-Disease-Classifier.git)
    cd Skin-Disease-Classifier
  2. Test the Model: Open Inference_demo.ipynb in Jupyter Notebook or Google Colab. Change the image_path variable to point to any skin image you want to test.

  3. Retrain (Optional): If you have your own dataset, you can use Model_training.ipynb to retrain the network. Ensure your dataset folder structure matches the path definitions in the notebook.

Results

Training Accuracy: ~99% (over 500 epochs)

Loss: Optimized to <0.01

Medical Disclaimer

IMPORTANT: This tool is developed for educational and research purposes only. It is not a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of a qualified health provider with any questions regarding a medical condition.

About

A Deep Learning model to detect 9 skin diseases using Image Processing and CNNs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors