You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In augmentation, elastic_transform, it only applies a random transform on one input image array. I would think to be used for training, the image and mask pair should be transform in the same way. However, this single-input-image, single-output-image method makes it very inconvenient. Could we deform a list of images (np.arrays) using the same transformation in this method ? Thanks!
The text was updated successfully, but these errors were encountered:
That is currently definitely an issue and we don't have a great solution for this (yet?).
Currently, we have mostly handled it with stacking the labels onto the images and just transforming them together. This however, leads to other problems. I guess one (simple?) way would be to use a predefined random state to do transformations and pass it to the transform or have an explicit label channel.
This should be a relatively simple change and PRs are welcome and we're happy to assist :)
i have added in support for this in the latest version of augmentation.py that i have placed under "contrib". The fix allows for the user to specify a random seed value, that is then used to apply the transform to the image and mask pair in the same way. In addition, to solve Jing's request above, you can now pass in a list of input images, along with the random seed (which would ensure the same seeding for the entire list of images prior to transforming them) and the output is the transformed list of images. Each image in the list is of type numpy.ndarray. Please pull it in if you think it helps.
In augmentation, elastic_transform, it only applies a random transform on one input image array. I would think to be used for training, the image and mask pair should be transform in the same way. However, this single-input-image, single-output-image method makes it very inconvenient. Could we deform a list of images (np.arrays) using the same transformation in this method ? Thanks!
The text was updated successfully, but these errors were encountered: