Skip to main content

Neural network visualization toolkit for tf.keras

Project description

tf-keras-vis

Downloads PyPI version Build Status License: MIT

tf-keras-vis is a visualization toolkit for debugging tf.keras models in Tensorflow2.0+. Currently supported methods for visualization include:

tf-keras-vis is designed to be light-weight, flexible and ease of use. All visualizations have the features as follows:

  • Support N-dim image inputs, that's, not only support pictures but also such as 3D images.
  • Support batchwise processing, so, be able to efficiently process multiple input images.
  • Support the model that have either multiple inputs or multiple outputs, or both.
  • Support Optimizers embedded in tf.keras to process Activation maximization.

Visualizations

Visualize Dense Layer

Visualize Convolutional Filer

GradCAM

The images above are generated by GradCAM++.

Saliency Map

The images above are generated by SmoothGrad.

Requirements

  • Python 3.5-3.8
  • tensorflow>=2.0

Installation

  • PyPI
$ pip install tf-keras-vis tensorflow
  • Docker (container that run Jupyter Notebook)
$ docker run -itd -p 8888:8888 keisen/tf-keras-vis:0.5.0

If you have GPU processors,

$ docker run -itd --runtime=nvidia -p 8888:8888 keisen/tf-keras-vis:0.5.0-gpu

You can find other images at Docker Hub.

Usage

Please see below for details:

Getting Started Guides

[NOTE] If you have ever used keras-vis, you may feel that tf-keras-vis is similar with keras-vis. Actually tf-keras-vis derived from keras-vis, and both provided visualization methods are almost the same. But please notice that tf-keras-vis APIs does NOT have compatibility with keras-vis.

Guides (ToDo)

  • Visualizing multiple attention or activation images at once utilizing batch-system of model
  • Define various loss functions
  • Visualizing attentions with multiple inputs models
  • Visualizing attentions with multiple outputs models
  • Advanced loss functions
  • Tuning Activation Maximization
  • Visualizing attentions for N-dim image inputs

ToDo

  • Guide documentations
  • API documentations
  • We're going to add some methods such as below.
    • Deep Dream
    • Style transfer

Known Issues

  • With InceptionV3, ActivationMaximization doesn't work well, that's, it might generate meaninglessly blur image.
  • With cascading model, Gradcam and Gradcam++ don't work well, that's, it might occur some error. So we recommend, in this case, to use FasterScoreCAM.
  • channels-first models and data is unsupported.

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-keras-vis-0.5.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

tf_keras_vis-0.5.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file tf-keras-vis-0.5.0.tar.gz.

File metadata

  • Download URL: tf-keras-vis-0.5.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for tf-keras-vis-0.5.0.tar.gz
Algorithm Hash digest
SHA256 340cb45656e7157edb0a42eac572ae720254a76cb84d929f04d0f78586665cd8
MD5 6fab6d56935305bd3ede31471854b2d9
BLAKE2b-256 0ad78ce4e0e6eeca26bbceb10ca4ac3c4cec44908179e01809bd4486e7b1c016

See more details on using hashes here.

File details

Details for the file tf_keras_vis-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: tf_keras_vis-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for tf_keras_vis-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5fb468471f43648ec60a5a5dd2bac3f4790cfe14f49496ab442fe97a11165b75
MD5 1a7f5166dbe689aacc382529e26209aa
BLAKE2b-256 f30274aa597af93beba398f00317912870a4cba00b1223018b401a34e5431e24

See more details on using hashes here.

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