To execute the full multimodal emotion recognition pipeline locally:
python -m metaflow run flows/emotion_flow.py \
--root /path/to/data \
--modality_policy eeg_video \
--epochs 10 \
--batch_size 2python flows/emotion_flow.py run \
--root /Users/adityashah/Documents/PhD/PhD/data \
--modality_policy eeg_video \
--epochs 10 \
--batch_size 2 \
--plot_curves True \
--regen_features FalseYou can also run it inside a Jupyter Notebook / Colab:
!python flows/emotion_flow.py run --root /path/to/data --modality_policy eeg_videoor Metaflow magic:
%run flows/emotion_flow.py --root /path/to/data --modality_policy eeg_videoYour dataset root directory must follow this structure:
ROOT/
βββ P1/
β βββ P1_annotation.csv (or .xlsx)
β βββ P1_eeg.csv
β βββ *.mp4 (video files)
β
βββ P2/
β βββ P2_annotation.csv
β βββ P2_eeg.csv
β βββ *.mp4
β
βββ ...
Notes:
- Annotation file must contain timestamp + emotion labels.
- Each MP4 contains continuous video for that participant.
- EEG is raw Muse (27-channel) time-series data.
After running the flow, you will find:
outputs/features/*.npz
Preprocessed 5-second aligned multimodal windows (video embeddings, log-mel audio, EEG features).
checkpoints/mm_emotion_metaflow.pt
Saved multimodal fusion transformer weights.
outputs/train_loss_curve.png
outputs/val_acc_curve.png
outputs/confusion_matrix.png
outputs/*.csv
Includes:
- Confusion matrix (PNG + CSV)
- Classification report
- Per-class metrics (precision/recall/F1)
- Training/validation learning curves