LogoLogo
  • Tensorleap
  • Examples
    • Semantic Segmentation
    • Image Analysis
    • Sentiment Analysis
    • MNIST Project Walkthrough
    • IMDB Project Walkthrough
  • Quickstart using CLI
  • Guides
    • Full Guides
      • MNIST Guide
        • Dataset Integration
        • Model Integration
        • Model Perception Analysis
        • Advanced Metrics
      • IMDB Guide
        • Dataset Integration
        • Model Integration
        • Model Perception Analysis
        • Advanced Metrics
    • Integration Script
      • Preprocess Function
      • Input Encoder
      • Ground Truth Encoder
      • Metadata Function
      • Visualizer Function
      • Prediction
      • Custom Metrics
      • Custom Loss Function
      • Custom Layers
      • Unlabeled Data
      • Examples
        • CelebA Object Detection (YoloV7)
        • Wikipedia Toxicity (using Tensorflow Datasets)
        • Confusion Matrix
        • CelebA Classification (using GCS)
  • Platform
    • Resources Management
    • Project
    • Dataset
    • Secret Manager
    • Network
      • Dataset Node
      • Layers
      • Loss and Optimizer
      • Visualizers
      • Import Model
      • Metrics
    • Evaluate / Train Model
    • Metrics Dashboard
    • Versions
    • Issues
    • Tests
    • Analysis
      • helpers
        • detection
          • YOLO
    • Team management
    • Insights
  • API
    • code_loader
      • leap_binder
        • add_custom_metric
        • set_preprocess
        • set_unlabeled_data_preprocess
        • set_input
        • set_ground_truth
        • set_metadata
        • add_prediction
        • add_custom_loss
        • set_visualizer
      • enums
        • DatasetMetadataType
        • LeapDataType
      • datasetclasses
        • PreprocessResponse
      • visualizer_classes
        • LeapImage
        • LeapImageWithBBox
        • LeapGraph
        • LeapText
        • LeapHorizontalBar
        • LeapImageMask
        • LeapTextMask
  • Tips & Tricks
    • Import External Code
  • Legal
    • Terms of Use
    • Privacy Policy
Powered by GitBook
On this page

Was this helpful?

  1. Guides
  2. Integration Script

Visualizer Function

PreviousMetadata FunctionNextPrediction

Last updated 2 years ago

Was this helpful?

Tensorleap enables visualizations of data within the model graph by connecting a block to a node's output tensor. This allows to visualize the model's input, prediction, ground truth, or any inner tensor.

By default, these naive Visualizers are provided (in the UI):

  • Image

  • Graph

  • Numeric

  • HorizontalBar

  • Text

  • ImageMask

  • TextMask

These naive visualizers shows the data as-is, but in many cases, there is a need to write our own Visualizer Function to make sense of the data. For example:

  • Converting tokenized data to text words

  • Custom post-processing

  • Draw landmarks on images

  • Apply transforms

Example a visualizer function:

def text_visualizer_func(data: np.ndarray) -> LeapText:
    tokenizer = leap_binder.custom_tokenizer
    texts = tokenizer.sequences_to_texts(data)
    return LeapText(texts)

Guides

Full examples can be found at the Dataset Integration section of the following guides:

These functions should return one of the following types defined in .

The pages contain additional, visualizer specific, examples. Moreover, full script usage can be found at .

Visualizer
visualizer_classes
MNIST Guide
IMDB Guide
visualizer_classes
Integration Script