OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

tf-keras-vis

tf-keras-vis is a Python toolkit for visualizing and debugging Keras models with TensorFlow 2.0 or later. It generates saliency and class activation visualizations, as well as images that maximize selected activations.

Independent OpenViST project profile, based on linked sources.

tf-keras-vis — Model debugging and visual inspection in Python workflows using TensorFlow 2.0 or later
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you have a Keras model and want visual material for examining what it responds to, such as a class activation heatmap or an activation-maximization image.

Who it is for

  • Developers investigating the behavior of TensorFlow-backed Keras models.
  • Practitioners who want visual explanations for image-model inputs.
  • Developers exploring convolutional filters, dense-layer outputs or selected output categories.

Documented uses

  • Generate a Grad-CAM++ map for a selected category and input.
  • Create activation-maximization visualizations for selected model outputs or intermediate layers.
  • Compare documented attention methods, including Vanilla Saliency, SmoothGrad, GradCAM, GradCAM++, ScoreCAM and Faster-ScoreCAM.
Before you choose

Requirements & limits

  • The documented prerequisites are Python 3.7+ and TensorFlow 2.0+.
  • The Quick Start demonstrates pip installation and editable installation from source for development.
  • Grad-CAM++ examples require a model, input and categorical target; Activation Maximization examples can target an intermediate layer or output.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Generate a Grad-CAM++ heatmap

Create a class-targeted heatmap from a Keras model and an input, then overlay it on the image.

Before you start

  • Python 3.7 or later
  • TensorFlow 2.0 or later
  • A Keras model instance, an input and a categorical target index

Steps

  1. Install the package and TensorFlow with the command below.

    Documented command
    pip install tf-keras-vis tensorflow
  2. Create a GradcamPlusPlus instance with the model and the ReplaceToLinear model modifier.

  3. Call it with a CategoricalScore for the target index and the seed input.

  4. Convert the resulting map to a heatmap and overlay it on the input image.

Expected outcome

A class-targeted Grad-CAM++ map that can be displayed as a heatmap over the input image.

Guide limitations

  • The example requires an existing model, an input and a chosen categorical index.
  • The documentation presents an example workflow; visualization results depend on the model and input.
Source-based practical guide

Set up tf-keras-vis for development

Install the package from its source repository in editable development mode.

Before you start

  • Python 3.7 or later
  • TensorFlow 2.0 or later
  • Git

Steps

  1. Clone the keisen/tf-keras-vis repository.

  2. Change into the cloned tf-keras-vis directory.

  3. Run the command below.

    Documented command
    pip install -e .[develop] tensorflow

Expected outcome

An editable installation with the documented development dependencies and TensorFlow.

Guide limitations

  • This procedure covers installation for development; it does not document a separate test or deployment procedure.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
12 November 2026
Original website title
Welcome to tf-keras-vis! — tf-keras-vis v0.8.8 documentation · Official homepage title · retained in its source language