This repository contains the code for the paper "Annotation-efficient learning for OCT segmentation". We propose an annotation-efficient learning method for OCT segmentation that could significantly reduce annotation costs and improve learning efficiency. Here we provide generative pre-trained transformer-based encoder and CNN-based segmentation decoder, both pretrained on open-access OCTdatasets. The proposed pre-trained model can be directly transfered to your ROI segmeantation based on OCT image. We hope this may help improve the intelligence and application penetration of OCT.
python==3.8
torch==1.11.1
numpy==1.19.5
monai==0.7.0
timm==0.3.2
tensorboardX==2.1
torchvision==0.12.0
opencv-python==4.5.5
- Clone the repository:
git clone https://github.com/SJTU-Intelligent-Optics-Lab/Annotation-efficient-learning-for-OCT-segmentation.git
- Install the required dependencies:
pip install -r requirements.txt
-
Download the pre-trained phase1 model file for weights of encoder and phase2 model file for weights of decoder, and then put them in
./runs/
folder. -
Edit suitable path and parameters in main.py
-
Go to the corresponding folder and run:
cd Annotation-efficient-learning-for-OCT-segmentation
python main.py
The prepared architecture of dataset is referenced to ./dataset/
folder containing train_fewshot_data
and val_fewshot_data
. The name index of images is listed in train_fewshot_data.txt
and val_fewshot_data.txt
.
@article{
title={Annotation-efficient learning for OCT segmentation},
author={Zhang, Haoran and Yang, Jianlong and Zheng, Ce and Zhao, Shiqing and Zhang, Aili},
journal={Biomedical Optics Express},
volume={14},
number={7},
pages={3294--3307},
year={2023},
publisher={Optica Publishing Group}
}