image-crop-analysis

Code for reproducing our analysis in the paper titled: Image Cropping on Twitter: Fairness Metrics, their Limitations, and the Importance of Representation, Design, and Agency

https://github.com/twitter-research/image-crop-analysis

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.7%) to scientific vocabulary

Keywords

bias computer-vision fairness fairness-ml image-processing machine-learning research
Last synced: 6 months ago · JSON representation ·

Repository

Code for reproducing our analysis in the paper titled: Image Cropping on Twitter: Fairness Metrics, their Limitations, and the Importance of Representation, Design, and Agency

Basic Info
  • Host: GitHub
  • Owner: twitter-research
  • License: apache-2.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage: https://arxiv.org/abs/2105.08667
  • Size: 3.25 MB
Statistics
  • Stars: 253
  • Watchers: 9
  • Forks: 40
  • Open Issues: 1
  • Releases: 0
Topics
bias computer-vision fairness fairness-ml image-processing machine-learning research
Created almost 5 years ago · Last pushed over 4 years ago
Metadata Files
Readme Contributing License Code of conduct Citation Authors

README.md

Image Crop Analysis

Open All Collab Binder DOI:10.1145/3479594 arxiv:2105.08667

How does a saliency algorithm work

This is a repo for the code used for reproducing our Image Crop Analysis paper as shared on our blog post.

If you plan to use this code please cite our paper as follows:

@article{TwitterImageCrop2021, author = {Yee, Kyra and Tantipongpipat, Uthaipon and Mishra, Shubhanshu}, title = {Image Cropping on Twitter: Fairness Metrics, Their Limitations, and the Importance of Representation, Design, and Agency}, year = {2021}, issue_date = {October 2021}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, volume = {5}, number = {CSCW2}, url = {https://doi.org/10.1145/3479594}, doi = {10.1145/3479594}, journal = {Proceedings of the ACM on Human-Computer Interaction}, month = oct, articleno = {450}, numpages = {24}, keywords = {image cropping, ethical HCI, fairness in machine learning, demographic parity, representational harm} } @article{TwitterImageCrop2021ArXiv, author = {{Yee}, Kyra and {Tantipongpipat}, Uthaipon and {Mishra}, Shubhanshu}, title = "{Image Cropping on Twitter: Fairness Metrics, their Limitations, and the Importance of Representation, Design, and Agency}", journal = {arXiv e-prints}, keywords = {Computer Science - Computers and Society, Computer Science - Computer Vision and Pattern Recognition, Computer Science - Human-Computer Interaction, Computer Science - Machine Learning}, year = 2021, month = may, eid = {arXiv:2105.08667}, pages = {arXiv:2105.08667}, archivePrefix = {arXiv}, eprint = {2105.08667}, primaryClass = {cs.CY}, }

Analysis of demographic bias of the image cropping algorithm

Instructions

Docker Run

  • Install docker
  • Run the following commands in this root directory of this project:

bash docker build -t "image_crop" -f docker/Dockerfile . docker run -p 9000:9000 -p 8900:8900 -it image_crop * Open the jupyter lab URL shown in terminal.

Run on Google Colab

Open All Collab

  • Open a google colab notebook
  • Run the following code in the cell where HOME_DIR variable is set:

try: import google.colab ! pip install pandas scikit-learn scikit-image statsmodels requests dash ! [[ -d image-crop-analysis ]] || git clone https://github.com/twitter-research/image-crop-analysis.git HOME_DIR = Path("./image_crop_analysis").expanduser() IN_COLAB = True except: IN_COLAB = False * Try the notebooks/Image Crop Analysis.ipynb notebook for example.

Security Issues?

Please report sensitive security issues via Twitter's bug-bounty program (https://hackerone.com/twitter) rather than GitHub.

Owner

  • Name: Twitter Research
  • Login: twitter-research
  • Kind: organization
  • Email: opensource@twitter.com

Twitter #opensource projects related to our published research

Citation (CITATION.cff)

cff-version: "1.2.0"
date-released: 2020-10
message: "If you use this software, please cite it using these metadata."
title: "Image Cropping on Twitter: Fairness Metrics, their Limitations, and the Importance of Representation, Design, and Agency"
url: "https://github.com/twitter-research/image-crop-analysis"
authors: 
  - family-names: Yee
    given-names: Kyra
  - family-names: Tantipongpipat
    given-names: Uthaipon (Tao) 
  - family-names: Mishra
    given-names: Shubhanshu
preferred-citation:
  type: conference-paper
  authors:
  - family-names: Yee
    given-names: Kyra
  - family-names: Tantipongpipat
    given-names: Uthaipon (Tao) 
  - family-names: Mishra
    given-names: Shubhanshu
  booktitle: "Proceedings of the ACM on Human-Computer Interaction"
  month: 10
  title: "Image Cropping on Twitter: Fairness Metrics, their Limitations, and the Importance of Representation, Design, and Agency"
  year: 2021
  publisher: "Association for Computing Machinery"
  url: "https://arxiv.org/abs/2110.10318"
  doi: "https://doi.org/10.1145/3479594"
  address: "Online"

GitHub Events

Total
  • Watch event: 5
  • Fork event: 3
Last Year
  • Watch event: 5
  • Fork event: 3

Dependencies

docker/Dockerfile docker
  • continuumio/miniconda3 latest build
environment.yml pypi