| Paper | File |
| Lesion-aware Contrastive Learning for Diabetic Retinopathy Diagnosis | Contrstive Learning&Downstream Task |
| | |
- Python 3
- CUDA 11
- yaml
- PIL
- tqdm
- PyTorch=1.7.1
- torchvision
All the used dataset are publicly-accessible:
Stage1: Construct of positive patch set and negative patch set
Stage2: Train the teacher model
$ python train.py
Stage3: Train the student model
$ python student_train.py
Fine-tuning the model in downstream tasks and conducting testing.
The dataset should be stored in the following file format:
eyepacs
|-- train
| |-- 0
| | |-- 1.png
| | |-- 2.png
| | `-- 3.png
| |-- 1
| | |-- 4.png
| | |-- 5.png
| | `-- 6.png
| |-- 2
| | |-- 7.png
| | |-- 8.png
| | `-- 9.png
| |-- 3
| | |-- 10.png
| | |-- 11.png
| | `-- 12.png
| `-- 4
| |-- 13.png
| |-- 14.png
| `-- 15.png
|-- val
| |-- ...
|-- test
| |-- ...
Execute the following commands:
$ python student_train.py -config='eyepacs.yaml'
Thanks for the Lesion_CL for the lesion detection network and the implementation of models, MoCo for the contrastive loss.