This project is a machine learning pipeline designed for classifying skin diseases from images. Below is an overview of the steps required to run the code and details about the model used.
Ensure you have the following libraries installed:
TensorFlowNumPyOpenCVMatplotlibScikit-learn
You can install these dependencies using the following command:
pip install tensorflow numpy opencv-python matplotlib scikit-learn-
Prepare the Dataset
- Ensure the dataset is available in a ZIP file containing subdirectories for each category.
- Place the ZIP file in the
./Datasetdirectory.
-
Extract Dataset
- The script automatically extracts the dataset into separate training and testing directories.
-
Run the Notebook
- Open the provided notebook in Jupyter Notebook or any other IDE that supports
.ipynbfiles. - Execute the cells sequentially:
- Import required libraries.
- Extract and preprocess the dataset.
- Perform data augmentation.
- Train the machine learning model.
- Open the provided notebook in Jupyter Notebook or any other IDE that supports
-
Train the Model
- The notebook contains predefined models (e.g.,
VGG16,ResNet50) for training. Choose your preferred model by modifying the respective cell. - Train the model by running the training cells. The script will save the model automatically upon completion.
- The notebook contains predefined models (e.g.,
-
Evaluate the Model
- Evaluate the model performance using the testing dataset. Metrics such as accuracy and loss will be displayed.
-
Make Predictions
- Use the trained model to predict skin disease categories for new images by loading them into the prediction pipeline.
- The project uses pre-trained architectures, including:
VGG16ResNet50DenseNet121InceptionV3
- These models are fine-tuned to classify skin disease categories such as:
- Acne
- Skin Cancer
- Psoriasis
- Eczema
To balance the dataset and improve model generalization, the following augmentation techniques are applied:
- Rotation
- Horizontal and vertical flipping
- Zoom
- Shift
- Training Dataset: Augmented images from all categories.
- Testing Dataset: Augmented images from the original test split.
Evaluation metrics such as accuracy and confusion matrices are generated to analyze the model's performance. Further tuning and hyperparameter optimization can be performed for better results.
Ensure proper hardware (preferably a GPU-enabled system) for faster model training.
For any issues or questions, feel free to raise an issue in the repository.