average_tiles#

cellpose_omni.transforms.average_tiles(y, ysub, xsub, Ly, Lx)[source]#

average results of network over tiles

Parameters
  • y (float, [ntiles x nclasses x bsize x bsize]) -- output of cellpose network for each tile

  • ysub (list) -- list of arrays with start and end of tiles in Y of length ntiles

  • xsub (list) -- list of arrays with start and end of tiles in X of length ntiles

  • Ly (int) -- size of pre-tiled image in Y (may be larger than original image if image size is less than bsize)

  • Lx (int) -- size of pre-tiled image in X (may be larger than original image if image size is less than bsize)

Returns

yf -- network output averaged over tiles

Return type

float32, [nclasses x Ly x Lx]