Label-preserving Data Augmentation in Latent Space for Diabetic Retinopathy Recognition
Official PyTorch implementation of the MICCAI 2023 paper
This paper presents a label-preserving data augmentation method for DR detection using latent space manipulation. The proposed approach involves computing the contribution score of each latent code to the lesions in fundus images, and manipulating the lesion of real fundus images based on the latent code with the highest contribution score. This allows for a more targeted and effective label-preserving data augmentation approach for DR detection tasks, which is especially useful given the imbalanced classes and limited available data.
python=3.8
pip install -r requirements.txt
You can download the pre-trained stylegan model and lesion-seg model, then put them in 'weights' folder.
You can project the image into latent codes by:
python projector.py --outdir=out --target=fundus.png --network=weights/network.pkl
Run jupyter notebook in script floder