SyMBac.misc

SyMBac.misc.get_sample_images()[source]

Return a dict of sample mother machine images.

Returns:

A dict with sample images, current keys are: “E. coli 100x”, “E. coli 100x stationary”, “E. coli DeLTA”

Return type:

dict

SyMBac.misc.resize_mask(mask, resize_shape, ret_label)[source]

Resize masks while maintaining their connectivity and values

SyMBac.misc.unet_weight_map(y, wc=None, w0=10, sigma=5)[source]

Generate weight maps as specified in the U-Net paper for boolean mask.

Parameters:
  • mask (Numpy array) – 2D array of shape (image_height, image_width) representing binary mask of objects.

  • wc (dict) – Dictionary of weight classes.

  • w0 (int) – Border weight parameter.

  • sigma (int) – Border width parameter.

Returns:

Training weights. A 2D array of shape (image_height, image_width).

Return type:

Numpy array

References

Taken from the original U-net paper [1]