Giter VIP home page Giter VIP logo

hacknroll2017's Introduction

HacknRoll2017 - Skinalytics - Identifying Skin Diseases with Deep Learning

Skinalytics poster

What is Skinalytics?

Skinalytics is a Snap N Diagnose solution that can identify over 8 common skin diseases (including STDs) through the use of deep learning. It can be accessed from both a Web Application, Twitter and via Facebook Messenger.

This prototype, inclusive of scraping the training data, was made within 24 hours for HackNRoll 2017, an annual hackathon organized by NUS Hackers. Our initial deep learning model achieved an accuracy of ~76%. This accuracy can definitely be improved by adding more training images, and tuning the model architecture.

We hope to continously improve this model, and have a solution which can rival the accuracy of a doctor's diagnosis, bringing healthcare to people who cannot afford specialist care, or whom do not visit the doctor for reasons such as embarassment, downplaying the severity of their symptoms, etc.

Click here for the Devpost URL

How to use

Application

To host the repository and run it on your local computer:

  • Install the dependencies via pip install -r requirements.txt (Caution - opencv might fail and require a seperate installation)
  • Run python app.py in your command line and navigate to http://localhost:5000
  • Snap a picture of the diseased area, and drop it into the box as shown. Click analyze and the results will be displayed.

Models & Retraining

  • Create a folder called raw_images, and create a new subfolder for every disease you wish to train on. Populate these folders with many training images of the disease. For example:

Example of folder setup

Preprocessor.py resizes the training images to specified dimensions, and generates flipped and rotated images to increase the number of training images.

  • run python preprocessor.py to resize and preprocess these images.

combine_to_one_folder.py creates a folder called train, and copies all the pictured created by preprocessor.py to the train folder. It creates a labels.csv that maps images to their labels.

  • run python combine_to_one_folder.py

Modify the settings in classifier.py if needed. You can set your own model architecture as well and tune existing ones in the models section of the file.

  • Set the 'save_model_to' variable to a name to save the model in run(), then run python classifier.py

This should train your model, and save it with the name given if specified.

Facebook Messenger Bot

Setup

  1. Run npm install
  2. Create a .env file with contents
PAGE_ACCESS_TOKEN=... (get from Facebook app dashboard)
VERIFICATION_TOKEN=... (set arbitrarily)
  1. Download ngrok

Run

  1. Run node index.js
  2. Run ./ngrok http 3000
  3. Copy paste the output https url (https://...ngrok.io+/facebook) from ngrok into the Facebook app dashboard. Set the Verify Token field to VERIFICATION_TOKEN (as set in part 2 of Setup above).

alt text

alt text

  1. If the bot still remains unresponsive to messages (does not receive POST requests from Facebook), it might be due to the bot webhook not being subscribed properly to the Skinalytics Facebook page events.

Choose the page to subscribe to:

alt text

Select the Unsubscribe button, then click the Subscribe button to resubscribe the webhook:

alt text

hacknroll2017's People

Contributors

waffleboy avatar theyinvincible avatar thisisandreeeee avatar ctewan avatar dionseow avatar

Watchers

James Cloos avatar

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.