Core

imagepypelines Package

Functions

accuracy(predicted, ground_truth) calculates accuracy given ground truth and predicted labels
arrsummary(arr) returns a Summarizer object for the given array
batch(data, batch_size) chunks a list into multiple batch_size chunks, the last batch will be truncated if the data length isn’t a multiple of batch_size
blacklist_printer(name) Blacklists the given printer
carlenna([img_name]) standard image retrieval for carlenna
centroid(img) finds the centroid of the given image img
chunk(data, n) chunk a list into n chunks
chunks2list(batches) turns nested iterables into a single list
comment(*messages) prints a ‘comment’ level message to the imagepypelines default printer
confidence(data[, confidence]) returns the confidence mean and deviation for the given
confidence_90(data) returns the 90% confidence mean and deviation for the given
confidence_95(data) returns the 95% confidence mean and deviation for the given
confidence_99(data) returns the 99% confidence mean and deviation for the given
critical(*messages) prints a ‘critical’ level message to the imagepypelines default printer
crowd([img_name]) standard image retrieval for crowd
debug(*messages) prints a ‘debug’ level message to the imagepypelines default printer
dimensions(img) function which returns the dimensions and data_type of a given image
disable_all_printers() disables all printers sets the global log level to infinity to effectively disable all printers
disable_printout_colors() disables colored printouts for imagepypelines printout messages
display_safe(src[, max_count, cast_type]) normalizes and bins an image
dtype_type_check(dtype) checks to see if the interpolation type is one of the acceptable values specified in opencv, otherwise raises an imagepypelines.InvalidInterpolationType error
enable_printout_colors() enables colored printouts for imagepypelines printout messages
error(*messages) prints a ‘error’ level message to the imagepypelines default printer
frame_size(img) return the height and width of a given img
function_timer(func) Decorator to time how long a func takes to run in seconds
function_timer_ms(func) Decorator to time how long a func takes to run in milliseconds
gecko([img_name]) standard image retrieval for gecko
get_active_printers() gets a list of the names of currently active printers
get_default_printer() gets the imagepypelines default printer
get_printer(name[, log_level]) creates or retrieves a printer object
get_standard_image(img_name) retrieves the numpy array of standard image given a string key
giza([img_name]) standard image retrieval for giza
high_pass(img, cut_off[, filter_type, …]) calculates a highpass filter for an input image
import_opencv() Direct opencv imports are discouraged for imagepypelines developers because it is not automatically installed alongside imagepypelines, and therefore may cause confusing errors to users.
import_tensorflow() Direct tensorflow imports are discouraged for imagepypelines developers because it is not automatically installed alongside imagepypelines, and therefore may cause confusing errors to users.
info(*messages) prints a ‘info’ level message to the imagepypelines default printer
interpolation_type_check(interp) checks to see if the interpolation type is one of the acceptable values specified in opencv, otherwise raises an imagepypelines.InvalidInterpolationType error
lenna([img_name]) standard image retrieval for lenna
lenna_gray([img_name]) standard image retrieval for lenna_gray
linear([img_name]) standard image retrieval for linear
list_standard_images() returns a list of all builtin standard images sorted alphabetically
low_pass(img, cut_off[, filter_type, …]) calculates a lowpass filter for an input image
norm_01(img) Normalize img to the range [0, 1], inclusive.
norm_ab(img, a, b) Normalize img to the range [a, b], inclusive.
norm_dtype(img[, dtype]) Normalize img to the range [dtype_min, dtype_max].
number_image(img, num) Adds a number to the corner of an image
panda([img_name]) standard image retrieval for panda
panda_color([img_name]) standard image retrieval for panda_color
pig([img_name]) standard image retrieval for pig
print_args(func) Decorator to print out the arguments that a function is running with, this includes: arguments passed in, default values that are unspecified, varargs (*args), and varkwargs (**kwargs)
quick_block(process_fn, io_map[, name]) convienence function to make simple blocks
quick_image_view(img[, display_safe, title]) quickly displays the image using a PIL Image Viewer (which uses ImageMagick over X11 – this will work over ssh)
redhat([img_name]) standard image retrieval for redhat
reset_printer_lists() resets the white and black lists to their default values
roger([img_name]) standard image retrieval for roger
set_global_printout_level(log_level) sets the global log level :param log_level: the log level to set the global log level :type log_level: int,str
sparse_checkerboard([img_name]) standard image retrieval for sparse_checkerboard
standard_image_filenames() returns a list of standard image filenames on the local machine
standard_image_gen() generator function to yield all standard images sequentially useful for testing
standard_images() returns a list of all standard image arrays
warning(*messages) prints a ‘warning’ level message to the imagepypelines default printer
whitelist_printer(name) whitelisted the given printer
xsample(data, sample_fraction) function to randomly sample list data using a uniform distribution
xysample(data, labels[, sample_fraction]) function to randomly sample list data and corresponding labels using a uniform distribution

