Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install hiyenwong-ai-collection-collection-skills-eeg2vision-multimodal-eeg-based-framework-2d-vgit clone https://github.com/hiyenwong/ai_collection.gitcp ai_collection/SKILL.MD ~/.claude/skills/hiyenwong-ai-collection-collection-skills-eeg2vision-multimodal-eeg-based-framework-2d-v/SKILL.md---
name: eeg2vision-multimodal-eeg-based-framework-2d-visual
description: "Multimodal EEG-to-image reconstruction framework using diffusion models. Reconstructs 2D visual stimuli from EEG signals. Activation: eeg2vision, eeg image reconstruction, eeg visual decoding, brain-to-image, eeg-to-image"
---
# EEG2Vision: Multimodal EEG-Based Framework for 2D Visual Reconstruction
## Overview
EEG2Vision is a multimodal framework for reconstructing 2D visual stimuli from non-invasive electroencephalography (EEG) signals. It leverages diffusion models and cross-modal alignment to translate brain activity into visual representations.
## Source Paper
- **Title:** EEG2Vision: A Multimodal EEG-Based Framework for 2D Visual Reconstruction in Cognitive Neuroscience
- **arXiv: 2604.08063v1
- **Date:** 2026-04-09
- **Authors:** Emanuele Balloni, Emanuele Frontoni, Chiara Matti et al.
- **PDF: https://arxiv.org/pdf/2604.08063v1
## Core Concepts
### EEG Feature Extraction
- Raw EEG signals to band power features (delta, theta, alpha, beta, gamma)
- Spatial filtering using CSP (Common Spatial Patterns) or Laplacian
- Temporal feature aggregation across fixation windows
### Cross-Modal Alignment
- EEG features to latent space alignment with visual features
- CLIP-based image-text embeddings as bridge modality
- Contrastive learning for EEG-image feature matching
### Diffusion-Based Reconstruction
- Text-to-image diffusion models (Stable Diffusion) as backbone
- EEG-conditioned latent diffusion for visual reconstruction
- Prompt-guided enhancement using decoded semantic categories
## Workflow
EEG Recording to Feature Extraction to Latent Alignment to Diffusion Reconstruction to Image Output
### Step 1: Preprocessing
```python
import mne
import numpy as np
def preprocess_eeg(raw_data, sfreq=250):
raw_data.filter(1, 45, method='iir')
epochs = mne.Epochs(raw_data, events, tmin=0, tmax=1.0)
ica = mne.preprocessing.ICA(n_components=20)
ica.fit(epochs)
ica.exclude = [0, 1]
clean = ica.apply(epochs)
return clean
```
### Step 2: Feature Extraction
```python
def extract_eeg_features(epochs):
freq_bands = {'delta': (1, 4), 'theta': (4, 8), 'alpha': (8, 13), 'beta': (13, 30), 'gamma': (30, 45)}
features = []
for band, (low, high) in freq_bands.items():
power = epochs.compute_psd(method='welch', fmin=low, fmax=high).get_data()
features.append(power.mean(axis=-1))
return np.concatenate(features, axis=1)
```
### Step 3: Cross-Modal Mapping
```python
import torch
class EEGToCLIPMapper(torch.nn.Module):
def __init__(self, eeg_dim, clip_dim=512):
super().__init__()
self.encoder = torch.nn.Sequential(
torch.nn.Linear(eeg_dim, 1024),
torch.nn.ReLU(),
torch.nn.Linear(1024, clip_dim),
torch.nn.LayerNorm(clip_dim)
)
def forward(self, eeg_features):
return self.encoder(eeg_features)
```
## Applications
- BCI Communication: Decode visual imagery for locked-in patients
- Dream Recording: Reconstruct visual content during sleep
- Neuroscience Research: Study visual processing pathways
- Cognitive Assessment: Evaluate visual memory and perception
## Limitations
- Spatial resolution limited by EEG (compared to fMRI/ECoG)
- Requires individual subject calibration
- Reconstruction quality depends on training data alignment
- Currently limited to 2D images
## Related Skills
- eeg2vision-multimodal-eeg-framework-v2
- brain-dit-fmri-foundation-model
- meta-learning-in-context-brain-decoding
## Activation Keywords
- eeg2vision, eeg image reconstruction, eeg visual decoding, brain to image, eeg to image, visual reconstruction