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.
- 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.
The model is trained to recognize the following categories:
- Cellulitis
- Impetigo
- Athlete's Foot
- Nail Fungus
- Ringworm
- Cutaneous Larva Migrans
- Chickenpox
- Shingles
- Normal Skin
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.
- 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.
├── 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
Ensure you have Python installed along with the following libraries:
pip install tensorflow opencv-python numpy matplotlib pandas-
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 -
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.
-
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.
Training Accuracy: ~99% (over 500 epochs)
Loss: Optimized to <0.01
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.