SASEhack Fall 2024 | Adolescence Track | Mental Health Support
coDestress: A Mental Health Support Platform powered by AI
Inspiration 💡
During our high school days, we were extremely concerned about the rate at which mental health issues are growing among young people in the United States. That is inspired by the fact that, according to the National Institute of Mental Health, about 20% of teenagers show symptoms of anxiety or depression, while the country has only about 340 citizens per mental health provider, showing a great gap in access for this population. This was what inspired us to propose a solution that could identify and provide fast treatment to mental health problems and was supporting health professionals at the same time.
What it does 🤖
coDestress is a web-based online system that uses AI and music therapy in supporting mental health. The system leverages state-of-the-art computer vision together with machine learning methods to detect from facial expressions the level of stress with as high as 95.5% accuracy and then provide personalized music therapy based on it for relaxing and destressing.
The system will be integrated with a chatbot that can support and advise mental health using Anthropic's language model, Claude. A chatbot is trained to have in-depth conversations, understand the context, and give advice and suggestions where relevant.
How we built it 🛠️
The coDestress was designed and developed in the Django web framework and Python due to the ease with which it could integrate the various libraries using AI and machine learning. Front-end development was done using HTML, CSS, and JavaScript, along with frameworks such as jQuery and AJAX that enable real-time updates on the web pages without having to refresh.
The techniques used here in computer vision, such as face landmark detection and emotion recognition using pre-trained models, are then combined with machine learning algorithms of our own, primarily K-Nearest Neighbor and linear regression, to classify the levels of stress and predict trends in the users' mental health.
In the music therapy module, we combined Spotify's Web API with Thayer's model of mood to be able to suggest music that best suits a given user's emotional states and preferences. The system uses the YouTube Music API and Spotify iFrame API for seamless music playback.
Challenges we ran into 🔍
One important challenge was to ensure low latency during the real-time transfer of video frames between the client and the server, and vice versa. We were able to design a WebSocket-based communication protocol and thereby develop a few techniques for image encoding and caching to optimize the data transfer process.
Another challenge in this work was making sure the right balance between the accuracy of the stress detection models and the need to have a user-friendly and responsive interface. In this respect, we cannot but perform an extended tuning of machine learning algorithms and be careful that processing time does not affect overall user experience.
Integrating different APIs and managing the complexity of the different modules, like the chatbot or music recommendations, was also very effort- and troubleshooting-intensive.
Accomplishments of Which We Are Proud 🏆
We feel proud that, starting from scratch, we were able to design an integrated functional system that can detect the level of stress and recommend appropriate music therapy, besides offering support for mental health through an AI-powered chatbot. How to apply the use of cutting-edge AI and machine learning techniques in order to solve one of the major problems burdensome to society is a significant accomplishment.
Other things that we pride ourselves on include the smooth integration of several APIs, besides setting up a web interface responsive and user-friendly. Positive feedback from early users encourages us and further validates the potential of the coDestress platform.
What we learned 🧠
This project brought us huge experience in full-stack web development, AI/ML integration, and problem-solving in real life. We get to know how to manage big projects efficiently, balance the different components of such big projects, and optimize the system performance.
Additionally, we gained an even deeper understanding of issues related to mental health and the importance of developing accessible and effective solutions in this domain. The project urged us further to explore at what juncture technology meets mental health and see where it may be utilized in ensuring positive change in people's lives.
What's next for coDestress 🔮
In the near future, we will be improving the coDestress platform with more and more features. Major focus would fall upon:
- Increasing the size of the training dataset for the stress detection models to provide better performance and personalization.
- Using more advanced machine learning algorithms such as XGBoost to improve the accuracy in detection of stress. Employing higher efficiency in compressing and transferring images to reduce latency and further enhance the user experience.
- Continuing to increase the number of languages supported and accessibility features on this site to increase its audience reach. Exploring integration opportunities with health organizations or mental health professionals so that the coDestress services can be provided within their support.
We continuously work on improving the platform, seeking newer ways of collaboration and integration, which makes coDestress one of the leading solutions in the field of AI-powered mental health support. 🚀
Built With
- ajax
- css
- csv
- django
- django-channels
- heroku
- html
- javascript
- jquery
- keras
- memcached
- numpy
- opencv
- poe-api-wrapper
- postgresql
- responsive-voice-text-to-speech-api
- scikit-learn
- spotify
- spotify-iframe-api
- sweetalert2.js
- tensorflow
- websockets
- youtube-music-api
Log in or sign up for Devpost to join the conversation.