Skip to content

Application that helps users to know how to help users examine their own bodies to detect early stage skin cancer. This is a project to fulfill the Bangkit Academy led by Google, Tokopedia, Gojek, & Traveloka » Program.

License

Notifications You must be signed in to change notification settings

faniabdullah/bangkit-final-project

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

SkinSkan App

Application that helps users to know how to help users examine their own bodies to detect early stage skin cancer. This is a project to fulfill the Bangkit Academy led by Google, Tokopedia, Gojek, & Traveloka » Program.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Usage
  3. Contributing
  4. License
  5. Contact

About The Project

Skin cancer has symptoms that are difficult to distinguish from ordinary lumps and spots. In fact, melanoma skin cancer is the third deadliest cancer after cervical and breast cancer in Indonesia.

Solution is needed to find out how to assist users examining their own body to detect early-stage skin cancer.

Machine Learning Development Documentation

The project is based from Google Colab (due to limited system requirements of our laptop/PC). Using Machine Learning with Tensorflow as framework to Classify the skin disease.

Link to Colab:
https://colab.research.google.com/drive/1EYhFL717FUyu_vZ7_Mmh0kJ_XZfzgVUe

  • 1. Load Datasets

  • 2. Pre-processing Datasets

    • Defining target and feature from existing CSV file:
      • df['cell_type'] as target
      • df['img'] as feature
    • Spliting datasets into:
      • 80% of train data
      • 5% of validation data
      • 20% of test data
    • Balancing datasets with imblearn.over_sampling module
    • Resizing the datasets into 150 x 150 and convert it to numpy array
  • 3. Training

    • Using transfer learning Xception to make model accuracy better.
    • Using SparseCategoricalCrossentropy as loss
    • Using Adam(learning_rate=1e-5) as optimizer
    • Added more layer too to model.Sequential to make model accuracy more better:
      • Added AveragePooling2D layer
      • Added Flatten layer
      • Added Dense(units=64, activation='relu') layer
      • Added Dropout(units=0.05) layer
      • Added more Dense(units=16, activation='relu') layer
      • Added output layer Dense(units=2, activation='sigmoid' kernel_regularizer=l2(0.01))
    • Training with 20 epochs
    • Set the callbacks EarlyStopping to stop training when accuracy doesn't improve
    • Set the callbacks ModelCheckpoint to saved the model (also the weight) in every epochs with *.h5 format
    • From the result, got:
      • loss: 33%
      • accuracy: 97%
      • val_loss: 60%
      • val_accuracy: 89%
  • 4. Saved the Model to Google Drive

Mobile Development Documentation

  • Feature

    • Splash screen, in this application there is a splashscreen before entering the main page

    • Show case, there is showcase feature for guides when you first use this application

    • Support dark mode, you can change the dark / light theme on your smartphone, so this app can customize the dark / light theme by setting it on your smartphone.

    • Pick image from gallery, you can select an image from the gallery in preparation for uploading an image to detect malignant or benign skin cancer.

    • Take an image from camera, you can take image from camera in preparation for uploading an image to detect malignant or benign skin cancer.

    • Send image to the cloud to get prediction, after you prepare the image, you can click the process button to send the image and detect the image is benign or malignant skin cancer

    • Find nearby hospitals, You can see the nearest hospital from your location , This is useful for helping you find the nearest hospital in your location so that it is faster to get the first treatment / examination.

    • Skin cancer and skin care related article, in this application you can read articles about skin cancer

Cloud Computing Documentation

  • 1. Write the Flask server app using Python

    • Save the model in '.h5' format in the same directory as main.py
    • Load the model and write Flask code in main.py
    • Test the Flask server locally by running main.py, copy the assigned local URL to test.py then run it with test images.
  • 2. Setup Google Cloud

    • Enable Cloud Run and Cloud Build API
  • 3. Install and init Google Cloud SDK

  • 4. Dockerfile, requirements.txt, .dockerignore

  • 5. Cloud build & deploy

    gcloud builds submit --tag gcr.io/just-program-311914/cancerprediction
    
    gcloud run deploy --image gcr.io/just-program-311914/cancerprediction --platform managed
    
  • Test

    • Test the code with test/test.py with the Cloud Build image URL

Usage

SplashScreen Create Image Send Image Nearest Hospital Article

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Rheivant Bosco Theoffilus - [email protected]

Fani Abdullah - [email protected]

Saharudin - [email protected]

Auzan Widhatama [email protected]

Muhammad Naufal - [email protected]

Imam Lutfi Rahmatullah - [email protected]

About

Application that helps users to know how to help users examine their own bodies to detect early stage skin cancer. This is a project to fulfill the Bangkit Academy led by Google, Tokopedia, Gojek, & Traveloka » Program.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages