This repository contains the code and models for our paper. Link to our paper. We would like to thank the authors of Semi-Supervised Keypoint Detector and Descriptor for Retinal Image Matching as this repository is built upon their code. Here is the link for their code.
Download the models here. The models.zip contains three models :
- SuperRetina.pth was trained by the authors of Semi-Supervised Keypoint Detector and Descriptor for Retinal Image Matching
- LKUNET.pth
- SwinEncoder.pth
Unzip this folder in your directory.
Download the data here The data.zip contains 2 folders :
- Auxilliary_Training
- Our_data which contains retinal images with manual keypoint annotation
Apart from this, download FIRE dataset and paste the folder inside the 'data' folder after extracting 'data.zip' file.
We use python 3.8.16 for this implementation. For LKUNET.pth training, we used NVIDIA GeForce RTX 3090 whereas for the heavier models like SwinEncoder.pth, we used NVIDIA A100
Follow these steps to set up the repository on your local machine: Note : In order to test the LKUNET.pth only, you can also create a conda environment with the file ./environment_lk.yml
-
Clone the repository:
git clone https://github.com/NiharGupte/ReverseKnowledgeDistillation.git
-
Navigate to the project's root directory:
cd ReverseKnowledgeDistillation
-
Create and activate the Conda environment:
conda env create -f environment.yml conda activate SwinRetina
- Run test_on_FIRE.py after changing model configurations in config/test.yml
- The training files for base model, LK model and swin model are provided in the respective train_base.py, train_LK.py and train_Swin.py respectively
You can use the models directly by changing the config/test.yml with the model path.
Note : We will soon be uploading the checkpoints and data format for the Facial keypoint validation which we used in our paper.
If this repository helps you, please feel free to cite our paper
@inproceedings{nasser2024reverse,
title={Reverse Knowledge Distillation: Training a Large Model using a Small One for Retinal Image Matching on Limited Data},
author={Nasser, Sahar Almahfouz and Gupte, Nihar and Sethi, Amit},
booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
pages={7778--7787},
year={2024}
}
Please feel free to contact any of the authors in case of any issues