π§ XOCT: Enhancing OCT to OCTA Translation via Cross-Dimensional Multi-Scale Feature Learning
π©Ί Overview
XOCT is a deep learning framework for translating Optical Coherence Tomography (OCT) volumes into Optical Coherence Tomography Angiography (OCTA), achieving high-fidelity reconstruction of retinal microvasculature.
This model integrates:
- Cross-Dimensional Supervision (CDS): segmentation-weighted en-face projections for layer-specific learning.
- Multi-Scale Feature Fusion (MSFF): isotropic, anisotropic, and large-kernel 3D convolutions for fine vascular reconstruction.
- Layer-aware vascular coherence: ensuring anatomically consistent vasculature across retinal depths.
Presented at MICCAI 2025, XOCT achieves state-of-the-art performance on the OCTA-500 dataset, significantly improving vessel continuity and detail preservation.
π§© Checkpoint Structure
This repository includes pretrained weights for both 3M and 6M subsets of the OCTA-500 dataset.
Each model includes a generator (G) and multiple discriminators (D) specialized for layer-wise supervision.
checkpoints_3M/
βββ xoct_gn_3M/
βββ latest_net_D_3d.pth # 3D volumetric discriminator
βββ latest_net_D_ilm_opl.pth # En-face discriminator (ILMβOPL)
βββ latest_net_D_opl_bm.pth # En-face discriminator (OPLβBM)
βββ latest_net_D_other.pth # Auxiliary 2D discriminator
βββ latest_net_G.pth # Generator weights (XOCT model)
checkpoints_6M/
βββ xoct_gn_6M/
βββ latest_net_D_3d.pth
βββ latest_net_D_ilm_opl.pth
βββ latest_net_D_opl_bm.pth
βββ latest_net_D_other.pth
βββ latest_net_G.pth
βοΈ Environment Setup
Create and activate the environment:
git clone https://github.com/uci-cbcl/XOCT.git
cd XOCT
conda create -n xoct python=3.10
conda activate xoct
pip install -r requirements.txt
π Usage
π§ Load Pretrained Generator (Python)
import torch
from models.xoct_model import XOCTModel
# Load pretrained generator (example for 3M)
gen = XOCTModel()
weights = torch.load("checkpoints_3M/xoct_gn_3M/latest_net_G.pth", map_location="cpu")
gen.load_state_dict(weights)
gen.eval()
# x: 3D OCT volume tensor (1 Γ D Γ H Γ W)
with torch.no_grad():
octa_pred = gen(x)
To generate 2D en-face projections:
python create_2d_projection.py --input octa_pred.nii --output projection.png
π Testing & Inference (Pretrained Checkpoints)
Pretrained checkpoints for both 3M and 6M subsets are located under:
checkpoints_3M/xoct_gn_3M/
checkpoints_6M/xoct_gn_6M/
Each includes:
- Generator (
latest_net_G.pth) - 3D and layer-wise discriminators (
latest_net_D_*.pth)
To run inference:
βΆ For the OCTA-3M subset
bash scripts_3M/xoct/test.sh
βΆ For the OCTA-6M subset
bash scripts_6M/xoct/test.sh
Example test3d_6M.py command (inside scripts_6M/xoct/test.sh):
python test3d_6M.py \
--dataroot ./octa-500/OCT2OCTA6M_3D \
--checkpoints_dir ./checkpoints_6M \
--name xoct_gn_6M \
--test_name xoct_gn_6M \
--model XOCT \
--add_scale \
--direction AtoB \
--base_ch_g 64 \
--max_ch_g 512 \
--dataset_mode alignedoct2octaall \
--preprocess none \
--norm group \
--batch_size 1 \
--input_nc 1 \
--output_nc 1 \
--gpu_ids 1 \
--num_test 1000000 \
--which_epoch latest
This script:
Loads the XOCT model architecture.
Uses pretrained weights from
checkpoints_6M/xoct_gn_6M/.Runs inference on 3D OCT volumes in
./octa-500/OCT2OCTA6M_3D/.Saves volumetric predictions and en-face projections to:
./results/xoct_gn_6M/test_latest/
π§© Tips:
- Use
--gpu_ids -1for CPU inference. - Replace
--datarootwith your own OCT dataset path. - For specific checkpoints, set
--which_epoch bestif available.
π Performance Summary
| Dataset | MAE β | PSNR β | SSIM β | Perceptual β |
|---|---|---|---|---|
| OCTA-3M | 19.22 | 20.21 | 0.608 | 0.573 |
| OCTA-6M | 16.65 | 21.46 | 0.568 | 0.541 |
XOCT outperforms 2D and 3D baselines, preserving vessel continuity and microvascular detail essential for retinal pathology interpretation.
π Citation
If you use these models or code, please cite:
@inproceedings{khosravi2025xoct,
title={XOCT: Enhancing OCT to OCTA Translation via Cross-Dimensional Supervised Multi-scale Feature Learning},
author={Khosravi, Pooya and Han, Kun and Wu, Anthony T and Rezvani, Arghavan and Feng, Zexin and Xie, Xiaohui},
booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
pages={695--705},
year={2025},
organization={Springer}
}
π Acknowledgments
This work builds upon:
Funding: National Eye Institute, NIH F30 EY036725 (P.K.)
Institution: University of California, Irvine
Authors: Pooya Khosravi *, Kun Han *, Anthony T. Wu, Arghavan Rezvani, Zexin Feng, Xiaohui Xie
(*Equal contribution)