Skip to main content

Contrast limited adaptive histogram equalization implemented in TF ops

Project description

Tensorflow CLAHE

Pytest

Contrast-limited adaptive histogram equalization implemented in tensorflow ops.

Setup

pip install tf_clahe

Use

import tensorflow as tf
import tf_clahe

img = tf.io.decode_image(tf.io.read_file('./path/to/your/img'))
img_clahe = tf_clahe.clahe(img)

sidebyside example

Optimizing for GPU with XLA

A considerable performance improvement can be achieved by using the gpu_optimized flag in combination with XLA compilation. For example:

import tf_clahe
import tensorflow as tf

@tf.function(experimental_compile=True)  # Enable XLA
def fast_clahe(img):
    return tf_clahe.clahe(img, gpu_optimized=True)

References

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

tf_clahe-0.1.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

tf_clahe-0.1.0-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

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