Skip to main content

Framework for Image Precompensation

Project description

Pyolimp

This project provides a machine learning-based framework for image precompensation targeting vision defects, specifically color vision deficiencies (CVD) and refractive visual impairments (RVI). The framework incorporates both neural network and non-neural network modules to address precompensation effectively across different approaches.

Project Overview

This project focuses on precompensating for visual impairments using machine learning techniques. It includes a comprehensive framework that supports both neural network (NN) and non-neural network (non-NN) methods to restore image quality for those affected by:

  • Color Vision Deficiencies (CVD): Compensates for color blindness (e.g., protanopia, deuteranopia).
  • Refractive Visual Impairments (RVI): Addresses distortions caused by refractive errors, improving clarity and sharpness.

Requirements

  • Python 3.10+
  • Pytorch 2.4+
  • Additional dependencies listed in pyproject.toml

Installation

pip install olimp

or

pip install git+https://github.com/pyolimp/pyolimp.git

Usage

1. Non-Neural Network Modules for CVD and RVI Precompensation

To run the RVI optimization algorithm for precompensation using the Bregman-Jumbo method, execute:

python3 -m olimp.precompensation.optimization.bregman_jumbo

To run the RVI optimization algorithm for precompensation using the Montalto method, execute:

python3 -m olimp.precompensation.optimization.montalto

To run the CVD optimization algorithm for precompensation using the Tennenholtz Zachevsky method, execute:

python3 -m olimp.precompensation.optimization.tennenholtz_zachevsky

You can also call examples from the directory olimp.precompensation.basic and olimp.precompensation.analytics as in the examples given.

2. Neural Network Modules for CVD and RVI Precompensation

To run the RVI nn model for precompensation using the USRNET method, execute:

python3 -m olimp.precompensation.nn.models.usrnet

To run the CVD nn model for precompensation using the USRNET method, execute:

python3 -m olimp.precompensation.nn.models.cvd_swin.Generator_transformer_pathch4_844_48_3_nouplayer_server5

3. Training models

To train neural network models for precompensation, use the following command:

python3 -m olimp.precompensation.nn.train.train --config ./olimp/precompensation/nn/pipeline/usrnet.json

you can also train other models, please see olimp/precompensation/nn/pipeline. Also we have json schema and you can generate it, use the following command:

python3 -m olimp.precompensation.nn.train.train --update-schema

Examples

CVD demo example

RVI demo example

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

olimp-0.2.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

olimp-0.2.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file olimp-0.2.0.tar.gz.

File metadata

  • Download URL: olimp-0.2.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for olimp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 65a63bfb56aa88bff1cfca6ab3d4e625fbe833edbe843e1f7939b4c0037c42ee
MD5 6d840aa3f1a45627c5a23b53b79dd4f9
BLAKE2b-256 e73576563a9c68ec72854b3ec93f34d77685a6d13376d2ab4b4b2cf9daa48358

See more details on using hashes here.

File details

Details for the file olimp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: olimp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for olimp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9eb5b59ff95bbc49a27376add8a800e4cffc4279cf7495a76828b46a3282dfe
MD5 152a75d285b8682d5adc27ff14e9c44b
BLAKE2b-256 b58a1f01be07cc8ece1a37cd8eac8b99fc525d4769a5d3bcd6f592fad5d0e902

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page