Eyepy
A python package to read, analyse and visualize OCT and fundus data from various sources.
Install / Use
/learn @MedVisBonn/EyepyREADME

eyepy provides a unified and user-friendly interface for working with retinal imaging data. With support for a wide range of file formats, it enables researchers and clinicians to import, process, and visualize OCT volumes and angiography data with ease. The core EyeVolume object offers intuitive methods for plotting fundus images, B-scans, and quantitative analyses such as drusen and retinal layer thickness. Comprehensive documentation and example workflows are available to help you get started quickly.
Features
- Import Structural Data (HEYEX-E2E, HEYEX-VOL, HEYEX-XML, Topcon-FDA, B-Scan collections, RETOUCH Challenge, AMD Dataset from Duke University)
- Import Angiographic OCT Data (HEYEX-VOL)
- Analyze OCT volumes (compute and quantify drusen)
- Visualize OCT volumes with annotations and quantifications
- Compute and visualize retinal layer thickness
- Compute and visualize OCTA enface projections.
- Save and load EyeVolume objects
Getting Started
Installation
Attention: If you want to use a version prior to 0.12.0 you have to install from the eyepie name instead. This is because we used eyepie as a package name on PyPI until the previous owner of the eyepy name on PyPI was so kind to transfer it to us.
To install the latest version of eyepy run pip install -U eyepy. (It is eyepie for versions < 0.12.0)
Optional Dependencies
Some file formats require additional dependencies:
- Topcon FDA files:
pip install eyepy[fda](requiresoct-converter) - RETOUCH dataset:
pip install eyepy[itk](requiresitk)
Getting Started
When you don't have a supported OCT volume at hand you can check out our sample datasets to get familiar with eyepy.
from eyepy.data import load
struc_ev = load("drusen_patient")
struc_ev = load("healthy_OD")
angio_ev = load("healthy_OD_Angio")
If you have data at hand use one of eyepy's import functions.
# Import HEYEX E2E export
ev = ep.import_heyex_e2e("path/to/file.e2e")
# Import HEYEX XML export
ev = ep.import_heyex_xml("path/to/folder")
# Import HEYEX VOL export
ev = ep.import_heyex_vol("path/to/file.vol")
# Import Topcon FDA export
ev = ep.import_topcon_fda("path/to/file.fda")
# Import volume from Duke public dataset
ev = ep.import_duke_mat("path/to/file.mat")
# Import volume from RETOUCH challenge
ev = ep.import_retouch("path/to/volume_folder")
# Import HEYEX OCTA VOL export
ev_angio = ep.import_heyex_angio_vol("path/to/volume_folder")
Spectralis OCTA (OCT Angiography) Support
eyepy is capable of reading and visualizing OCT Angiography (OCTA) data from Heidelberg Spectralis devices. You can explore and analyze both structural and angiography volumes using the same unified interface.
Example: Load and Visualize Spectralis OCTA Sample Data
The following example demonstrates how to load OCTA sample data, and plot the enface projections.
import eyepy as ep
import matplotlib.pyplot as plt
# Load sample data
angio_OD = ep.data.load("healthy_OD_Angio")
angio_OS = ep.data.load("healthy_OS_Angio")
fig, axes = plt.subplots(1, 2, figsize=(14, 7))
for i, (angio, title) in enumerate(zip([angio_OD, angio_OS], ["Right Eye (OD)", "Left Eye (OS)"])):
# Show localizer with Angiography overlay for the complete retina
angio.plot(ax=axes[i], slabs=["RET"])
axes[i].set_title(title)
axes[i].axis("off")
plt.tight_layout()
Related Projects:
- eyeseg: A python package for segmentation of retinal layers and drusen in OCT data.
- OCT-Converter: Extract raw optical coherence tomography (OCT) and fundus data from proprietary file formats. (.fds/.fda/.e2e/.img/.oct/.dcm)
- eyelab: A GUI for annotation of OCT data based on eyepy
- Projects by the Translational Neuroimaging Laboratory
- UOCTE Unofficial continuation of https://bitbucket.org/uocte/uocte
- OCTAnnotate
- heyexReader
- OCTExplorer Iowa Reference Algorithm
Citation
If you use eyepy in your research, please cite it. You can find citation information and export BibTeX entries via the Zenodo record:
Contributing
For details on contributing and setting up a development environment, see the Contributing Guide.
Related Skills
claude-opus-4-5-migration
84.6kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
model-usage
341.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
TrendRadar
50.1k⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。
mcp-for-beginners
15.7kThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
