Apply Solarization to the PIL image.
| 55 | |
| 56 | |
| 57 | class Solarization(object): |
| 58 | """ |
| 59 | Apply Solarization to the PIL image. |
| 60 | """ |
| 61 | def __init__(self, p): |
| 62 | self.p = p |
| 63 | |
| 64 | def __call__(self, img): |
| 65 | if random.random() < self.p: |
| 66 | return ImageOps.solarize(img) |
| 67 | else: |
| 68 | return img |
| 69 | |
| 70 | |
| 71 | def load_pretrained_weights(model, pretrained_weights, checkpoint_key, model_name, patch_size): |
nothing calls this directly
no outgoing calls
no test coverage detected