How kazabana/pr-pl works
Project type and purpose
• This is a research‐oriented machine‐learning pipeline for EEG‐based emotion recognition, not a typical web or microservices app.
• It implements the PR-PL (Prototypical Representation based Pairwise Learning) framework in PyTorch, plus a domain adversarial training module.
File structure
• Top-level scripts:
• data_prepare_seed.m – MATLAB script to download/prepare raw SEED/SEED-IV EEG data
• feature_wrap.m – MATLAB function to extract or wrap features from preprocessed EEG signals
• implementation_PR_PL.py – main Python pipeline that orchestrates data loading, training, evaluation
• model_PR_PL.py – PyTorch module defining the backbone network and prototypical/pairwise learning losses
• Adversarial.py – Python module implementing domain adversarial training (built on dalib)
• No nested directories; clear separation between data prep (MATLAB) and model training (Python).
Key insights from the README
• Dependencies: Python 3.7, PyTorch 1.3.1, CUDA 9.2, NumPy, Sci-Kit Learn, SciPy
• Workflow:
a) Run MATLAB scripts to prepare and wrap features from raw EEG
b) Configure paths in implementation_PR_PL.py
c) Launch Python training pipeline, which calls model_PR_PL.py and Adversarial.py
• Acknowledges use of dalib for adversarial components.
Elements
• Green for model/training modules (Python)
• Orange for external libs (dalib)