Code Monkey home page Code Monkey logo

hackathon-openbci-2's Introduction

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

hackathon-openbci-2's People

Contributors

raychen256 avatar ericyuxuanye avatar rohan-pandey1729 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.