[DEV] VESSL Docs
  • Welcome to VESSL Docs!
  • GETTING STARTED
    • Overview
    • Quickstart
    • End-to-end Guides
      • CLI-driven Workflow
      • SDK-driven Workflow
  • USER GUIDE
    • Organization
      • Creating an Organization
      • Organization Settings
        • Add Members
        • Set Notifications
        • Configure Clusters
        • Add Integrations
        • Billing Information
    • Project
      • Creating a Project
      • Project Overview
      • Project Repository & Project Dataset
    • Clusters
      • Cluster Integrations
        • Fully Managed Cloud
        • Personal Laptops
        • On-premise Clusters
        • Private Cloud (AWS)
      • Cluster Monitoring
      • Cluster Administration
        • Resource Specs
        • Access Control
        • Quotas and Limits
        • Remove Cluster
    • Dataset
      • Adding New Datasets
      • Managing Datasets
      • Tips & Limitations
    • Experiment
      • Creating an Experiment
      • Managing Experiments
      • Experiment Results
      • Distributed Experiments
      • Local Experiments
    • Model Registry
      • Creating a Model
      • Managing Models
    • Sweep
      • Creating a Sweep
      • Sweep Results
    • Workspace
      • Creating a Workspace
      • Exploring Workspaces
      • SSH Connection
      • Downloading / Attaching Datasets
      • Running a Server Application
      • Tips & Limitations
      • Building Custom Images
    • Serve
      • Quickstart
      • Serve Web Workflow
        • Monitoring Dashboard
        • Service Logs
        • Service Revisions
        • Service Rollouts
      • Serve YAML Workflow
        • YAML Schema Reference
    • Commons
      • Running Spot Instances
      • Volume Mount
  • API REFERENCE
    • What is the VESSL CLI/SDK?
    • CLI
      • Getting Started
      • vessl run
      • vessl cluster
      • vessl dataset
      • vessl experiment
      • vessl image
      • vessl model
      • vessl organization
      • vessl project
      • vessl serve
      • vessl ssh-key
      • vessl sweep
      • vessl volume
      • vessl workspace
    • Python SDK
      • Integrations
        • Keras
        • TensorBoard
      • Utilities API
        • configure
        • vessl.init
        • vessl.log
          • vessl.Image
          • vessl.Audio
        • vessl.hp.update
        • vessl.progress
        • vessl.upload
        • vessl.finish
      • Dataset API
      • Experiment API
      • Cluster API
      • Image API
      • Model API
        • Model Serving API
      • Organization API
      • Project API
      • Serving API
      • SSH Key API
      • Sweep API
      • Volume API
      • Workspace API
    • Rate Limits
  • TROUBLESHOOTING
    • GitHub Issues
    • VESSL Flare
Powered by GitBook
On this page
  • PIL Image
  • torch.Tensor
  • numpy.ndarray
  • str
  1. API REFERENCE
  2. Python SDK
  3. Utilities API
  4. vessl.log

vessl.Image

Use the vessl.Image class to log image data. This takes the image data and saves it as a local PNG file in the vessl-media/image directory with randomly generated names.

Parameter
Description

data

Supported types - PIL Image: the Image module of Pillow

- torch.Tensor: a PyTorch tensor

- numpy.ndarray: a NumPy array

- str: the image path

caption

Label of the given image

PIL Image

import vessl
from PIL import Image

my_PIL_image = Image.open('my-image.png')
vessl.Image(
    data=my_PIL_image,
    caption='my-caption',
)

torch.Tensor

import vessl
import torch

vessl.Image()
test_loader = torch.utils.data.DataLoader(
                test_dataset, batch_size=10, shuffle=True)
for data, target in test_loader:
    vessl.Image(
        data=data[0], 
        caption=f'Target:{target[0]}',
    )

numpy.ndarray

import vessl
import numpy as np

my_np_image = np.array([[0,1,1,0],[1,0,0,1],[0,1,1,0]]) 
vessl.Image(
    data= my_np_image,
    caption='my-caption',
)

str

import vessl

my_image_path = 'my-image.png'
vessl.Image(
    data=my_image_path,
    caption='my-caption',
)
Previousvessl.logNextvessl.Audio

Last updated 3 years ago