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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file tf_clahe-0.1.0.tar.gz.

File metadata

  • Download URL: tf_clahe-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for tf_clahe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 924978bdeed79bf87268c209439033b3347c5b23fa71129318f375c0e08850fc
MD5 dad0867a78bed83b48079d21ffd61095
BLAKE2b-256 7fa0354609c6ba478ea8089c3ebc7fb06c678a952c9ee7d7865406e07edd56f4

See more details on using hashes here.

File details

Details for the file tf_clahe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tf_clahe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for tf_clahe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f218f051fa67a0c9500ef44aa6f964dbbe5dacd5e723761e5df18799aa18c3c8
MD5 d58e09453da751072c141a77a56c8f2a
BLAKE2b-256 bfcd0527c03ce45278628a1c478b428acb60d6772260e971afb99c65cab699a1

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