MCPcopy Create free account
hub / github.com/drinkingcoder/FlowFormer-Official / __init__

Method __init__

core/utils/augmentor.py:16–37  ·  view source on GitHub ↗
(self, crop_size, min_scale=-0.2, max_scale=0.5, do_flip=True, pwc_aug=False)

Source from the content-addressed store, hash-verified

14
15class FlowAugmentor:
16 def __init__(self, crop_size, min_scale=-0.2, max_scale=0.5, do_flip=True, pwc_aug=False):
17
18 # spatial augmentation params
19 self.crop_size = crop_size
20 self.min_scale = min_scale
21 self.max_scale = max_scale
22 self.spatial_aug_prob = 0.8
23 self.stretch_prob = 0.8
24 self.max_stretch = 0.2
25
26 # flip augmentation params
27 self.do_flip = do_flip
28 self.h_flip_prob = 0.5
29 self.v_flip_prob = 0.1
30
31 # photometric augmentation params
32 self.photo_aug = ColorJitter(brightness=0.4, contrast=0.4, saturation=0.4, hue=0.5/3.14)
33 self.asymmetric_color_aug_prob = 0.2
34 self.eraser_aug_prob = 0.5
35 self.pwc_aug = pwc_aug
36 if self.pwc_aug:
37 print("[Using pwc-style spatial augmentation]")
38
39 def color_transform(self, img1, img2):
40 """ Photometric augmentation """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected