Skip to main content

A tool for visualizing latent spaces.

Project description

LatentSpaceVisualizer

The Latent Space Visualizer is an interactive Python notebook that visualizes the latent space of an image dataset. The dataset contains a collection of latent variables that describes a set of labeled images.

Two variables of the latent space are displayed in a 2D scatter plot. When the mouse is positioned near a point in the scatter plot, the image corresponding to that point is displayed to the side.

Getting started

Clone this repository.

git clone https://github.com/compSPI/LatentSpaceVisualizer.git

Change the current working directory to the root of this repository.

cd LatentSpaceVisualizer

Download from the Anaconda Cloud and install the Python environment that has the dependencies required to run the code.

conda env create compSPI/compSPI

Activate the environment.

conda activate compSPI

Install the kernel.

python -m ipykernel install --user --name compSPI --display-name "Python (compSPI)"

Exit the environment.

conda deactivate

Running the notebook

Run jupyter notebook.

jupyter notebook 

Open the tutorial notebook latent_space_visualizer.ipynb.

Change the Python kernel to compSPI.

Set dataset_file to an HDF5 file containing the dataset.

dataset_file = '../data/cspi_synthetic_dataset_diffraction_patterns_1024x1040.hdf5'

Run the notebook.

Installation

The project package can be installed by running the following command.

python setup.py install

Code structure

The relevant files and folders in this repository are described below:

  • README.md: Highlights the usefulness of the Latent Space Visualizer.

  • latent_space_visualizer.ipynb: Provides a tutorial notebook for using the Latent Space Visualizer.

  • latent_space_visualizer/: Contains the Python file required to run the notebook.

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

latent-space-visualizer-0.0.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

latent_space_visualizer-0.0.3-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file latent-space-visualizer-0.0.3.tar.gz.

File metadata

  • Download URL: latent-space-visualizer-0.0.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for latent-space-visualizer-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5b283741d38105d8d6ef7858b0a542c655b57de2026e505236c408977c07d1db
MD5 80abcedb2f9ad4308e02e08b0ef12fe7
BLAKE2b-256 a18b2e16ceff5454695ab4335d2201c1ff9a1d5414b8a05d67affda346e0b4f5

See more details on using hashes here.

File details

Details for the file latent_space_visualizer-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: latent_space_visualizer-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for latent_space_visualizer-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 126a8b757c8c83011465e065cdddb520ab9cf14ff591517a2e1a2506a55b0a66
MD5 90006912039708b8c32fe9782fdf970f
BLAKE2b-256 4557ba2b6b3e8f874ed6f592ec684ee265cf8992347e516c06c78ccaa4dcf0c1

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