Final Report: ./Final_Project_Submission.ipynb
Setup:
mamba env create -f environment.yml
conda env create -f environment.yml
If you are using local GPU, use ./environment_GPU.yml
instead.
Links:
- https://www.ugrad.cs.jhu.edu/~dlu17/README.txt
- https://www.ugrad.cs.jhu.edu/~dlu17/list_patition_label.txt
- https://www.ugrad.cs.jhu.edu/~dlu17/aligned_train.zip
- https://www.ugrad.cs.jhu.edu/~dlu17/aligned_test.zip
- https://www.ugrad.cs.jhu.edu/~dlu17/original.zip
- https://drive.google.com/drive/folders/0B4E10azXECctYU5zYXRnbDdtMWM?resourcekey=0-hF-Mu5W-DSA2NmmEPXSTSg
Directory Structure: see ./tree.txt
Splits:
- baseline splits at
./data/RAF/splits
. generated bysplit.py
Notebooks:
- EDA available at
./notebooks/raf_eda
.
How to use this repository:
- Downloading data: Run the
./download_data.py
file. See./notebooks/colab.ipynb
for an example of setting up the local directory on colab using our scripts. - Split dataset: Run the
./split.py
file. It is random seeded, so should produce same scripts as used in our project. - Exploratory data analysis: See
./notebooks/raf_eda.ipynb
. - Hyperparameter search: Run the script
./scripts/hparam.sh
. Update the for loop to include the hyperparameters of interest. This file runstrain.py
and saves the models/stats to the specified results folder. (train.py
uses the train/val "subsplit" instead of the original train/test split, this is only used for hparam searching) - Model training & evaluation:
- Baseline: Run the
train_all.py
script with specified settings. See./scripts/baseline/train_baseline.sh
for an example. Evaluation script available at./scripts/baseline/eval_baseline.sh
. - Resampling Technique: Run the
train_all.py
script but now give parameters--equalized-by
and--equalized-how
flags. See./scripts/fairness1/train.sh
for an example. Evalution script available at./scripts/fairness1/eval_single_attr.sh
. - Pixel Inversion: Run the
train_all_inversion.py
script. - Attribute Aware: Run the
train_all_attraware.py
script. See./scripts/fairness3
for examples. - Affirmative Action: Run the
train_all_affraction.py
script. See./scripts/fairness2/train_affraction.sh
and./scripts/fairness2/eval_affraction.sh
. - Note: for all prediction & evaluation, you will need to update model names with your own local names. Use the provided scripts as a template.
- Baseline: Run the
- Statistical analysis & figures: generated externally using Google Sheets. See here.
Credits: