This is a project team for Bangkit Capstone Project (product based) application named "SkinSight", and I'm part of creating the machine learning model.
My Team: https://github.com/SkinSight-C23-PS059
If the code cannot be seen / unable to render code block, you can see the preview through this link.
Skin diseases are prevalent worldwide and can have a significant impact on a person's quality of life. Timely and accurate diagnosis of these conditions is essential for effective treatment and management. With advances in machine learning and computer vision, the development of reliable models for skin disease classification has become possible.
The main objective of this project is to create a classification model for skin diseases using the DermNet dataset. The DermNet dataset provides a comprehensive collection of images representing various dermatological conditions. By leveraging this dataset, we aim to develop a model that can accurately classify skin diseases based on input images.
The dataset used in this project includes a collection of images depicting 23 different types of skin diseases sourced from DermNet and have been collected here. The dataset contains a total of approximately 19.5k images, which have been divided into a training set of around 15k images and a separate test set.
Model architecture using DenseNet121
Final H5 Model Gdrive Download Link (Final Model)
- Open Google Colab. Go to https://colab.research.google.com/ and sign in with your Google account if necessary.
- Create a New Notebook. Click on "File" in the top-left corner of the Colab interface and select "New Notebook" to create a new notebook.
- You can clone this repo or just download the notebook.
- Open the notebook in Google Colab.
- Follow the instructions in the notebook and run the notebook.
-
Download the Flask API folder (in master branch).
-
Download and copy model h5 (or you can train your own model and convert to h5) to Flask directory.
-
Open cmd and navigate to Flask API directory.
-
Create a Python virtual environment by running this following command:
pip install virtualenv
then run this:
virtualenv skinsight
Note: skinsight is my virtual environment name
-
In file explorer, you can see virtual environment created successfully.
-
Activate virtual environment by running this following command:
skinsight\Scripts\activate.bat
-
Left side we can see (skinsight) before file directory, that means virtual environment is active. Now virtual environment is activated, we will install required library for the project.
-
Install the required library by running this following command:
pip install flask
pip install tensorflow
pip install pillow
Note: make sure you have a compatible version of Python installed on your system as well.
-
Run the flask application
python main.py
-
Server is running. Open url http://127.0.0.1:5000/ in browser.