Skip to content

mintanwei/Fairer-AI

Repository files navigation

Fairer AI

This is the official code of the paper:

Fairer AI in Ophthalmology via Implicit Fairness Learning for Mitigating Sexism and Ageism

Codes and Models:

Requirement:

PyTorch 1.10.1, torchvision 0.11.2. The code is tested with python=3.7, cuda=11.4.

Train:

for ultra-widefield

Run OculoScope_train.py to perform training. Checkpoint will be saved to ./saved_models/OculoScope/.

for narrow-angle

Run MixNAF_train.py to perform training. Checkpoint will be saved to ./saved_models/MixNAF/.

Test:

for ultra-widefield

Run OculoScope_val.py to get the results of the accuracy experiment. Run OculoScope_fairness_analysis.py to get the results of age and gender fairness experiments.

for narrow-angle

Run MixNAF_val.py to get the results of the accuracy experiment.