Coder Social home page Coder Social logo

thepooons / melanoma-comp-2020 Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 551 KB

This repository houses the code for a streamlit powered web app (capable of running on an AWS `t2.micro` EC2 instance) backed with a CNN fine-tuned on the SIIM ISIC Melanoma Classification Competition data.

Python 100.00%
resnest cnn melanoma classification streamlit webapp

melanoma-comp-2020's Introduction

Melanoma Classification Web App

This repository houses the code for a streamlit powered web app (capable of running on an AWS t2.micro EC2 instance) backed with a CNN fine-tuned on the SIIM ISIC Melanoma Classification Competition data.

demo ss

Model Training:

  • Note: Training code is NOT available in this repository.
  • The CNN used is a resnest50_fast_4s1x64d variant of ResNeSt family of CNNs published in ResNeSt: Split-Attention Networks by Hang Zhang et al.
  • The network is trained on an NVIDIA P100 TENSOR CORE GPU provided by Kaggle in the GPU accelerator version of Kaggle Kernels, however the weight tensors are converted from cuda tensors to CPU tenesors to allow for inferring on machines without a GPU.
  • The network is trained on two thirds of the ISIC 2020 JPEG images and all the JPEG images of ISIC 2019 (and 2018) resized to 128*128 sq. pixels for 15 epochs with a batch size of 256.
  • The model reaches a validation AUC (calculated on the third part of ISIC 2020 data dropped from train set) of 0.8892 with single inference and 0.9010 with Test Time Augmentations.
  • Providing better model weights is WIP.

Getting Started:

Follow same steps to run the web app on a cloud vm.

  • git clone this repository.
  • [optional but recommended] Set up a virtual environement.
  • Run pip install -r requiments.txt to install all* the python libraries.
    • *opencv-python needs to be installed using these steps.
  • Download the weights of the Neural Network from here.
  • Run streamlit run app.py <path/of/the/weights_file(.ckpt)> in the system CLI.
  • In a web browser of choice, open localhost:8501.

Built with:

  • Python
  • PyTorch: torch + torchvision
  • Albumentations
  • Numpy
  • Streamlit

Author(s):

Puneet Singh

Acknowledgements:

  • Zhang, H., Wu, C., Zhang, Z., Zhu, Y., Zhang, Z., Lin, H., Sun, Y., He, T., Muller, J., Manmatha, R., Li, M., & Smola, A. (2020). ResNeSt: Split-Attention NetworksarXiv preprint arXiv:2004.08955.
  • Buslaev, A., Iglovikov, V., Khvedchenya, E., Parinov, A., Druzhinin, M., & Kalinin, A. (2020). Albumentations: Fast and Flexible Image AugmentationsInformation, 11(2).
  • Falcon, W. (2019). PyTorch LightningGitHub. Note: https://github.com/PyTorchLightning/pytorch-lightning Cited by, 3.


melanoma-comp-2020's People

Contributors

dependabot[bot] avatar thepooons avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

melanoma-comp-2020's Issues

Documentation and Clean-up

  • Write doc strings for all the functions in the project
  • Clean useless code
  • Format code with Flake8 linter
  • Small changes:
    • add with torch.no_grad():.
    • remove useless arguments in functions.

Make the app work on cloud

Final step of the project from the README.md:

  • Upload to AWS:
    • Create neccessary changes to repository to make it work on AWS EC2

Recommendations:

  • Don't stick to heroku
  • Try AWS [x]
  • Try Azure

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.