(image, label)
| 62 | return image, label, edge |
| 63 | |
| 64 | def randomRotation_noEdge(image, label): |
| 65 | mode = Image.BICUBIC |
| 66 | if random.random() > 0.8: |
| 67 | random_angle = np.random.randint(-15, 15) |
| 68 | image = image.rotate(random_angle, mode) |
| 69 | label = label.rotate(random_angle, mode) |
| 70 | return image, label |
| 71 | |
| 72 | def colorEnhance(image): |
| 73 | bright_intensity = random.randint(5, 15) / 10.0 |
no outgoing calls
no test coverage detected