Giter VIP home page Giter VIP logo

frowning-bias's Introduction

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:

Directory Structure: see ./tree.txt

Splits:

  • baseline splits at ./data/RAF/splits. generated by split.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 runs train.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.
  • Statistical analysis & figures: generated externally using Google Sheets. See here.

Credits:

  1. https://github.com/zachmurphy1/transformer-radiographs

frowning-bias's People

Contributors

liamjwang avatar kvenkatesh5 avatar lu-david avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.