OCT Vision is a specialized tool designed to automate and enhance the measurement of the relationship between the cornea and contact lenses using Anterior Segment Optical Coherence Tomography (AS-OCT) images.
It provides clinicians with precise data to facilitate the calculation and adaptation of lenses, particularly for patients with irregular corneas (e.g., keratoconus, corneal transplants).
- Automated Segmentation: Precisely detects corneal and contact lens surfaces using optimized image processing pipelines.
- Metric Suite:
- Vertical Clearances: Direct measurement of the sagittal gap.
- Euclidean Clearance: Minimum distance between surfaces for safety analysis.
- Zonal Metrics: Analysis of central vs. peripheral thickness.
- Interactive Visualization: Real-time cross-sectional measurements with an interactive thickness profile.
- Demo Mode: Built-in library of diverse clinical cases for training and validation.
- Backend: Flask (Python) with a focus on custom computer vision algorithms.
- Computer Vision: OpenCV, NumPy, and SciPy for edge detection, morphological processing, and polynomial interpolation.
- Frontend: Vanilla JavaScript (Modern ES6+), Tailwind CSS for a premium medical interface.
- Testing: Robust test suite using Pytest for core geometry and processing services.
- Python 3.11+
- uv (Recommended for dependency management)
uv syncuv run python run.pyThen visit http://localhost:5000 in your browser.
You can easily deploy OCT Vision using Docker and Docker Compose. This ensures all system dependencies (OpenCV, etc.) are correctly configured.
- Build and Start:
docker compose up --build -d
- Access: The application will be available at
http://localhost:5000.
- Build:
docker build -t oct-vision . - Run:
docker run -p 5000:5000 oct-vision
PYTHONPATH=. uv run python3 -m pytestThe application follows a multi-stage processing pipeline:
- Preprocessing: Image enhancement (CLAHE) and noise reduction.
- Segmentation: Canny edge detection and morphological grouping.
- Analysis: Least-squares polynomial fitting to derive smooth corneal/lens models.
- Computation: Geometric algorithms to find vertical and minimum Euclidean distances.
This project is licensed under the GNU General Public License v3.0.
Developed with precision for the ophthalmology community.