Feature Question/Request : augment image according to mask
See original GitHub issue🔥 Feature Question/Request
Hello,
I would like to know if 📚 Albumentation 📚 is capable of augment only a certain part of the image, especially according to the mask. I did not find it in the documentation and I don’t know if it is something usual when doing data augmentation but what I would like to do is, for my binary segmentation problem, augment only where the mask is. For example, if I want to segment a clothing someone is wearing, I was thinking that it would be useful to have different color version. I know that there might be some artefact generated compared to the original version but still I think it could be a cool thing to have …
Does someone know if it exists already or if it is possible to integrate it ?
I actually know how to do it my self with python, but I am not sure on how to interface with albumentation … Here, I change randomly the color where the mask is :
image[mask==1,:] = image[mask==1,:] + np.random.randint(low=-50,high=50,size=3)
Thank you !
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Interesting idea. But at this time I do not know how to do so that it would work with any transforms. For now you can use this wrapper:
I think it is good feature. So let it be open.