Giter Site home page Giter Site logo

drusensegmentation-modifiedchen's Introduction

Drusen Segmentation

We have reproduced and modified the algorithm proposed by Chen et al. [1], which can be used for segmenting drusen in Optical Coherence Tomography (OCT) images. Python scripts in this repository can be used to run both algorithms on OCT volumes.

Requirements

The scripts require

to run.

Reproduction

After package installation, you can simply run the code with the demo dataset in sample-scan. The running command is as below.

python modified_chen_main.py --method chen --source <path to OCT volumes> --dest <path to destination folder> # for Chen et al. [1] algorithm
python modified_chen_main.py --method modifiedChen --source <path to OCT volumes> --dest <path to destination folder> # for the modified Chen algorithm

Per B-scan drusen maps will be saved under <dest>/withoutFPE. An en-face projection of drusen segmentation will be saved under <dest>/metaData/[scanName]/enface. In order to automatically eliminate falsely detected drusen, use --fpe flag in the command line. The results will be saved under <dest>/afterFPE. Example

python modified_chen_main.py --method chen --source <path to OCT volumes> --dest <path to destination folder> --fpe 
python modified_chen_main.py --method modifiedChen --source <path to OCT volumes> --dest <path to destination folder> --fpe 

In order to use multi-scale anisotropic fourth-order diffusion (MAFOD) filter proposed by Gorgi Zadeh et al. [2], instead of bilateral filter, type --mafod in the command line. The FED library (in fedfjlib folder), by Grewenig et al. [3] was used to implement MAFOD filter with the fast explicit diffusion (FED) scheme.

Before running the algorithms on other OCT volumes, edit OCT_info.txt respectively.

To evaluate segmentation quality using overlapping ration (OR), absolute drusen area difference (ADAD), and comparing drusen volume, use the drusen_segmentation_evaluation.py as below:

python drusen_segmentation_evaluation.py --gtPath <path to ground truth folder> --prPath <path to automatically generated segmentation> --savePath <path to a destination folder> --scope <scope of interest> --resx <floating number> --resy <floating number> --resz <floating number>

Both ground truth and automatically generated segmentation folders must contain binary drusen segmentation images with XXX-binmask.png name format, where XXX is the B-scan number. Set --scope to either {vol, maxDru, druPresent} to perform the OR and ADAD computation volumetrically, for B-scan with largest drusen load, or all B-scans with drusen, respectively. Using optional variables --resx, --resy you can set B-scan pixel size in micrometer and with --resz the distance between consecutive B-scans. These numbers are used to compute ADAD and overall drusen volume in micrometer.

Dataset

The exemplary OCT volume scan in the sample-scan/volume1 folder consists of 145 B-scans. You can download the complete version of this dataset that provides ground truth for RPE and BM layers per B-scan from this link https://github.com/MedVisBonn/OCT-Annotation-Tool/tree/master/data . The RPE+BM layer segmentation is carefully performed by a medical expert, who manually has corrected an initial segmentation, spending about 10 minutes per B-scan on average, adding up to a total of 26 hours. Also, sample-scan/volume1/OCT-Info.xml file includes additional information about the OCT volume scan such as B-scan quality (marked by <ImageQuality> tag), and size of each B-scan pixel in micrometer (marked by <ScaleX>, <ScaleY> tags).

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but without any warranty. See the GNU General Public License under http://www.gnu.org/licenses/ for more details.

References

[1] Chen, Qiang, et al. "Automated drusen segmentation and quantification in SD-OCT images." Medical image analysis 17.8 (2013): 1058-1072.

[2] Gorgi Zadeh, Shekoufeh, et al. "Multi-scale Anisotropic Fourth-Order Diffusion Improves Ridge and Valley Localization." Journal of Mathematical Imaging and Vision 59.2 (2017): 257-269.

[3] Grewenig, Sven, et al. "From box filtering to fast explicit diffusion." In Joint Pattern Recognition Symposium, pp. 533-542. Springer, Berlin, Heidelberg, 2010.

Cite

Wintergerst, M.W.M., Gorgi Zadeh, S. et al. Replication and Refinement of an Algorithm for Automated Drusen Segmentation on Optical Coherence Tomography. Sci Rep 10, 7395 (2020). https://doi.org/10.1038/s41598-020-63924-6

Git Authors

drusensegmentation-modifiedchen's People

Contributors

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