Open gasvn opened 6 years ago
Thanks to issues 41, I made it.
For those who are lost, like me, I'll tell you the solution. You need to call
_aug = augmentation._to_deterministic()
before each generation of a new pair [Image, Mask] with
new_img = _aug.augment_image(img)
new_mask = _aug.augment_image(mask)
So far so good, but augment_image() also applies for example gaussian noise to mask which is not what people usually want. Any better way to avoid such operations as Gaussian noise etc (ie. only allow geometry ops)
See the documentation for segmentation maps, which only applies geometry ops. Should also work with masks.
If that doesn't work you can also use Hooks or create a second augmentation pipeline and copy the random states from the first to the second, but both of these options are a bit more difficult to implement than the first one.
I already have images and corresponding masks. And I wanna augment images and masks with the same operation, so that they can still match each other after augmention. I have checked the docs, but failed to look for a solution. Can I make that happen using IMGAUG?