Skancer is an end-to-end machine learning solution developed to enhance the early detection and classification of skin cancer. This project leverages advanced deep learning models like ResNet and EfficientNet to accurately identify and classify various types of skin cancer. The project was developed as part of the GAIP program at NUS Singapore.
Skin cancer is one of the most common types of cancer, and early detection is crucial for effective treatment. Skancer leverages machine learning models to accurately identify and classify various skin cancer types, improving diagnostic accuracy and aiding medical professionals.
This project utilizes the Kaggle API to download and manage the dataset required for skin cancer detection and classification.
-
Kaggle Account: Ensure you have a Kaggle account. If you don’t have one, you can sign up at Kaggle.
-
Kaggle API Token:
- Go to your Kaggle account settings and create a new API token. This will download a file named
kaggle.json
. - Place the
kaggle.json
file in the root directory of your project.
- Go to your Kaggle account settings and create a new API token. This will download a file named
-
Download the Dataset:
- Use the following commands in your Jupyter notebook or Python script to download the dataset:
!pip install kaggle !mkdir -p ~/.kaggle !cp kaggle.json ~/.kaggle/ !kaggle datasets download -d <dataset-name> !unzip <dataset-name>.zip -d data/
!kaggle datasets download -d !unzip .zip -d data/
Replace : Make sure to replace with the actual name of the dataset you are using. By following these instructions, you can easily set up the dataset for the Skancer project.
This project includes an HTML interface for uploading images and displaying results based on the type of skin cancer detected.
frontend/index.html
: HTML file for image upload.frontend/Actinic_keratosis.html
: HTML file for displaying results for Actinic Keratosis.frontend/Basal_Cell_Carcinoma.html
: HTML file for displaying results for Basal Cell Carcinoma.frontend/Dermatofibroma.html
: HTML file for displaying results for Dermatofibroma.frontend/Vascular_lesions.html
: HTML file for displaying results for Vascular Lesions.frontend/Melanoma.html
: HTML file for displaying results for Melanoma.frontend/Benign_keratosis_like_lesions.html
: HTML file for displaying results for Benign Keratosis-like Lesions.src/frontend_integration.py
: Script for handling image uploads and predictions.models/model.h5
: The trained model used for predictions.
-
Open the HTML file in a web browser:
- Navigate to
frontend/index.html
in your local file system.
- Navigate to
-
Upload an image using the provided form.
-
The application will classify the image and redirect to the corresponding HTML file based on the detected skin cancer type:
- If the image is classified as Actinic Keratosis, it will open
Actinic_keratosis.html
.
- If the image is classified as Actinic Keratosis, it will open