File size: 3,341 Bytes
67f4ae5 698b4ae 67f4ae5 2f33b40 5280315 2f33b40 5280315 2f33b40 698b4ae | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | ---
license: cc-by-nc-4.0
---
# README
## Dataset Structure
```text
HCFSLN
├── Code
├── Dataset
├── Feature_Extraction
└── readme.txt
```
The dataset is organized into folders based on feature type.
Within the Dataset folder:
Dataset --> M2AD --> Audio, EDA, PPG, Video, Label.csv
- Audio: Contains spectral, temporal, and frequency-based features extracted using `librosa`.
- EDA: Contains skin conductance levels (SCL) and peaks.
- PPG: Includes clean PPG signals processed using `NeuroKit`.
- Video: Includes facial expression features such as Action Units (AUs), head pose, and eye gaze, extracted with `OpenFace`.
- Label.csv: Provides participant identifiers and experimental conditions.
All feature files and labels should be placed in their respective folders before running the notebooks.
Each CSV file follows a standardized naming convention, for example:
P7_audio_features.csv
Here, P7 represents a participant identifier, ensuring easy correlation across modalities. For instance:
- P7_audio_features.csv contains extracted audio features for participant P7.
- P7_video_features.csv contains facial expression features for participant P7.
- Similarly for P7_eda_features.csv and P7_ppg_features.csv.
## Feature Extraction
Use the provided Jupyter notebooks for feature extraction:
- Audio_Features_Extraction.ipynb: Extracts audio features using `librosa`.
- EDA_Cleaning_Components.ipynb: Processes EDA signals using `NeuroKit`.
- PPG_Cleaning.ipynb: Extracts PPG signals.
Video features are extracted using OpenFace. Provide the full dataset path, and it will extract raw features from the raw video files.
OpenFace repository: https://github.com/TadasBaltrusaitis/OpenFace
Ensure extracted files are saved in their designated folders inside the Feature_Extraction directory.
## Code
The Code folder contains:
- Baseline models and our proposed model implementations.
- Utility scripts (utils.py), runner (runner.py), and configuration (config.py).
config.py is used to set parameters and select feature lists. Each model .py file also initializes its own parameters.
Baseline models include:
cplnet.py, emotracer.py, eshms.py, hyperboliccontrastive.py, nohub.py, and tamnet.py.
All plotting and evaluation code is in utils.py. The main execution is handled by runner.py.
### Important Paths to Set in config.py
ROOT_DATA = "" # Root directory where dataset folders (e.g., D1, D2, D3) are stored
RESULTS_ROOT = "results" # Directory for detailed results per run (e.g., CSVs, t-SNE plots)
FINAL_ROOT = "final" # Directory where aggregated final results are saved
## HCFSLN Model (Our Model)
Run hcfsln.py separately to store results. Provide paths to each modality folder and label CSV separately, e.g.:
audio_folder = '/home/Audio'
eda_folder = '/home/EDA'
ppg_folder = '/home/PPG'
video_folder = '/home/Video'
labels_path = '/home/Label.csv'
## Ablation Studies
For ablation experiments, set the dataset path in hcfsln_ablation.py and run it. All ablation experiments are included there.
## Usage Guidelines
- Install required dependencies (librosa, NeuroKit) before processing.
- Place extracted features and labels in the correct folder structure before running models.
- Please cite relevant tools and datasets when using this work. |