Giter Club home page Giter Club logo

glaucoma-detector's Introduction

Glaucoma detector Open in Streamlit

Link: https://share.streamlit.io/golden-panther/glaucoma-detector/glaucoma_app.py

(If app at above link doesn't work then use this project by downloading and running it on your local PC)

Web Page

alt text

Healthy Eye

alt text

Glaucomatous Eye

alt text

>> Details

Part 1

  • We have collected all the publicly available labelled(glaucoma or normal) fundus images of eye from web.
  • Some are already cropped and some are full. So, we cropped the full fundus images too.
  • We bulk renamed all the images in the two classes using https://www.bulkrenameutility.co.uk/
  • Then we bulk converted all the images to jpg using https://www.xnview.com/en/xnconvert/
  • Number of images in both classes are not equal. They are highly imbalanced. Then we balanced by removing extra images.
  • Finally, we sticked with 1,115 images of each class totalling 2,230 (Contact me if you want this data). And we divided them randomly into train, val and test sets in the ratio 8:1:1 using https://pypi.org/project/split-folders/

Part 2

  • We uploaded all these images to my google drive and trained on various CNN architectures from simple to advanced.
  • We did augmentation of data using keras ImageGenerator to cut down high variance. But there is some bias due to low and bad data.
  • We used keras (2.4.3) and tesorflow (2.3.0) on top of python (3.6.9). (You can see the code in train.py)
  • We trained on train set and validated on validation set after each epoch. Finally tested the test set.
  • It gave 93 percent AUC score, some good accuracy, precision and recall values. We saved the model file(h5) for further usage.
  • Then we built a simple streamlit app for hosting on web.

>> Usage:

Always remember that tensorflow does not support python 3.8. It supports upto version 3.7 only.

To use our project - go to this link https://share.streamlit.io/golden-panther/glaucoma-detector/glaucoma_app.py

(or)

To run this app

pip install -r requirements.txt
streamlit run https://raw.githubusercontent.com/golden-panther/glaucoma-detector/master/glaucoma_app.py

(or)

To run our glaucoma detector on your machine by cloning this repository,

  • Type the following in your terminal or cmd:
pip install -r requirements.txt
streamlit run glaucoma_app.py
  • The web app opens up in a local host. Then you can use it for classifying. That's it!

  • Upload a (jpg) cropped fundus image of eye(if not cropped, see note). Our model predicts whether affected by glaucoma or not.

  • I provided two folders Glaucomatous and Healthy. These contain images from my test set. Use these if you don't have any fundus images with you.

Note: The image should be cropped around the optic nerve part.(see the below full to cropped image for reference)

alt text

glaucoma-detector's People

Contributors

golden-panther avatar jrieke avatar streamlit-badge-bot avatar dependabot[bot] 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.