Dataset Viewer
The dataset viewer is not available for this dataset.
Cannot get the config names for the dataset.
Error code:   ConfigNamesError
Exception:    BadZipFile
Message:      File is not a zip file
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 66, in compute_config_names_response
                  config_names = get_dataset_config_names(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/inspect.py", line 161, in get_dataset_config_names
                  dataset_module = dataset_module_factory(
                                   ^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/load.py", line 1207, in dataset_module_factory
                  raise e1 from None
                File "/usr/local/lib/python3.12/site-packages/datasets/load.py", line 1182, in dataset_module_factory
                  ).get_module()
                    ^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/load.py", line 645, in get_module
                  module_name, default_builder_kwargs = infer_module_for_data_files(
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/load.py", line 299, in infer_module_for_data_files
                  split: infer_module_for_data_files_list(data_files_list, download_config=download_config)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/load.py", line 243, in infer_module_for_data_files_list
                  return infer_module_for_data_files_list_in_archives(data_files_list, download_config=download_config)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/load.py", line 270, in infer_module_for_data_files_list_in_archives
                  f.split("::")[0] for f in xglob(extracted, recursive=True, download_config=download_config)
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/utils/file_utils.py", line 1050, in xglob
                  fs, *_ = url_to_fs(urlpath, **storage_options)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/fsspec/core.py", line 395, in url_to_fs
                  fs = filesystem(protocol, **inkwargs)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/fsspec/registry.py", line 293, in filesystem
                  return cls(**storage_options)
                         ^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/fsspec/spec.py", line 80, in __call__
                  obj = super().__call__(*args, **kwargs)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/fsspec/implementations/zip.py", line 62, in __init__
                  self.zip = zipfile.ZipFile(
                             ^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/zipfile/__init__.py", line 1354, in __init__
                  self._RealGetContents()
                File "/usr/local/lib/python3.12/zipfile/__init__.py", line 1421, in _RealGetContents
                  raise BadZipFile("File is not a zip file")
              zipfile.BadZipFile: File is not a zip file

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

# CAS_EEG Dataset Documentation

1. Dataset Overview

CAS_EEG is an EEG-audio paired dataset for auditory target detection under continuous background noise. Participants listened to 120-second stimulus streams containing target events, non-target events, overlapping events, and pure background segments. The dataset covers the full pipeline from source audio and stimulus-generation scripts to participant-level raw/preprocessed EEG and final aligned EEG-audio samples.

1.1 Core Statistics (from unified_metadata_cleaned.csv)

  • Number of participants: 16 (S01-S16)
  • Total aligned samples: 49,313
  • Target samples: 8,875
  • Button-press samples: 8,758
  • Overlap-event samples: 11,053
  • Background samples (category_1=background): 16,056

Notes:

  • These statistics are computed from 04_EEG_Audio_Paired_Dataset/eeg_sound_pairs_aligned/unified_metadata_cleaned.csv.
  • Sample counts are not identical across participants; see per-subject files in split_metadata.

2. Directory Structure

CAS_EEG/
|- 01_Resources/
|  |- paradigm.py / paradigm.psyexp
|  |- generate_stimulus.py
|  |- create_trigger_schedule.py
|  |- trigger_map.py / trigger_map.csv
|  \- preprocess_audio.py
|- 02_Source_Audio/
|  \- unified_dataset/
|     |- metadata.csv
|     |- target/...
|     |- nontarget/...
|     \- Wind_150s/
|- 03_Participants/
|  \- S01...S16/
|     |- audio_stimuli/
|     |- behavioral/
|     |- eeg_raw/
|     \- eeg_preprocessed/
\- 04_EEG_Audio_Paired_Dataset/
   |- eeg_sound_pairs_aligned/
   |  |- unified_metadata.csv
   |  |- unified_metadata_cleaned.csv
   |  |- split_metadata/
   |  \- S01...S16/
   \- sound_event_clips_aligned/
      \- S01...S16/

3. Experiment and Stimulus Design

3.1 Per-trial Configuration

According to 01_Resources/generate_stimulus.py, each trial is configured as follows by default:

  • Duration: 120 seconds
  • Total events: 80
  • Event duration: 1 second
  • Minimum inter-event interval: 0.2 seconds
  • Maximum inter-event interval (sampling constraint): 2.0 seconds
  • Number of overlap pairs: 20 pairs (40 events involved in overlaps)
  • SNR conditions: 0 dB (high) and -10 dB (low)
  • Background: babble noise + wind noise (random crops and overlay)

Output files per trial:

  • trial_X.wav: synthesized 120-second stimulus
  • trial_X_log.csv: event-level category/onset/SNR/overlap relations
  • trial_X_pure_noise_onsets.txt: start times of 1-second pure background segments
  • trial_X_schedule.csv: final trigger schedule for experiment presentation

3.2 Target-category Notes

  • Example target categories in scripts include gunshot, glassbreak, and babycry.
  • Because some stages may include adjusted versions (for example adjusted log/schedule), use explicit metadata labels (especially is_target) as the source of truth during analysis.

4. Trigger Encoding

Trigger semantics are defined in trigger_map.csv and trigger_map.py. Main rules:

  • Single events: 1-115 (low/high SNR are encoded separately)
  • Non-target overlaps NT+NT: 120-123
  • Target+non-target overlaps T+NT: 180-183
  • Special triggers:
    • 250: participant button response
    • 253: start of pure background segment
    • 254: trial start
    • 255: trial end

Recommendation:

  • For training and evaluation, avoid relying only on numeric trigger codes. Prefer explicit metadata fields such as is_target, is_overlap, and pressed.

5. Modalities and File Formats

5.1 Raw EEG

Path: 03_Participants/Sxx/eeg_raw/

  • .cdt / .ceo / .dpa: acquisition-system raw files
  • readme.txt: participant-level acquisition notes

5.2 Preprocessed EEG

Path: 03_Participants/Sxx/eeg_preprocessed/

  • merged_120s_icaed_removed.set: preprocessed continuous EEG (EEGLAB)
  • EEG_events.csv: event list (including fields such as type and latency)
  • pressed/ and unpressed/:
    • condition-split .set files (target/non-target/SNR/overlap/background/button, etc.)

5.3 Participant Stimuli and Behavioral Logs

Path: 03_Participants/Sxx/audio_stimuli/ and 03_Participants/Sxx/behavioral/

  • Each participant usually contains 40 trial audio files and logs
  • behavioral stores PsychoPy exports (.csv/.log/.psydat)

5.4 Final Aligned Dataset

EEG Segments

Path: 04_EEG_Audio_Paired_Dataset/eeg_sound_pairs_aligned/Sxx/

Further organized by class and response:

  • target/pressed, target/unpressed
  • nontarget/pressed, nontarget/unpressed
  • background/pressed, background/unpressed

File extension: .npy (EEG segment)

Corresponding Audio Segments

Path: 04_EEG_Audio_Paired_Dataset/sound_event_clips_aligned/Sxx/

Directory layout mirrors EEG aligned folders, with .wav files.


6. Metadata Description

6.1 Unified Metadata Files

  • 04_EEG_Audio_Paired_Dataset/eeg_sound_pairs_aligned/unified_metadata.csv
  • 04_EEG_Audio_Paired_Dataset/eeg_sound_pairs_aligned/unified_metadata_cleaned.csv

Compared with unified_metadata.csv, the cleaned version adds a reject field to mark samples recommended for exclusion.

6.2 Field Dictionary

Field Type Description
subject_id string Participant ID (for example S01)
eeg_filename string EEG-segment filename (.npy)
eeg_path string Relative path of EEG segment
sound_clip_path string Relative path of corresponding audio clip (.wav)
pressed bool Whether a behavioral button response occurred in this event window
trial_id int Trial index
onset_s float Event onset within trial (seconds)
trigger int Trigger value
lag_seconds float Alignment lag (seconds)
is_target bool Whether this is a target event
is_overlap bool Whether this is an overlap event
sound_filename_1 string Source audio filename of event 1
category_1 string Category of event 1 (background indicates pure-background segment)
snr_db_1 float SNR of event 1 (dB)
sound_filename_2 string/empty Source audio filename of event 2 in overlaps
category_2 string/empty Category of event 2 in overlaps
snr_db_2 float/empty SNR of event 2 in overlaps
reject bool Available only in cleaned metadata; recommended exclusion flag

Notes:

  • For non-overlap events, *_2 fields are typically empty.
  • Background segments usually have category_1=background and trigger 253.

7. Reproducible Build Workflow

Recommended minimum workflow (run scripts in the relevant folder):

  1. Normalize audio format (44.1 kHz, 16-bit, mono)
  2. Generate trial stimuli and trial logs
  3. Generate trigger map and per-trial schedules
  4. Run PsychoPy experiment (paradigm.py / paradigm.psyexp)
  5. Preprocess EEG and epoch/segment data
  6. Align EEG segments with audio segments and export unified metadata

Example commands (adjust paths to your environment):

python 01_Resources/preprocess_audio.py
python 01_Resources/generate_stimulus.py
python 01_Resources/trigger_map.py
python 01_Resources/create_trigger_schedule.py

8. Quick Loading Example

import os
import numpy as np
import pandas as pd

root = r"d:\CAS_EEG"
meta_path = os.path.join(root, "04_EEG_Audio_Paired_Dataset", "eeg_sound_pairs_aligned", "unified_metadata_cleaned.csv")
meta = pd.read_csv(meta_path)

# Keep only valid samples if reject exists
if "reject" in meta.columns:
    meta = meta[meta["reject"].astype(str).str.upper() != "TRUE"]

# Load one sample
row = meta.iloc[0]
eeg = np.load(os.path.join(root, "04_EEG_Audio_Paired_Dataset", "eeg_sound_pairs_aligned", row["eeg_path"]))

print("subject:", row["subject_id"])
print("shape:", eeg.shape)
print("target:", row["is_target"], "pressed:", row["pressed"], "trigger:", row["trigger"])

11. Citation and License

11.1 Citation

11.2 License and Ethics

  • This dataset is released under the Apache License, Version 2.0. The full license text is included in the repository file LICENSE and can also be found at http://www.apache.org/licenses/LICENSE-2.0.

  • The data collection procedure involved in creating this dataset was conducted in accordance with the Declaration of Helsinki. The study protocol was reviewed and approved by the Ethics Committee of Beijing Institute of Technology (Approval ID: BIT-EC-H-2024150). All participants provided informed consent prior to their involvement.

Downloads last month
352