Skip to content

An app that uses an OpenBCI Cap to help the user pick the the music genre for optimal concentration

Notifications You must be signed in to change notification settings

ericyuxuanye/hackathon-openbci-2

Repository files navigation

MindTunes

Our product aims to provide a solution for each unique user to remain concentrated by taking a short test, and determining what genre of music is optimal for the user to stay concentrated.

Description

A common problem faced by many people on focusing for extended periods of time while working on tedious or monotonous tasks. Our product aims to provide a solution for each unique user to remain concentrated by taking a short test, and determining what genre of music is optimal for the user to stay concentrated. Using Logistic Regression and $L_1$ Regularization we trained our own model, and output a number between 0 and 1 as the ” concentration” score. Where 1 leans towards being more concentrated and 0 leans towards not concentrated. Using the Open BCI Cap Kit, we measured the brain waves of the user, and determined if the user was concentrated or not, we also used ML models to plot and predict the best genre of music depending on the highest score achieved. The final product includes a web app that asks the user a few questions to get a genre of music interests of the user, then a short typing test to serve as a concentration test while a music track is played from each of the genres, and the concentration score is measured by the model (user is wearing the cap), then an extra test with no music as that's also an option, finally we get a genre of music that the user performed the best on. One way to upscale this product is to include a playlist from top genre or maybe top 2 depending on the user's interests, meaning we offer a bit more flexibility too.

Screenshots

Survey Concentration Test Results Data

Getting Started

Required Hardware

  • You are required to have the Open BCI Cap kit in order to get the most accurate concentration score and an accurate recommendation.
  • Best to take test in a quiet environment

Dependencies

  • All packages found in pyproject.toml are required in order to run the code.
  • You can install all the dependencies by running the following command in your terminal:
poetry install

Execution

Feel free to tinker with the notebooks in the root directory, but in order to tun the web app, follow the following steps:

  1. Follow instructions in the Cap Kit to ensure all brain activity will be recorded accurately
  2. Wear Cap and connect the Bluetooth device to computer
  3. Clone this repository to your local machine
  4. Edit the serial port in .env to the port that the Open BCI Cap Kit is connected to. On linux, you can find the port by running ls /dev/tty* in your terminal and looking for the port that is connected to the Open BCI Cap Kit. On Mac, you can find the port by running ls /dev/cu.* in your terminal and looking for the port that is connected to the Open BCI Cap Kit. On Windows, you can find the port by running mode in your terminal and looking for the port that is connected to the Open BCI Cap Kit.
  5. In Terminal, navigate to the app directory in this repository
  6. Run the following command in your terminal:
python3 main.py
  1. Open your web browser and navigate to http://127.0.0.1:8080

Help

Make sure you know what port is being connected for the kit to initialize properly and record data accurately, the link is below for the exact location based on Mac/Linux/Windows OS.

IF YOUR BOARD IS NOT FUNCTIONING OR RECORDING DATA THERE ARE 2 POTENTIAL PROBLEMS ONLY.

  • Batteries are dead, replace them ASAP
  • Wiring is not correct, refer back to the Setup link to set up the correct wires to the correct numbers and place on the cap.

FINAL ASSISTANCE:

Unplug all wiring, and restart or wait for board to cool down.

Authors

Contributor names and contact info:

Version History

  • 0.1
    • Initial Release

Acknowledgments

About

An app that uses an OpenBCI Cap to help the user pick the the music genre for optimal concentration

Topics

Resources

Stars

Watchers

Forks