delta.data

Click on the signatures below to get a complete description.

Module for data manipulations and input/output operations.

@author: jblugagne

Functions

binarizerange(array)

This function will binarize a numpy array by thresholding it in the middle of its range

data_augmentation(images_input, aug_par[, ...])

Data augmentation function

estimateClassweights(gene[, num_samples])

Estimate the class weights to use with the weighted categorical cross-entropy based on the output of the trainGenerator_track output.

estimate_seg2D_classweights(mask_path[, ...])

Estimate the weights to assign each class in the weight maps

getfnfromprototype(prototype, fileorder[, ...])

Generate full filename for specific frame based on file path, prototype, fileorder, and filenamesindexing

histogram_voodoo(image[, num_control_points])

This function kindly provided by Daniel Eaton from the Paulsson lab.

illumination_voodoo(image[, num_control_points])

This function inspired by the one above.

kernel(n)

Get kernel for morphological operations

postprocess(images[, square_size, min_size, ...])

A generic binary image cleaning function based on mathematical morphology.

predictCompilefromseg_track(img_path, ...[, ...])

Compile an inputs array for tracking prediction with the tracking U-Net, directly from U-Net segmentation masks saved to disk.

predictGenerator_seg(files_path[, ...])

Get a generator for predicting segmentation on new image files once the segmentation U-Net has been trained.

readreshape(filename[, target_size, ...])

Read image from disk and format it

saveResult_seg(save_path, npyfile[, ...])

Saves an array of segmentation output images to disk

saveResult_track(save_path, npyfile[, ...])

Save tracking output masks to disk

seg_weights(mask[, classweights, w0, sigma])

This function computes the weight map as described in the original U-Net paper to force the model to learn borders (Slow, best to run this offline before training)

seg_weights_2D(mask[, classweights])

Compute custom weightmaps designed for bacterial images where borders are difficult to distinguish

shift(image, vector[, order])

Image shifting function

tracking_weights(track, segall[, halo_distance])

Compute weights for tracking training sets

trainGenerator_seg(batch_size, img_path, ...)

Generator for training the segmentation U-Net.

trainGenerator_track(batch_size, img_path, ...)

Generator for training the tracking U-Net.

zoomshift(I, zoomlevel, shiftX, shiftY[, order])

This function zooms and shifts images.