def predict_mask_whole(self, device='cuda'):
     region = piece_of_slide.PieceOfSlide(self.read_region(
         (0, 0), 0, self.level_dimensions[0]),
                                          model=self.model)
     return region.predict_mask(device)
 def strong_region(self, top_left, ex, size, debug=False):
     region = self.read_region(top_left, ex, size)
     region = piece_of_slide.PieceOfSlide(region, model=self.model)
     return region.strong_area(debug=debug)
 def get_masked_region(self, top_left, ex, size, device='cuda', show=False):
     region = self.read_region(top_left, ex, size)
     region = piece_of_slide.PieceOfSlide(region, model=self.model)
     if show:
         region.image_show()
     return region.get_masked(show=show, device=device)
 def predict_mask_region(self, top_left, ex, size, device='cuda'):
     region = self.read_region(top_left, ex, size)
     region = piece_of_slide.PieceOfSlide(region, model=self.model)
     return region.predict_mask(device=device)