
## Data preprocessing

All the data is pre-processed in ```data``` folder. It contains ```FairFace``` dataset for debiasing image encoder, ```Bias-in-Bios``` dataset for debiasing text encoder. As evaluation datasets, ```FACET``` dataset for a multi-class zero-shot classification and ```Flickr30K``` dataset for text-to-image retrieval are prepared.

## Run Code
- TARGET: ```image```, ```text```, or ```image text```. ```image text``` indicates a joint debiasing.
- IMAGE_NUM, TEXT_NUM: integers for the number of pruned features. 
- T: a threshold for low confidence samples.
- BASE: Only ```ViT-B/32``` baseline is prepared in ```data``` folder.


ex)
```
## For the baseline
python debias.py --target none

## For the debiasing
python debias.py --target image text --image_num 50 --target_num 50 --t 0.9
```
