Inspiration

  • Mental illness is a health problem that could have an influence on emotions, reasoning, and social interactions of a person. Examples of it include depression, anxiety disorders, and stress. In particular, as with anyone who finds themselves in an unexpected situation, they may experience the feelings of grief and loss, be overwhelmed and fearful of the future.

  • The impact of living with mental illness may be different for everyone. Some may find it as a barrier to education and employment; for others, it may notably affect their work.

  • According to World Health Organizations (WHO), in 2019, it is reported that 970 million people over the world (approximately 1 in 8 people) were living with a mental disorder, with anxiety and depression the most common. This number underscores the urgent need for innovative strategies for prevention and intervention. To accomplish these strategies, early detection and early support for mental illness is a crucial process as it allows specialists to treat them more effectively and it improves patient’s quality of life.

  • During the Med Hack, we were inspired by the growing need for accessible mental health support. Our motivation stemmed from the desire to create a solution that not only diagnoses but also provides continuous support to individuals battling these mental health conditions.

What it does

Our project is a comprehensive mental health support platform that predicts the likelihood of depression, anxiety, and stress using machine learning models and provides personalized guidance through an integrated chatbot. Our goal is to assist people to actively monitoring their mental health, get insight into their emotional states, and receive help and guidance in a nonjudgmental and accessible manner. The platform also offers data visualization tools to help users understand their mental health over time and even features a music page designed to promote relaxation and mental well-being.

How we built it

We built the project in three major phases

First: Machine Learning Model Development

  • We utilized the Depression Anxiety Stress Scales (DASS-42) survey dataset to predict users' mental health conditions with high accuracy. The DASS-42 is a 42-item self-report scale designed to measure the emotional states of depression, anxiety, and stress. The survey, available at (OpenPsychometrics.org), was open to individuals motivated to receive personalized results regarding their mental health. Questions, answers, and metadata is collected from 39775 participants.

  • The dataset was preprocessed and divided into separate datasets for each condition—depression, anxiety, and stress.

  • We employed several machine learning algorithms, including Random Forest, Decision Tree, Gaussian Naive Bayes, K Nearest Neighbors, and Support Vector Machine (SVM).

  • After training and evaluating these models, the SVM model emerged as the most accurate.

Second: Chatbot Integration:

  • To provide real-time, personalized mental health advice, we integrated OpenAI’s GPT model via API. This allowed us to build a chatbot capable of understanding user input and offering relevant guidance.

  • We further enhanced the chatbot with sentiment analysis and word cloud generation features, providing insights into the emotional tone of user interactions.

Third: Web Application Development:

  • We developed a user-friendly web application using the Flask framework. The frontend was designed with HTML, CSS, and JavaScript, while the backend utilized Python and Flask to manage routes and integrate machine learning models and the chatbot. This ensured seamless interaction between the user and the predictive models, enhancing both engagement and user experience.

  • The platform includes various functionalities, such as surveys for mental health assessments, real-time predictions, chatbot interactions, global trend mental health issues information, and a music page for relaxation.

Challenges we ran into

  • One of the primary challenges was balancing the accuracy of our machine learning models with the need for real-time responses in the chatbot.

  • Additionally, integrating multiple features into a cohesive web application within the limited timeframe of the hackathon posed significant technical and logistical challenges.

  • We also had to ensure that the platform was user-friendly while maintaining the accuracy and reliability of the predictions and advice provided.

What we learn

This project taught us the importance of interdisciplinary collaboration in healthcare innovation. We learned how to apply machine learning techniques to real-world medical challenges, the nuances of integrating APIs for chatbot functionalities, and the complexities of web application development. Most importantly, we gained a deeper understanding of the mental health landscape and the potential for technology to make a positive impact.

Accomplishments that we're proud of

After the website was completed, we conducted thorough testing and evaluation to assess its functionality, performance, and user experience. The integration of machine learning models for mental health prediction and the chatbot feature produced promising results:

  • The SVM model demonstrated high accuracy and reliability in predicting users' mental health states based on survey responses.

  • The chatbot successfully engaged users in meaningful conversations, providing emotional support, encouragement, and resources for managing mental health issues.

  • Data visualizations on the home page enhanced user engagement and comprehension of global mental health trends and statistics.

Besides, the backend and frontend design of our web application was meticulously written to ensure an intuitive and user experience. We firmly believe that alongside the machine learning models and chatbot system, web design sets the foundation for user engagement, satisfaction, and ultimately, the effectiveness of our platform in addressing mental health needs

What's next for "Calmy" - Mental Health predict and support website

While our project marks a big step toward addressing mental health needs, there are various prospects for future improvement and expansion.

Enhancing User Authentication and Database Functionality

  • Moving forward, we acknowledge the necessity of improving user authentication and data security methods to ensure user privacy and confidentiality. Conducting frequent security audits and vulnerability assessments can assist detect and address possible security flaws early on.

  • Building a database for the website can help us to track user performance over time and provide more accurate prediction for user.

Deployment of Advanced Features

Due to the limitation of resources and infrastructure, there are some advanced feature we want to implement for our website but we don’t have ability to do this for now. We intend to investigate the scalability and implementation of additional features like:

  • Facial expression detector: Integrating deep learning models for facial emotion identification allows for real-time detection of users' emotional states based on facial signals, improving the accuracy and granularity of mental health assessments.

  • Heartbeat sensor: Utilizing wearable technologies like smartwatches or sensor connected to the website to monitor users' physiological signals, such as heart rate variability, has the potential to provide further insights into their mental health.

Continued Development of Chatbot Functionality

Future developments include improving and optimizing the chatbot's natural language processing (NLP) capabilities. For example, we already built sentiment analysis to analyze the mental state from conservation. Still, we also want to improve sentiment analysis algorithms to allow the chatbot to detect users' emotional states and customize responses accordingly, increasing the empathic and supporting aspect of interactions. Furthermore, including machine learning techniques for context-aware conversation production can help the chatbot deliver appropriate and timely advise to users depending on their specific circumstances and needs.

Share this project:

Updates