Giter Site home page Giter Site logo

faniabdullah / bangkit-final-project Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 18.0 19.99 MB

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: MIT License

Jupyter Notebook 99.62% Kotlin 0.36% Dockerfile 0.01% Python 0.02%
skin-cancer flask machine-learning cnn jetpack clean-architecture kotlin-android cloud-computing

bangkit-final-project's Introduction

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]

bangkit-final-project's People

Contributors

auzan-w avatar emnopal avatar faniabdullah avatar lutfi640 avatar revancar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bangkit-final-project's Issues

Intent Camera , UI-UX Proggress

this issue actually done , and appear again caused by miss communication in branch skin-scan because branch skin-scan make a new structure app for mobile-dev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.