(self, crop_size, min_scale=-0.2, max_scale=0.5, do_flip=False)
| 146 | |
| 147 | class SparseFlowAugmentor: |
| 148 | def __init__(self, crop_size, min_scale=-0.2, max_scale=0.5, do_flip=False): |
| 149 | # spatial augmentation params |
| 150 | self.crop_size = crop_size |
| 151 | self.min_scale = min_scale |
| 152 | self.max_scale = max_scale |
| 153 | self.spatial_aug_prob = 0.8 |
| 154 | self.stretch_prob = 0.8 |
| 155 | self.max_stretch = 0.2 |
| 156 | |
| 157 | # flip augmentation params |
| 158 | self.do_flip = do_flip |
| 159 | self.h_flip_prob = 0.5 |
| 160 | self.v_flip_prob = 0.1 |
| 161 | |
| 162 | # photometric augmentation params |
| 163 | self.photo_aug = ColorJitter(brightness=0.3, contrast=0.3, saturation=0.3, hue=0.3/3.14) |
| 164 | self.asymmetric_color_aug_prob = 0.2 |
| 165 | self.eraser_aug_prob = 0.5 |
| 166 | |
| 167 | def color_transform(self, img1, img2): |
| 168 | image_stack = np.concatenate([img1, img2], axis=0) |
nothing calls this directly
no outgoing calls
no test coverage detected