Code Monkey home page Code Monkey logo

contextual-bias's Introduction

Does Data Repair Lead to Fair Models? Curating Contextually Fair Data To Reduce Model Bias (WACV 2022)

This is the code accompanying the paper Does Data Repair Lead to Fair Models? Curating Contextually Fair Data To Reduce Model Bias published in IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), 2022.

Usage

Clone the repo:

git clone https://github.com/sumanyumuku98/contextual-bias.git

Create Conda env:

conda env create -f fair.yml

Activate the conda env:

conda activate fair.yml

Dataset

Download the COCO 2017 annotations and create a symlink:

cd data
ln -s /path to annotations/ .

Visualizing Contextually Biased Categories

Generate a barplot for the protected attribute/class w.r.t other co-occuring classes:

python genPlt.py --data_mode train --bias_class man

The above example generates co-occuring distribution for man. The generated barplots will be saved in out_figures.

Curating Contextually Fair Data

To curate contextually fair data for a protected attribute and fixed budget w.r.t to either topK, bottomK and custom co-occuring categories use:

python fairSelection.py --data_mode train --bias_class cup --budget 500 --k 10

The above example curates fair data for protected class cup with a budget of 500 and co-occuring classes being the top 10. The selected ids are saved in out_files.

Citation

If you find the work useful, do cite:

@InProceedings{Agarwal_2022_WACV,
    author    = {Agarwal, Sharat and Muku, Sumanyu and Anand, Saket and Arora, Chetan},
    title     = {Does Data Repair Lead to Fair Models? Curating Contextually Fair Data To Reduce Model Bias},
    booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
    month     = {January},
    year      = {2022},
    pages     = {3298-3307}
}

Contact

If there are any questions or concerns feel free to send a message at [email protected]

contextual-bias's People

Contributors

sharat29ag avatar sumanyumuku98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sharat29ag

contextual-bias's Issues

waiting for your code

I am very interested in your research and hope to see your work and code as soon as possible!

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.