Code Monkey home page Code Monkey logo

optic-disc-unet's Introduction

Optic-Disc-Unet

A modified Attention Unet model with post-process for retina optic disc segmention.

The performance of our model on Messidor-dataset:

Patched Based Attention Unet Model

I use a modified Attention Unet which input of model is 128x128pix image patches.To know more about attn-unet,please see the paper.When sampling the patches,I focus the algorithm get samples around optic disc.The patches is like that:

sample patches

so the groundtruth is :

Pretrained Model & Dataset

the model is trained on DRION dataset.90 images to train. 19 images to test.

To get the groundtruth of DRION, I write a convert tool,you can find in DRION-DB-PythonTools.

pretrained can be downloaded here.extract them to dir Dataset.

Post-Process Methods

when directly use unet model, we often get some error predictions.So I use a post-process algorithm:

  1. predicted area can't be to small.
  2. minimum bounding rectangle's height/width or width/height should be in 0.45~2.5

lefted area is the final output.The problem of this algorithm is that the parameters not self-adjusting.so you have to change them if input image is larger or smaller than before.

Project Structure

The structure is based on my own DL_Segmention_Template.Difference between this project and the template is that we have metric module in dir: perception/metric/. To get more Information about the structure please see readme in DL_Segmention_Template.

You can find model parameter in configs/segmention_config.json.

First to run

please run main_trainer.py first time,then you will get data_route in experiment dir.Put your data in there, now you can run main_trainer.py again to train a model.

where to put Pretrained Model

the model is trained with DRION dataset on my own desktop(intel i7-7700hq,24g,gtx1050 2g) within 30 minutes. Datatset

Test your own image

if u want to test your own image,put ur image to (OpticDisc)/test/origin,and change the img_type of predict settings in configs/segmention_config.json,run main_test.py to get your result.The result is in (OpticDisc)/test/result

optic-disc-unet's People

Contributors

deeptrial avatar

Watchers

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