Giter VIP home page Giter VIP logo

neurosity's Introduction

Brain Computer Interface Foundation Model Benchmark

Neurosity EEG Dataset

Welcome to the Neurosity EEG Dataset repository, a comprehensive and curated compilation of brain-computer interface (BCI) data meticulously collected through the advanced Neurosity Crown 3 device. This dataset is designed to foster research and development in the fields of neuroscience, cognitive science, machine learning, and beyond. By providing high-quality, preprocessed EEG signals, we aim to support and accelerate innovations in brain-computer interface technologies and the understanding of neural dynamics.

Dataset Overview

The Neurosity EEG Dataset comprises 133 individual BCI sessions, aggregating a refined selection from over ten million rows of raw data captured by the Neurosity Crown 3 EEG device. The dataset is formatted to support both academic researchers and technology developers with an interest in EEG and BCI applications.

Key Features:

  • Total Sessions: 133
  • Total Data Points: 10,983,584 rows (cleaned and aggregated)
  • Channels: 8 (CP3, C3, F5, PO3, PO4, F6, C4, CP4)
  • Device Information:
    • Nickname: Crown-0DB
    • Manufacturer: Neurosity, Inc
    • Model: Crown 3
  • Sampling Rate: 256 Hz

Data Access

This dataset is stored in CSV format for easy use and accessibility. The data is organized by session, with each session's id marking it apart.

Downloading the Data

The data can be accessed and downloaded through this repository. To clone the repository and fetch the dataset, use the following Git command:

git clone https://github.com/JeremyNixon/neurosity
cd neurosity

and then download the cleaned data zip file from this dropbox url:

macOS and Linux

wget https://www.dropbox.com/scl/fi/3nxrisor9rofbokvzes73/combined_dataset.csv?rlkey=aiqmglls3sj92u6ou4c23uh2d&dl=1

Windows

Invoke-WebRequest -Uri "https://www.dropbox.com/scl/fi/3nxrisor9rofbokvzes73/combined_dataset.csv?rlkey=aiqmglls3sj92u6ou4c23uh2d&dl=1" -OutFile "combined_dataset.csv"

OR via this drive link:

https://drive.google.com/file/d/1V6MTCZU0LJPs3xa1E0HYnN0syWgVsOKU/view?usp=sharing

Session Metadata

The per-session metadata can be found in the uncleaned, raw dataset.

macOS and Linux

wget https://www.dropbox.com/scl/fi/j5x8v2ir7ynalqjoqkc05/bci_dataset.zip?rlkey=9bdojz2hqu9mnngorzr8ti9k2&dl=1

Windows

Invoke-WebRequest -Uri "https://www.dropbox.com/scl/fi/j5x8v2ir7ynalqjoqkc05/bci_dataset.zip?rlkey=9bdojz2hqu9mnngorzr8ti9k2&dl=1"

OR via this drive link:

https://drive.google.com/file/d/1cly_nFFgS_HQK86dsxLbHBbRMawYKW4_/view?usp=sharing

Data Structure

Each data file corresponds to a single EEG session and includes the following columns:

  • Timestamp: Unix timestamp in milliseconds
  • CP3, C3, F5, PO3, PO4, F6, C4, CP4: EEG data from the respective channels

Raw sessions dataset explainer video:

Watch the video

Model Download

Loading & training data is located in

macOS and Linux

wget https://www.dropbox.com/scl/fi/thiwnpzkzy24h68aa6xsv/model_epoch_10.pth?rlkey=hge6ndjyctw89vy3vkudztub6&dl=1

Windows

Invoke-WebRequest -Uri "https://www.dropbox.com/scl/fi/thiwnpzkzy24h68aa6xsv/model_epoch_10.pth?rlkey=hge6ndjyctw89vy3vkudztub6&dl=1" -OutFile "combined_dataset.csv"

Usage Examples

Here are some basic examples of how to load and visualize the EEG data using Python:

Loading Data

import pandas as pd

# Load a single session file
data = pd.read_csv('combined_dataset.csv')
print(data.head())

Embedding Data

def load_model_for_embedding(epoch=10):
    device = "cuda" if torch.cuda.is_available() else "cpu"
    model_path = f'models/model_epoch_{epoch}.pth'
    if not os.path.exists(model_path):
        raise FileNotFoundError(f"No saved model found for epoch {epoch} at {model_path}")
    
    model = ConvTransformerModel().to(device)
    model.load_state_dict(torch.load(model_path, map_location=device))
    model.eval()
    return model

def embed_input(input_tensor):
    """
    Takes an input tensor, processes it through the ConvTransformer model,
    and returns the embedding from the transformer layer.
    """
    device = "cuda" if torch.cuda.is_available() else "cpu"
    model = load_model_for_embedding(epoch=10)
    input_tensor = input_tensor.to(device)
    with torch.no_grad():
        embedding = model(input_tensor)
    return embedding

Basic Plotting

import matplotlib.pyplot as plt

# Plot the EEG data for channel CP3
plt.figure(figsize=(12, 6))
plt.plot(data['Timestamp'], data['CP3'], label='CP3')
plt.title('EEG Data for Channel CP3')
plt.xlabel('Timestamp')
plt.ylabel('Amplitude')
plt.legend()
plt.show()

Contributing

Contributions to this dataset are welcome. Whether it be in the form of additional data, error corrections, usage examples, or even analysis techniques, please feel free to fork this repository, make your changes, and submit a pull request.

Citation

If you use the Neurosity EEG Dataset in your research, please cite it using the following BibTeX entry:

@misc{neurosity_eeg_dataset,
  title={Neurosity EEG Dataset},
  author={Nixon, Jeremy and Keller, AJ},
  year={2024},
  url={https://github.com/JeremyNixon/neurosity}
}

License

This dataset is made available under the MIT License. For more detailed licensing information, please see the LICENSE.md file in this repository.

Contact

For any queries regarding the dataset, please contact [email protected].

We hope that this dataset serves as a valuable resource for your research and development efforts in the exciting field of brain-computer interfaces. Happy exploring!

neurosity's People

Contributors

jeremynixon avatar ashishsardana avatar

Stargazers

 avatar rishabh avatar Nikolaus Schlemm avatar hibikaze avatar Devon 'fire' Adkisson avatar AJ Keller avatar Erik Bjäreholt avatar Steven Syp avatar Salim avatar Sasi Kiran Malladi avatar Aaryaman Yadav avatar Ian Carrasco avatar Adi Jagannathan avatar Subhash Ramesh avatar  avatar muhtasham avatar  avatar Barton Rhodes avatar  avatar Jay-Alexander Elliot avatar Vincent Weisser avatar

Watchers

 avatar  avatar Salim avatar  avatar

Forkers

plurigrid willxxy

neurosity's Issues

Label information

Hello,

Thank you for the great work and publicly releasing the dataset.
I was wondering in your transformer training pipeline file train_transformer.py, what the labels represent.
I was assuming given a time series amplitude of length T, the label is the next T+1 amplitude. Is this a correct assumption?

Thank you,
William Han

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.