Classes

ArrayType(*array_shapes) Object to describe the shapes of Arrays for Block inputs or outputs
BaseBlock(io_map[, name, notes, …]) BaseBlock object which is the root class for SimpleBlock and BatchBlock subclasses
BatchBlock(io_map[, name, notes, …]) Block subclass that processes datums as a batch (as opposed to processing each datum individually).
BlockRequiresLabels
CachingError
CameraReadError Exception raised when the CameraCapture device is unable to read the camera
ChecksumError
CrackedPipeline
DataLabelMismatch(processed, labels)
Incompatible
IncompatibleTypes
InvalidBlockInputData(block)
InvalidBlockInputLabels(block)
InvalidInterpolationType(interp) Exception for an invalid interpolation Type where it’s applicable
InvalidLabelStrategy(block)
InvalidNumpyType(dtype) Exception for an invalid interpolation Type where it’s applicable
InvalidProcessStrategy(block)
IoMap(io_map) mapping object to determine the output of block IoMaps are used to predict the output of a block given a certain type of input.
Pipeline([blocks, name, skip_validation, …]) Pipeline object to apply a sequence of algorithms to input data
Printer(name[, log_level]) Object used to print out messages to the terminal for a given process or object.
Same class meant to be the output in an IoMap.
SimpleBlock(io_map[, name, notes, …]) Block subclass that processes individual datums separately (as opposed to processing all data at once in a batch).
Timer() Timer which can be used to time processes
Viewer([window_name, size, FFT, normalize, …]) Class to simplify displaying images using opencv windows.

Class Inheritance Diagram

Inheritance diagram of imagepypelines.core.BaseBlock.ArrayType, imagepypelines.core.BaseBlock.BaseBlock, imagepypelines.core.block_subclasses.BatchBlock, imagepypelines.core.Exceptions.BlockRequiresLabels, imagepypelines.core.Exceptions.CachingError, imagepypelines.core.Exceptions.CameraReadError, imagepypelines.core.Exceptions.ChecksumError, imagepypelines.core.Exceptions.CrackedPipeline, imagepypelines.core.Exceptions.DataLabelMismatch, imagepypelines.core.BaseBlock.Incompatible, imagepypelines.core.Exceptions.IncompatibleTypes, imagepypelines.core.Exceptions.InvalidBlockInputData, imagepypelines.core.Exceptions.InvalidBlockInputLabels, imagepypelines.core.Exceptions.InvalidInterpolationType, imagepypelines.core.Exceptions.InvalidLabelStrategy, imagepypelines.core.Exceptions.InvalidNumpyType, imagepypelines.core.Exceptions.InvalidProcessStrategy, imagepypelines.core.BaseBlock.IoMap, imagepypelines.core.Pipeline.Pipeline, imagepypelines.core.Printer.Printer, imagepypelines.core.BaseBlock.Same, imagepypelines.core.block_subclasses.SimpleBlock, imagepypelines.core.util.Timer, imagepypelines.core.Viewer.Viewer