Zing Forum

Reading

Open-Source Retinal Electrophysiology Analysis Platform: Interpreting ERG Signals with Machine Learning

ERG-Analysis-API is a complete open-source solution that integrates signal processing, machine learning, and clinical decision support into a unified platform, providing end-to-end support for automated analysis of retinal electrophysiology data.

ERG视网膜电图信号处理机器学习临床决策支持眼科AI医疗开源PythonSHAP可解释性Transformer
Published 2026-05-04 21:15Recent activity 2026-05-04 21:20Estimated read 7 min
Open-Source Retinal Electrophysiology Analysis Platform: Interpreting ERG Signals with Machine Learning
1

Section 01

Introduction / Main Floor: Open-Source Retinal Electrophysiology Analysis Platform: Interpreting ERG Signals with Machine Learning

ERG-Analysis-API is a complete open-source solution that integrates signal processing, machine learning, and clinical decision support into a unified platform, providing end-to-end support for automated analysis of retinal electrophysiology data.

2

Section 02

Project Background and Clinical Needs

ERG signals have unique characteristics: small amplitude (usually at the microvolt level), narrow frequency range (0.3-300 Hz), and susceptibility to noise interference. Traditional ERG analysis relies on manual interpretation, which is not only time-consuming and labor-intensive but also has subjective differences. With the development of machine learning technology, automated and standardized ERG analysis has become possible.

The ERG-Analysis-API project emerged as the times require; it is a complete open-source solution that integrates signal processing, machine learning, and clinical decision support into a unified platform. Supported by the Apress/Springer-Nature publishing group, this project is accompanied by the textbook "ERG Signal Processing with Python" to be published in 2028, providing reproducible analysis workflows for ophthalmologists and researchers.

3

Section 03

Signal Preprocessing Module

The project implements a signal filtering process compliant with the standards of the International Society for Clinical Electrophysiology of Vision (ISCEV):

  • Butterworth Bandpass Filter: Precisely extracts the effective frequency band of ERG signals, removing baseline drift and high-frequency noise
  • Notch Filter: Eliminates 50/60 Hz power line interference
  • Median Filter: Handles transient noise and artifacts

These filters are carefully tuned to maximize the signal-to-noise ratio while preserving the waveform characteristics of ERG signals.

4

Section 04

Time-Frequency Analysis Capabilities

The project provides two complementary time-frequency analysis methods:

  1. Short-Time Fourier Transform (STFT) Spectrogram: Displays the energy distribution of ERG signals in both time and frequency domains, helping to identify waveform abnormalities
  2. Wavelet Transform: Offers multi-resolution analysis capabilities, especially suitable for capturing transient features in ERG signals
5

Section 05

Feature Engineering System

The project builds a comprehensive feature extraction framework covering three dimensions:

  • Time-Domain Features: Classic parameters such as amplitude, latency, and peak time of a-waves and b-waves
  • Frequency-Domain Features: Power spectral density, main frequency components, etc.
  • STFT Statistical Features: Texture features like mean, variance, and entropy of the spectrogram

These features form the input foundation for machine learning models.

6

Section 06

Dual-Model Architecture

The project adopts two complementary machine learning models:

  1. Random Forest Baseline Model: As a highly interpretable and computationally efficient benchmark method, it is suitable for rapid screening
  2. Vision Transformer: Uses attention mechanisms to capture long-range dependencies in ERG waveforms, performing excellently in complex cases
7

Section 07

SHAP Interpretability

The interpretability of model predictions is crucial for clinical applications. The project integrates the SHAP (SHapley Additive exPlanations) framework, providing three levels of interpretation:

  • Feature-Level Interpretation: Identifies which ERG parameters contribute the most to classification decisions
  • Spectrogram-Level Interpretation: Visualizes the model's attention areas in the time-frequency domain
  • Natural Language Summary: Converts technical SHAP values into clinical descriptions understandable to doctors
8

Section 08

Code-Free Clinical API

A key highlight of the project is the clinical decision support API with a four-layer report structure:

  1. Traffic Light Indication: Intuitively displays risk levels using red, yellow, and green colors
  2. Clinical Summary: Summarizes key findings in plain language
  3. Specialist Report: Provides detailed technical parameters and professional interpretations
  4. Audit Trail: Records the complete analysis process and parameter settings to meet medical compliance requirements

This layered design not only meets the rapid decision-making needs of clinicians but also provides specialists with the ability to conduct in-depth analysis.