Skip to content

Spritea/OCTA-Flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCTA-Flow

This is the official PyTorch implementation code for OCTA-Flow.

Blood Flow Speed Estimation with Optical Coherence Tomography Angiography Images
Wensheng Cheng1, Zhenghong Li1, Jiaxiang Ren1, Hyomin Jeong2, Congwu Du2, Yingtian Pan2, Haibin Ling1
1Department of Computer Science, 2Department of Biomedical Engineering, Stony Brook University
CVPR 2025 [CVF Paper] | [CVF Supp]

Highlights

  • First work to directly estimate blood flow speed with OCTA images.
  • Use ODT data with artifacts as the pseudo label when the ground truth data is not available.
  • Generate accurate and robust blood flow speed estimation in the presence of artifacts.
  • Paired OCTA-ODT datasets on the cerebral cortex region in animals.

Contents

  1. Installation
  2. Training
  3. Evaluation
  4. Inference
  5. Checkpoints

Installation

conda create -n newcrfs python=3.8
conda activate newcrfs
conda install pytorch=1.10.0 torchvision cudatoolkit=11.1
pip install mmcv==2.2.0 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.10/index.html
pip install timm==1.0.9
pip install matplotlib, tqdm, tensorboardX

Training

First download the pretrained encoder backbone from here (we use the Swin-T backbone pretrained on ImageNet-1K), and then modify the pretrain path in the config files.

Training the OCTA-Flow model on Anesthetized Dataset:

cd OCTA-Flow
bash scripts/train_anesthetized_save_all.sh

Training the OCTA-Flow model on Awake Dataset:

cd OCTA-Flow
bash scripts/train_awake_save_all.sh

Evaluation

Set the checkpoint path in octaflow/eval_anesthetized.py, and then evaluate the OCTA-Flow model on Anesthetized Dataset to get metrics:

cd OCTA-Flow
python octaflow/eval_anesthetized.py

Set the checkpoint path in octaflow/eval_awake.py, and then evaluate the OCTA-Flow model on Awake Dataset to get metrics:

cd OCTA-Flow
python octaflow/eval_awake.py

Inference

Set the checkpoint path and images for inference in octaflow/inference_val_images_oca2odt_anesthetized.py, and then predict blood flow speed with the trained model on Anesthetized Dataset:

cd OCTA-Flow/octaflow
python inference_val_images_oca2odt_anesthetized.py

Set the checkpoint path and images for inference in octaflow/inference_val_images_oca2odt_awake.py, and then predict blood flow speed with the trained model on Awake Dataset:

cd OCTA-Flow/octaflow
python inference_val_images_oca2odt_awake.py

Checkpoints

The models trained on the default dataset split (fold 0) are available below.

Model Abs.Rel. RMSE
Anesthetized 0.3275 6.6611
Awake 0.3363 7.0713

Acknowledgements

This implementation code is heavily based on the NeWCRFs work, and the Swin Transformer work. Thanks for their great work!

About

Blood Flow Speed Estimation with Optical Coherence Tomography Angiography Images [CVPR 2025]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published