explaingit

facebookresearch/dance

22PythonAudience · researcherComplexity · 4/5Setup · hard

TLDR

A Meta AI research library that automatically finds and labels meaningful moments in raw EEG brain recordings using a neural network, covering P300 brain responses, imagined hand movements, and seizure events without manual preprocessing.

Mindmap

mindmap
  root((DANCE EEG))
    What it does
      EEG event detection
      Neural network model
      Time-series analysis
    Tech stack
      Python
      Neural network
      SLURM
    Use cases
      P300 detection
      Seizure detection
      Movement classification
    Audience
      Neuroscience researchers
      BCI developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Detect P300 brain response events in raw EEG recordings without writing any manual preprocessing code.

USE CASE 2

Classify imagined hand movements from EEG data using the provided neural network model and example dataset.

USE CASE 3

Add your own EEG dataset by writing a small configuration file and running the existing model on it without changing model code.

USE CASE 4

Dispatch model training on large EEG datasets to a computing cluster using SLURM job scheduling with a single flag change.

Tech stack

PythonPyTorchSLURM

Getting it running

Difficulty · hard Time to first run · 1h+

Requires EEG datasets in a compatible format, large-scale training needs a SLURM-enabled compute cluster or significant local GPU resources.

No license information is provided in the explanation.

In plain English

DANCE is a research tool from Meta's AI research team for automatically finding and labeling specific moments in brain activity recordings. These recordings, called EEG, measure the electrical signals produced by the brain through sensors placed on the scalp. EEG data is a continuous stream, and identifying the precise moments where a meaningful event occurs, such as the brain responding to a visual stimulus or the start of a seizure, normally requires manual annotation or complex preprocessing. DANCE is designed to skip those preprocessing steps and work directly from the raw signal. The system processes a window of raw EEG data in a single pass through a neural network and outputs a list of predicted events, each with a start time, an end time, and a category label. The approach borrows techniques originally developed for detecting objects in images and adapts them for time-series brain data. Three types of tasks are demonstrated in the README: detecting when a brain responds to a particular visual target (a P300 response), classifying imagined hand movements, and identifying seizure events. Performance numbers for all three are included. The codebase is packaged as a Python library that researchers can install and use with their own datasets. Three example datasets are provided and can be run with a single command to verify the setup. Adding a new dataset mostly requires writing a small configuration file rather than modifying the model code. Training on large datasets can be dispatched to a computing cluster using a common job scheduling system called SLURM, or run locally on a single machine with a flag change. This is academic research software published alongside a paper. It is intended for neuroscience and brain-computer interface researchers rather than general users.

Copy-paste prompts

Prompt 1
I'm a neuroscience researcher. Help me install the DANCE library and run the included P300 example dataset to verify my setup is working.
Prompt 2
Show me how to write a dataset configuration file for DANCE so I can train it on my own EEG seizure recordings.
Prompt 3
I want to train DANCE on a large EEG dataset using our SLURM cluster. Give me the command and config changes needed to dispatch the job.
Prompt 4
Explain how DANCE borrows object-detection techniques from computer vision and applies them to find events in EEG time-series data.
Open on GitHub → Explain another repo

← facebookresearch on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.