Contrast limited adaptive histogram equalization implemented in TF ops
Project description
Tensorflow CLAHE
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)
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
Release history Release notifications | RSS feed
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)