make_tiles_ND#

omnipose.utils.make_tiles_ND(imgi, bsize=224, augment=False, tile_overlap=0.1, normalize=True, return_tiles=True)[source]#

make tiles of image to run at test-time

if augmented, tiles are flipped and tile_overlap=2.
  • original

  • flipped vertically

  • flipped horizontally

  • flipped vertically and horizontally

Parameters
  • imgi (float32) -- array that's nchan x Ly x Lx

  • bsize (float (optional, default 224)) -- size of tiles

  • augment (bool (optional, default False)) -- flip tiles and set tile_overlap=2.

  • tile_overlap (float (optional, default 0.1)) -- fraction of overlap of tiles

Returns

  • IMG (float32) -- tensor of shape ntiles,nchan,bsize,bsize

  • subs (list) -- list of slices for each subtile

  • shape (tuple) -- shape of original image