People are inherently lazy. The process of going to an optometrist, doing eye check examinations and finding the power of prescription lenses is lengthy, cumbersome and at times expensive. "Can this process be automated?" "Can the process of using heavy machines be replaced with just a mobile app?" and "Can we predict the power of the prescription lenses if we have information about the eyes through a photo?" are just a couple of questions our project addresses.
What it does
We built an app that uses Google Cloud Vision API, Android Studio and machine learning techniques that provides a rough estimate of the power of the prescription lenses to correct the eye defects. It measures axial length of the eyes from the photograph and then uses that in conjunction with other features estimated from the image to provide a prediction of the power of the lens required to correct the eye defects. The best part is that it only uses the technology on your mobile to get this done. NOTE: With enough data, this process is meant to give you accurate results on your eye data.
How we built it
We first calculate the eyeball size of the eye using the proximity sensor and a set standard. The proximity sensor basically acts as a switch to click a picture at the sensor's max length. Based on this, we calculate eyeball size by using a tangent relation. We detect the eyes of a person in the image using the Google Cloud Vision API and then calculate the axial length of the eyes by assuming a constant volume when the eyeball changes its shape (myopia or hypermetropia). Using a standard corneal radius, we calculate the ratio of Axial length and corneal radius. Now, from the paper "Axial Length to Corneal Radius of Curvature Ratio and Refractive Errors" (Hassan Heshemi et al., 2013) we know that the ratio of axial length to the corneal radius of curvature is a better indicator of the power than either of them alone and that has a positive linear correlation with the magnitude of the spherical equivalence, basically your eye power.
(https://imgur.com/a/s9J0N) (https://www.ncbi.nlm.nih.gov/core/lw/2.0/html/tileshop_pmc/tileshop_pmc_inline.html?title=Click%20on%20image%20to%20zoom&p=PMC3&id=3853782_JOVR-08-220f2.jpg) (https://www.ncbi.nlm.nih.gov/core/lw/2.0/html/tileshop_pmc/tileshop_pmc_inline.html?title=Click%20on%20image%20to%20zoom&p=PMC3&id=3853782_JOVR-08-220f1.jpg) (https://www.ncbi.nlm.nih.gov/core/lw/2.0/html/tileshop_pmc/tileshop_pmc_inline.html?title=Click%20on%20image%20to%20zoom&p=PMC3&id=3853782_JOVR-08-220f3.jpg)
So we use the ratio of axial length to the corneal radius of curvature with a linear function to predict the average spherical equivalence (in dioptres).
Challenges we ran into
- Getting the eyeball size from a distance was an issue. So, we solved this by using a proximity sensor, which sets a standard for this distance.
- We currently lack a dataset, but the research paper mentioned above solved this problem by providing a linear correlation between eyeball size and eye power. In the future, once we have enough data, we'll be able to provide more accurate results.
Accomplishments that we are proud of
While the results might not be very accurate at this stage because of the plethora of confounding factors (like the variability of the distance of the face in the picture), preliminary real-world testing of the application shows promise and we found that the relative results are very accurate. Also, our assumption of constant volume for the eye worked out well.
What we learned
EyeCular is a proof of concept and we learnt that with a few tweaks (fixing the distance issue) it'll be possible to pretty accurately predict the eye prescription number just from a photograph or multiple photographs.
What's next for EyeCular
Solving the proximity sensor problem & distance problem - Our results are based on a particular person's eye standards right now, which is not too reliable. If we are able to detect a person's eye dimensions from close enough, our precision will highly increase.
Shifting to a database system & predicting the power of the eye based on previous data.