(self, image, mode)
| 2739 | ) |
| 2740 | |
| 2741 | def _get_threshold(self, image, mode): |
| 2742 | threshold = self.thresholds.get(mode) |
| 2743 | if callable(threshold): |
| 2744 | return threshold(image) |
| 2745 | return threshold |
| 2746 | |
| 2747 | def __call__(self, image: NdarrayOrTensor): |
| 2748 | image = convert_to_tensor(image, track_meta=get_track_meta()) |