MCPcopy Create free account
hub / github.com/ChunmingHe/WS-SAM / randomRotation_noEdge

Function randomRotation_noEdge

utils/data_val.py:64–70  ·  view source on GitHub ↗
(image, label)

Source from the content-addressed store, hash-verified

62 return image, label, edge
63
64def 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
72def colorEnhance(image):
73 bright_intensity = random.randint(5, 15) / 10.0

Callers 3

__getitem__Method · 0.85
__getitem__Method · 0.85
__getitem__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected