This repository includes the source code for the cataract + glaucoma detection for the VisionGuardian project, providing users with an easy way to self-diagnose their eye health.
- Cataract detection was achieved by utilizing TensorFlow to create an image classification model (more specifically, a convolutional neural network).
- Glaucoma detection was achieved by using OpenCV & MediaPipe to leverage computer vision and create an object tracker and pose detector.
The source code for cataract detection was written in a Jupyter Notebook and can be found at src/Cataract/cataract_cnn.ipynb
.
The cataract image dataset used for classification originated from Kaggle.
- Model 1: Adam Optimizer + Sparse Categorical Cross Entropy Loss.
- Loss:
0.0499
- Accuracy:
0.9919
- Total parameters:
36,162
- Loss:
- Model 2: RMSprop Optimizer + Binary Cross Entropy Loss.
- Loss:
0.1422
- Accuracy:
0.9511
- Total parameters:
1,086,689
- Loss:
The source code can be found in src/Glaucoma
, separated into different Python scripts along with a requirements file.
This simple test can be used as a potential self-diagnosis for glaucoma. Here are the steps to perform it:
- Stand straight up, keeping your feet shoulder-width apart.
- Outstretch your arms in front of you such that they are parallel to the ground.
- Point your thumbs up towards the ceiling.
- Keeping your head and eyes still, move one arm away from the center until your thumb is no longer in your field of view.
- If your visual field (the angle between your arms) is less than 60º, then you may potentially have glaucoma.
- Reset your stance and repeat the test with your other arm.