This project, developed in support of the research in "Validation of a Deep Learning–Assisted Evaluation of Total Corneal Endothelial Cells Viability," aims to provide an automatic process for segmenting the cornea and analyzing the percentage of specific parts of concern to clinical personnel within the entire cornea.
The Segment Anything Model (SAM) is a cutting-edge AI tool developed by Meta AI, designed to "cut out" any object in any image with just a single click. For those interested in learning more, you can read the original paper here and explore the code. They also provide a demo and you could use this demo to segment the cornea.
In this step, we utilize traditional computer vision techniques (OpenCV) to segment the parts of the cornea that are of clinical interest.
The main idea is to use the watershed algorithm to segment the desired portion within the cornea, calculate the minimum enclosing circle based on the corneal contour, and use the center and radius of this circle to compute the percentage of the cornea occupied by the segmented part at different ratio.
We provide a tutorial about our algorithm. Please refer to the "Segment_VCHECK.ipynb" notebook to learn more about our algorithm.