cyto_dl.image.transforms.bright_sampler module#

class cyto_dl.image.transforms.bright_sampler.BrightSampler(keys: str, threshold: float, base_prob: float, ch: int = 0)[source]#

Bases: object

Class to decide whether to sample a given patch based on its mean intensity + a background sampling rate.

Parameters:
  • key (str) – name of image to be examined

  • threshold (float) – threshold for selecting patch

  • base_prob – background probabiliy of selecting a patch

  • ch – channel from image to check against threshold