Inspired by the prevalence of strabismus (crossed eyes), affecting approximately 4% of the population, we developed StraCNN, a small-scale diagnostic and exercise model for this hackathon. Our Python-based application uses a convolutional neural network (CNN) to classify eye images into five categories: Normal, Esotropia, Exotropia, Hypertropia, and Hypotropia. Based on the classification, the application suggests appropriate eye exercises.
The model, built with Python libraries like TensorFlow, OpenCV, and Tkinter, features a user-friendly interface and comprises roughly 160 layers utilizing ReLU and Softmax activations. A key challenge was the scarcity of training data. We overcame this by utilizing an open-source dataset from Kaggle, which, despite containing only roughly 90 images per class, enabled us to achieve an accuracy of nearly 65%. The dataset citation is available in citation.docx, we also used a few images during our videography and as the place holder which can also be accessed from the updated readme on github.
The desktop application, built with Tkinter, allows users to upload or capture eye images. The system uses dlib to detect facial landmarks and extract the eye region for analysis. The CNN then classifies the image, triggering corresponding vision therapy exercises: horizontal or vertical Brock String training for strabismus, or an eye-tracking exercise for normal results. Features include dark/light theme switching, drag-and-drop support, and real-time camera capture, offering a user-friendly experience for preliminary screening and therapeutic guidance.
During development, we faced compatibility, UI, and UX challenges related to Tkinter. This experience significantly improved our proficiency with the library.
Our future goals include creating a completely reliable, ethically sound, transparent, and robust StraCNN model. We aim to enhance the user experience and increase awareness of strabismus, aspiring to make StraCNN as commonplace as everyday face detection software.
Built With
- cv2
- h5
- imutils
- keras
- numpy
- os
- pil
- sklearn
- tensorflow
- tkinter
Log in or sign up for Devpost to join the conversation.