Inspiration
Eye Movement Desensitization and Reprocessing (EMDR) is a well proven psychotherapy treatment approach which is specifically designed to reduce the distress associated with traumatic memories. This is usually used for sufferers of Post Traumatic Stress Disorder (PTSD) and Dissociative Identity Disorder (DID). In this therapy method, one relives their traumatic or triggering experiences in brief doses while the therapist directs their eye movement. EMDR is thought to be effective because recalling distressing events is often less emotionally upsetting when your attention is diverted.
Does EMDR work? Some EMDR studies have shown that 84%-90% of single-trauma victims no longer have post-traumatic stress disorder after only three. Another study found that 100% of the single-trauma victims and 77% of multiple trauma victims were no longer diagnosed with PTSD after only six sessions. In another study, 77% of combat veterans were free of PTSD in 12 sessions.
If it is administered worldwide and proved to work so well, why is our solution important? Around 600 million of the current world population suffers from PTSD, however only 2 million have gone for therapy. That means only less than 1% of people have sought out help. Some of the top reasons people don't seek out therapy are ‘it will be uncomfortable’, ‘I can't afford therapy’ and ‘I don't want people to know I am seeing a therapist’. All of these issues (and many more) can be addressed by our opensource solution.
What it does
Thereyepist is a platform that provides virtual therapy to those who have faced trauma or feel anxious
TRACKS EYE MOVEMENTS: Neural Networks was used for the detection of eye gaze. For this, we used one pre-trained Neural Network, for the detection of 'Left', 'Right', and 'Center' gaze of the eye.
CONVERSES WITH THE AI THERAPIST: Most of the main scalability and effectiveness issues can be resolved using Natural language processing, the category of AI that deals with understanding and processing the human language.
How we built it
DialogFlow Chatbot: The chatbot was built using DialogFlow. It involves a one-way conversation between the patient and the therapist. Voice-to-text activation is integrated as well, so that people who are disabled can also use this therapy. Additionally, it can be used which the patient is describing their traumas and following the eye movement tracker at the same time. Fuzzy matching parameter extraction was used so that it can understand even if the user misspells a word or only enters part of the words from entry entities.
Eye gaze tracker: For the detection of the eye, we used the dlib library. Dlib’s frontal face detector is used to detect all of the 68 facial landmarks coordinates and they are converted into a numpy array. The coordinates related to left and right eye location are cropped and passed, after which the user’s gaze is determined through the index of highest value in the array returned by the model. A total of seven frames of image capturing is processed before returning the highest index value.
Integrating it all in the web app: We used React for the frontend and Flask for the backend which contains the eye gaze tracker code. The chatbot runs on the Kommunicate API which gets the data from DialogFlow.
Challenges we ran into
- EMDR Therapy bot is not implemented elsewhere. Almost all therapy bots currently in operation used Cognitive Behavioral Therapy. According to a paper released in 2018, EMDR is a less invasive approach which is better than CBT in reducing post-traumatic symptoms and anxiety.
- The eye tracking model was dependent on a particular camera position and the screen size of the computer used
- The therapist is an AI bot which we needed to train to make a conversation with the patient
Accomplishments that we're proud of
- The chatbot and eye gaze detection is functioning according to the EMDR therapy helping the patient.
- Let’s be honest, the website is really pretty !!! We had first built the prototype on Figma before coding it out on React.
What we learned
- The chatbot feature to be able to have a conversation.
What's next for TherEYEpist
Using capabilities such as sentiment analysis, and harnessing data from previous sessions, the entire process will be much more efficient and deployable by any non-specialized professional and more accessible and comfortable for patients worldwide. Moreover more advanced games/quizzes/interactive sessions could be linked to the AI Chatbot to calm patients amidst the draining/emotional therapy sessions.

Log in or sign up for Devpost to join the conversation.