Views
No views yet
1from transformers import AutoModel
2
3pos_bank = AutoModel.from_pretrained("brain-bzh/reve-positions", trust_remote_code=True)
4
5
6eeg_data = ... # EEG data (batch_size, channels, time_points), must be sampled at 200 Hz
7electrode_names = [...] # List of electrode names corresponding to the channels in eeg_data
8
9positions = pos_bank(electrode_names) # Get positions (channels, 3)
10
11model = AutoModel.from_pretrained("brain-bzh/reve-base", trust_remote_code=True)
12
13## Expand the positions vector to match the batch size
14positions = positions.expand(eeg_data.size(0), -1, -1) # (batch_size, channels, 3)
15
16output = model(eeg_data, positions)pos_bank.get_all_positions(), and can be visualized here.biosemi128_ before the electrode names (e.g., biosemi128_C13).