Moving Symbols  v1.0
Like Moving MNIST, but way more flexible
Public Member Functions | Public Attributes | List of all members
moving_symbols.moving_symbols.ImageLoader Class Reference

Public Member Functions

def __init__ (self, root, mode)
 
def get_image (self, label)
 Return a random, pre-processed image in the given label set and its source path. More...
 

Public Attributes

 root
 
 mode
 

Constructor & Destructor Documentation

def moving_symbols.moving_symbols.ImageLoader.__init__ (   self,
  root,
  mode 
)
Parameters
rootThe path to the root directory containing all images.
modeString that indicates how to transform the image for rendering. Options include "tight_crop".

Member Function Documentation

def moving_symbols.moving_symbols.ImageLoader.get_image (   self,
  label 
)

Return a random, pre-processed image in the given label set and its source path.

The image is pre-processed based on the ImageLoader's mode.

Parameters
labelThe label of the class to sample from
Return values
imageA PIL Image from the given label set
image_pathThe path to the selected image