Views
No views yet


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
1git clone https://github.com/uci-cbcl/XOCT.git
2cd XOCT
3conda create -n xoct python=3.10
4conda activate xoct
5pip install -r requirements.txt1import torch
2from models.xoct_model import XOCTModel
3
4# Load pretrained generator (example for 3M)
5gen = XOCTModel()
6weights = torch.load("checkpoints_3M/xoct_gn_3M/latest_net_G.pth", map_location="cpu")
7gen.load_state_dict(weights)
8gen.eval()
9
10# x: 3D OCT volume tensor (1 × D × H × W)
11with torch.no_grad():
12 octa_pred = gen(x)python create_2d_projection.py --input octa_pred.nii --output projection.pngcheckpoints_3M/xoct_gn_3M/
checkpoints_6M/xoct_gn_6M/latest_net_G.pth)latest_net_D_*.pth)bash scripts_3M/xoct/test.shbash scripts_6M/xoct/test.shtest3d_6M.py command (inside scripts_6M/xoct/test.sh):1python test3d_6M.py \
2 --dataroot ./octa-500/OCT2OCTA6M_3D \
3 --checkpoints_dir ./checkpoints_6M \
4 --name xoct_gn_6M \
5 --test_name xoct_gn_6M \
6 --model XOCT \
7 --add_scale \
8 --direction AtoB \
9 --base_ch_g 64 \
10 --max_ch_g 512 \
11 --dataset_mode alignedoct2octaall \
12 --preprocess none \
13 --norm group \
14 --batch_size 1 \
15 --input_nc 1 \
16 --output_nc 1 \
17 --gpu_ids 1 \
18 --num_test 1000000 \
19 --which_epoch latestcheckpoints_6M/xoct_gn_6M/../octa-500/OCT2OCTA6M_3D/../results/xoct_gn_6M/test_latest/--gpu_ids -1 for CPU inference.--dataroot with your own OCT dataset path.--which_epoch best if available.| 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 |
1@inproceedings{khosravi2025xoct,
2 title={XOCT: Enhancing OCT to OCTA Translation via Cross-Dimensional Supervised Multi-scale Feature Learning},
3 author={Khosravi, Pooya and Han, Kun and Wu, Anthony T and Rezvani, Arghavan and Feng, Zexin and Xie, Xiaohui},
4 booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
5 pages={695--705},
6 year={2025},
7 organization={Springer}
8}