Code Monkey home page Code Monkey logo

skinlesionsegmentation's Introduction

Skin Lesion Segmentation

In this project I reimplement Unet model from srcatch base on Unet paper using Tensorflow and perform segmentation on ISIC 2018 dataset which a skin lesion dataset include 2594 training images. After that I create a app to serve the model using FastAPI as backend and Streamlit as frontend and combine them using Docker.

DATASET

For this project I will use ISIC 2018 dataset which can be downloaded here Link Download This dataset include 2594 image-mask pair for segmenting lesion on skin.

isic

UNET MODEL

Unet model contain 2 part: Encoder and Decoder.

  • Encoder: Use to extract features from the image, from low level features to high level features. It include 5 block, each block is a group of convolution, batchnorm and max-pooling layer
  • Decoder: High level features will go through the decoder to recover spatial information, each step the size of features will get double, also to prevent from loss spatial information it include the features from encoder through what call skip-connection.

unet

RESULT

I train the model for 60 epoch using Adam optimizer, combine loss between dice loss and binary cross entropy loss. The model achieves best dice coefficience of 81.49

loss

Some predicted images:

pred

WEB APP

I serve an Unet model for skin lesion segmentation using FastAPI for the backend service and streamlit for the frontend service. docker-compose orchestrates the two services and allows communication between them.

To run the example in a machine running Docker and docker-compose, run: docker-compose build docker-compose up

To visit the FastAPI documentation of the resulting service, visit http://localhost:8000 with a web browser.
To visit the streamlit UI, visit http://localhost:8501.

Some images from the app

x1 x2 x3

REFERENCE

O. Ronneberger, P. Fischer, and T. Brox, “U-net: Con-volutional networks for biomedical image segmentation,”vol. abs/1505.04597, 2015.

skinlesionsegmentation's People

Contributors

duylebkhcm avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.