Skip to content

Latest commit

 

History

History
102 lines (78 loc) · 3.89 KB

File metadata and controls

102 lines (78 loc) · 3.89 KB

EEG Annotation Tool integration

The released models can be used by the IED Finder in SenuaLab/EEGAnnotationTool. The Hugging Face model repository contains app-ready folders with executable architecture code, a sanitized PyTorch checkpoint, a manifest, and hashes.

Install the model pack

From this repository:

python scripts/install_eeg_annotation_models.py \
  --models iednet_lite resnet_attention

For a source checkout of EEG Annotation Tool, pass its model directory:

python scripts/install_eeg_annotation_models.py \
  --models-dir /path/to/EEGAnnotationTool/model \
  --models iednet_lite resnet_attention

Installed Windows builds normally use:

%LOCALAPPDATA%\EEG Annotation Tool\models\

The application environment variable EEG_ANNOTATION_TOOL_MODELS_DIR can override model discovery. The installer never uploads or modifies EEG data.

Supported profiles

Folder Rate Input Channels Extra dependency
senua_iednet_lite 250 Hz 1,000 samples / 4 s 19 None beyond app runtime
senua_resnet_attention 250 Hz 1,000 samples / 4 s 19 None beyond app runtime
senua_eegpt 250 Hz 1,000 samples / 4 s 19 braindecode==1.6.1
senua_eegpt_linear_probe 250 Hz 1,000 samples / 4 s 19 braindecode==1.6.1
senua_eegdino_medium 200 Hz 800 samples / 4 s 19 braindecode==1.6.1

The Core/Full application runtime currently includes PyTorch, MNE, SciPy, and the dependencies needed for the first two profiles. For foundation models in a source environment, install:

python -m pip install "braindecode[hub]==1.6.1"

What IED Finder validates

The adapter declares:

  • 19-channel standard 10-20 order.
  • T7/T8/P7/P8 aliases for T3/T4/T5/T6.
  • Four-second full-window requirement.
  • Model-specific temporary sampling rate.
  • Common-average reference.
  • 1-45 Hz band-pass filtering.
  • Global window z-score normalization and clipping.
  • Validation-selected default threshold.
  • Binary class order [Non-IED, IED].

IED Finder previews missing/excluded channels and preprocessing differences before scanning. A compatibility warning is not a validation result; the user must confirm the recording and preprocessing protocol.

Review workflow

  1. Open the recording and verify channel names, units, sampling rate, and segment order.
  2. Open IED Finder and select the installed SenuaLab model.
  3. Review every compatibility message and use the model-declared rate/window.
  4. Start with the validation-selected threshold. Do not lower it solely to make local results look better.
  5. Inspect each candidate against the raw signal, montage alternatives, artifacts, and clinical context.
  6. Save only reviewed annotations. Automated candidates are not ground truth.

Security

Model Python is executable code. Install only from the official SenuaLab Hugging Face repository, verify MANIFEST.json hashes, and do not load untrusted .pth files. The model-pack checkpoints contain only reviewed public metadata and tensors, but PyTorch checkpoint formats should still be treated as trusted-source artifacts.

Troubleshooting

  • Model not listed: confirm the folder is directly below the active model directory and contains one .py plus one .pth file.
  • Missing channels: rename/match the required 10-20 channels or use the supported temporal aliases; do not synthesize absent channels silently.
  • Size mismatch: delete the partial folder and reinstall the exact model pack. Do not pair code from one model with another checkpoint.
  • Missing Braindecode: install the optional dependency into the same Python environment that launches EEG Annotation Tool, or select a lightweight model.
  • Unexpected detection rate: verify units, reference, filtering, channel order, window rate, and whether preprocessing was already applied.