MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

ML/src/python/neuralforge/data/augmentation.py:8–26  ·  view source on GitHub ↗
(self, n: int = 2, m: int = 9)

Source from the content-addressed store, hash-verified

6
7class RandAugment:
8 def __init__(self, n: int = 2, m: int = 9):
9 self.n = n
10 self.m = m
11 self.augment_list = [
12 (self.auto_contrast, 0, 1),
13 (self.equalize, 0, 1),
14 (self.invert, 0, 1),
15 (self.rotate, 0, 30),
16 (self.posterize, 0, 4),
17 (self.solarize, 0, 256),
18 (self.color, 0.1, 1.9),
19 (self.contrast, 0.1, 1.9),
20 (self.brightness, 0.1, 1.9),
21 (self.sharpness, 0.1, 1.9),
22 (self.shear_x, 0, 0.3),
23 (self.shear_y, 0, 0.3),
24 (self.translate_x, 0, 0.3),
25 (self.translate_y, 0, 0.3),
26 ]
27
28 def __call__(self, img):
29 ops = random.choices(self.augment_list, k=self.n)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected