GithubHelp home page GithubHelp logo

bci's People

Contributors

kartikchoubisa avatar yash-10 avatar yashsaini2727 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bci's Issues

Potential datasets to use/research

Even though we are initially focusing on the dataset inside the Datasets directory, we could consider replacing/adding or research about some datasets that have more trials from different subjects, for a more comprehensive study. On a higher level, the bigger the dataset, the better, but I think it may not always hold.

For example, see https://www.nature.com/articles/sdata2018211. They say a "large" dataset, so something similar can be discussed.

Note that we are sticking to motor-imagery datasets for now.

Classification using Knowledge-based-systems?

I have heard of this but don't know much about it. They don't use any ML/DL approach but they have some other ways, motivated by science, to classify. The advantage might be that its an approach motivated by science but may come with a cost that it might depend on the electrode under consideration, for example.

For example, see https://doi.org/10.1523/JNEUROSCI.3886-06.2007.

I vaguely recall, imagining right-hand movement could result in a decrease in beta-power. So we could just use this for our classification.

Any advice/ideas/suggestions are welcome!

Researching relevent BCI systems.

Find out the possible brain wave potentials we can use.

  • For example
    * SCPs,
    * SMR,
    * P300 event-related potentials and
    * Steady-State Visual Evoked Potentials (SSVEPs))
    * visually evoked potential (VEP)
    * etc.
  • Find out what exactly will be the difference in the method of signal acquisition and processing for each of the methods mentioned above to configure the BCI such that the device output (rover) can be operated.
  • Make documentation of relevant research papers, books, etc.
  • To be done by 2 people, one in signal acquisition and the other in signal processing.

Visualising EEG signals in real-time

Create a python file with name plot.py that takes in voltage values coming for multiple electrodes and plots them in real-time.
Use random numbers generated at 540 Hz to mimic voltage data coming from an electrode. Plot the voltage against time, which should update in real-time.
There will be multiple such electrodes, so there has to be one such plot for each electrode.

It should look like 'Time Series' section in this image:
https://docs.openbci.com/docs/assets/SoftwareImages/OpenBCISoftware/GUI-V4-Screenshot.jpg

Design a Notch filter

Use Eagle software to build a schematic of the Notch filter.
We will be using OTA notch filters (Gm-C filters) for continuous-time filtering.
[An alternative is an op-amp notch filter but it is mostly for digital signals; to deal with analogue signals to a high degree of accuracy, OTAs are used]
The file is to be submitted as notch_filter.sch

  • the schematic should be of 2nd-Order Gm-C Notch Filter (the higher the order the better)
  • The purpose of a notch filter is to exclude a single frequency from the EEG signal. (in our case it will be 50 Hz)
  • Notch depth should be more than 50 dB.
  • use operational transconductance amplifier (OTA) model OTA LM13700
  • Here is a paper that can be used as a reference. further reading

Utility application in python for plotting the time-series data updated through a serial port.

This application will help us visualize the raw real-time data coming from our eeg headset. This will provide an early check and make sure the data looks familiar, or if each channel is working properly, etc.

Input:

  • EEG data (the voltage for each of the n channels, received through the serial port at a known frequency. For now, we'll mimic this with a simple python function)
  • Frequency at which plot is shown on screen
  • The channels to plot

Output:

  1. A csv, which is contains the eeg data, updated once you get the data.
  2. Plot
    • Store the data in memory, (the last n seconds data that's to be stored)
    • Plot the last n seconds data (as multi channel time series)
    • Make sure the user can change the frequency of showing new plot, (it may or may not be equal to the frequency of incoming data)
    • Remember to delete data that's not shown.

The EEG data:

  • For now, instead of connected computer to the EEG device through a port, we will write a python function to periodically output mock data containing random numbers within a range.
  • Input:
    - Frequency (eg 256 hz default)
    - Max and min voltage
  • Output:
    - an array of n numbers. (consisting of the voltages of the n channels)

In the future we can design other plots and embed the plots with a GUI (like Tkinter).

Designing a band-pass filter

Design the schematic of the 3rd order band-pass filter using EAGLE software.
The file is to be submitted as band_pass_filter.sch

  • (pass-band of 0-100Hz)
  • Use appropriate filter approximations (most likely Butterworth Filter Approximation as it has flat pass-band, monotonic stop-band, and good roll-off and step-response)
  • There are 3 types of bandpass filters:
    * Passive band-pass filters: having a low-pass and a high-pass filter [made using basic circuit components like R, C]
    * Active band-pass filters: having an active low-pass and an active high-pass filter. [made using components like transistors, op-amps]
    * OTA-based band-pass filters.
  • It is recommended (but not necessary) to use OTA based filters instead of op-amp based filters (also called active band-pass filters. [reason was given on #14 ]. Find relevant documentation on the same regardless.
  • Here is a basic tutorial on different passive filters and filtering approximations.
  • Here is the basic circuit for active bandpass filter
  • make the schematic of the high-pass filter and low-pass filter separately.

(Deep Learning) Classification approaches

After exploring some ML approaches, we could think of DL methods, or even do it side-by-side.

  • CNNs were the only ones experimented till now but there are a lot more approaches.
  • Keeping in mind that we would like to learn from a given set of subjects and apply to a new user, transfer learning could allow us to potentially transfer knowledge among subjects.
  • Applications of GANs in BCI.
  • The list could be added further...

Let us post any other approaches here.

Note: We would aim to use PyTorch instead of TensorFlow for developing deep learning models.

EEG component design: Notch filter

Use Eagle software to build a schematic of Notch filter (with a stop-band frequency that can be manually adjusted).
We will be cascading 2 notch filters for better precision.
The file is to be submitted as notch_filter.sch.

  • The output of first notch filter is passed through the second notch filter circuit ( called cascading of circuits )
  • The purpose of a notch filter is to exclude a single frequency from the EEG signal. (in our case it will be 50 Hz)

Improving the dataset

This is regarding this dataset: http://gigadb.org/dataset/100295.

We are using data from only subject01, which includes 100 trials each of left and right Motor Imagery. But we need more examples (trials) to train our model. So we need to edit the code to download and clean data from other subjects.
code: 36c9757

(Machine Learning) Classification approaches

We could start with the dataset currently in the Datasets folder (http://gigadb.org/dataset/view/id/100295) to get an overall idea.

There might be no particular order for experimentation, but we could start with:

  • Linear classifiers since they sometimes work great. For example, linear discriminant analysis (LDA) tries to maximize separation between the classes, here, left and right.
  • KNNs, SVMs (linear or non-linear version), tree-based methods (I am slightly biased towards gradient boosted trees using, say, the XGBoost library).
  • I think there are some projection methods that could also help in classifying data points in a reduced dimensional space (eg: PCA, t-SNE, etc.) without the need to explicitly train and test using ML approaches. These could be semi-supervised or unsupervised and could be used to check if there is really any distinguishing factor between left and right classes.
    • This might be helpful to remove uninteresting features or reduce some noise since the datasets are generally high-dimensional.
  • sklearn might have some methods for unsupervised/semi-supervised methods, for example, k-means clustering.

EEG component design: Band-pass Filters and Amplifiers

Design a schematic, using Eagle, of a filter circuit containing High-pass active filter, Low-pass active filter and a variable amplifier all in series with each other.

  • The band-pass filters should all be second-order filters for better stability of the signals. (Though higher-order circuits are preferred in EEGs for better accuracy, we will continue with second-order circuits for our prototype.)
  • Variable amplifiers should have an op-amp and a variable resistor for ease of control.
  • Values of resistors, capacitors, inductors, voltages, etc. need not be specified unless necessary.
  • Do not simply connect two circuits with a single wire. Separate them by labelling each input and output of the circuits.
  • Submission file format: bandPass_filters.sch

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.