The Latent Space Builder builds the latent space for an image dataset.
This command is used to download the code on your computer.
git clone https://github.com/compSPI/LatentSpaceBuilder.git
The following commands are used to install the code on your computer.
cd /path/to/LatentSpaceBuilder
python setup.py install --user
These commands are used to install the code on Jupyter Notebook.
cd /path/to/LatentSpaceBuilder
conda env create compSPI/compSPI
conda activate compSPI
python -m ipykernel install --user --name compSPI --display-name "Python (compSPI)"
The following commands are used to run the code in Jupyter Notebook.
Start Jupyter Notebook.
jupyter notebook
Open the tutorial notebook latent_space_builder.ipynb
and change the Python kernel to compSPI
.
Find the following line in the notebook:
dataset_file = '../data/cspi_synthetic_dataset_diffraction_patterns_1024x1040.hdf5'
Set the variable dataset_file
to an HDF5 file containing the dataset.
Run the notebook.
The following command is used to build the Conda code package.
cd LatentSpaceBuilder
conda build .
In order to upload the built code package to the compSPI organization in Anaconda Cloud, you need to be added to the compSPI organization. After you have been added to the compSPI organization, follow the next set of instructions to upload the code package.
After you run the command to build the Conda code package, you should see a line that looks like:
(on Mac OSX)
Processing '/Users/${USER}/opt/anaconda3/conda-bld/osx-64/latent-space-builder-0.0.1-py37_0.tar.bz2'
This location contains the built code package. To upload this code package to the compSPI organization in Anaconda Cloud, run the following command.
anaconda upload --user compSPI '/Users/${USER}/opt/anaconda3/conda-bld/osx-64/latent-space-builder-0.0.1-py37_0.tar.bz2'
The relevant files and folders in this repository are described below:
-
README.md
: Highlights the usefulness of the Latent Space builder. -
latent_space_builder.ipynb
: Provides a tutorial notebook for using the Latent Space Builder. -
latent_space_builder/
: Contains the Python file required to run the notebook.