A deep learning project using Convolutional Neural Networks (CNNs) to classify pigmented skin lesions. This repository contains experimental implementations exploring various CNN architectures and hyperparameters to develop an optimal intelligent model for detecting and classifying skin lesions in dermoscopic images.
- Overview
- Features
- Project Structure
- Requirements
- Installation
- Dataset
- Usage
- Model Architecture
- Results
- Web System
- GPU Configuration
- Contributing
- Author
- License
This project implements deep learning models for the automated classification of pigmented skin lesions. The system uses convolutional neural networks to analyze dermoscopic images and classify various types of skin lesions, which can aid in early detection of skin cancer and other dermatological conditions.
- Develop and train CNN models for skin lesion classification
- Implement image preprocessing and segmentation techniques
- Compare different network architectures and hyperparameters
- Achieve high accuracy in multi-class lesion classification
- Multiple CNN Architectures: Experimentation with various deep learning architectures
- Image Segmentation: Advanced preprocessing pipeline for lesion boundary detection
- Data Preparation: Comprehensive data augmentation and preprocessing scripts
- Visualization: Training metrics and results plotted using Matplotlib
- Web Interface: Simple web system for model deployment (in
webSystem/folder) - Jupyter Notebooks: Interactive notebooks for research and experimentation
skin-lesion-classifier/
βββ Research/ # Main research notebooks and experiments
β βββ Data preparation.ipynb
β βββ Image Segmentation.ipynb
β βββ Research.ipynb
β βββ ttest.png
βββ webSystem/ # Web application for model deployment
β βββ public/
β βββ index.js
β βββ package.json
β βββ readme.md
βββ Report/ # Project documentation and reports
βββ README.md
- Python: 3.6 or higher
- Keras: 2.0+
- TensorFlow: 2.x (with GPU support recommended)
- NumPy: For numerical computations
- Pandas: For data manipulation
- Pillow (PIL): For image processing
- Scikit-learn: For machine learning utilities
- Matplotlib: For visualization
keras>=2.0.0
tensorflow>=2.0.0
numpy>=1.19.0
pandas>=1.1.0
pillow>=8.0.0
scikit-learn>=0.23.0
matplotlib>=3.3.0
jupyter>=1.0.0
The easiest way to install all dependencies is using Anaconda, which includes Jupyter Notebook:
-
Download and install Anaconda:
# Visit: https://www.anaconda.com/distribution/ -
Create a new environment:
conda create -n skin-lesion python=3.8 conda activate skin-lesion
-
Install required packages:
conda install keras tensorflow-gpu numpy pandas pillow scikit-learn matplotlib jupyter
# Clone the repository
git clone https://github.com/sareenv/FYP.git
cd FYP
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtThis project requires a dataset of dermoscopic images of pigmented skin lesions.
- High-resolution dermoscopic images
- Multiple classes of skin lesions
- Training and validation splits
- Ground truth labels
- ISIC Archive: International Skin Imaging Collaboration
- HAM10000: Human Against Machine with 10,000 images
- PH2 Dataset: University of Porto dataset
Place your dataset in the appropriate directory and use the Data preparation.ipynb notebook to preprocess the images.
Open and run the data preparation notebook:
jupyter notebook "Research/Data preparation.ipynb"This will:
- Load and organize your dataset
- Apply data augmentation
- Split data into training/validation/test sets
- Normalize and preprocess images
Run the segmentation notebook to extract lesion boundaries:
jupyter notebook "Research/Image Segmentation.ipynb"Train the CNN models using the main research notebook:
jupyter notebook "Research/Research.ipynb"The notebook includes:
- Model architecture definitions
- Training procedures
- Hyperparameter tuning
- Performance evaluation
- Results visualization
The project experiments with various CNN architectures including:
- Custom CNN: Built from scratch with multiple convolutional layers
- Transfer Learning: Using pre-trained models (VGG, ResNet, etc.)
- Ensemble Methods: Combining multiple models for better performance
Each architecture is evaluated based on:
- Classification accuracy
- Precision, Recall, F1-Score
- Confusion matrices
- ROC curves
Training results and visualizations are generated in the notebooks and include:
- Training/validation accuracy curves
- Loss curves
- Confusion matrices
- Classification reports
- Statistical analysis (t-tests, etc.)
Results images are saved in the Research/ folder.
The webSystem/ folder contains a web application for deploying the trained model:
cd webSystem
npm install
npm startSee webSystem/readme.md for more details about the web interface.
For faster training, GPU acceleration is highly recommended. Training on CPU will be extremely slow.
-
Install CUDA Toolkit and cuDNN:
-
Install TensorFlow with GPU support:
pip install tensorflow-gpu
-
Verify GPU availability:
import tensorflow as tf print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
For detailed instructions, refer to the TensorFlow GPU Installation Guide.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Vinayak Sareen
- GitHub: @sareenv
- Website: sareenv.com
- LinkedIn: Vinayak Sareen
- Email: sareenv026@outlook.com
Final Year Project - Coventry University
For any questions or further information, please feel free to reach out.
This project is licensed under the MIT License - see the LICENSE file for details.
- Coventry University for academic support
- Keras and TensorFlow communities
- ISIC Archive for providing dermoscopic image datasets
- All contributors and researchers in the field of medical image analysis
β If you find this project useful, please consider giving it a star!
Note: This is an academic research project. The models should not be used for clinical diagnosis without proper validation and regulatory approval.