This repository contains the source code to reproduce the figures presented in the paper "Revisiting the impact of sex imbalances on biased deep learning models in medical imaging".
Here, we describe how to reproduce the figures presented in the paper.
-
Run
threshold_calc.ipynb
. -
Run
fairness_calculation.ipynb
. This notebook will create two tables,final_bias_favor_data.csv
andfinal_overall_bias_favor_data.csv
, and save them in thetables
folder. Thefinal_overall_bias_favor_data.csv
is Table 1 from the paper. -
Run
fairness_correction.ipynb
. This notebook will create the five tables listed below and save them in thetables
folder. The table,train100%_female_images.csv
, can contains the results to quickly reproduce Table 2 from the paper.train100%_female_images.csv
train75%_female_images.csv
train50%_female_images.csv
train25%_female_images.csv
train0%_female_images.csv
-
Run
generate_plots.ipynb
. This notebook will create the figuresfinal_all_conditions_graph.pdf
andfinal_sub_conditions_graph.pdf
. Thefinal_sub_conditions_graph.pdf
figure is Fig. 2 from the paper.