ZFTurbo / volumentations

Library for 3D augmentations
MIT License
223 stars 36 forks source link

Augmentation for multiple inputs #33

Open sydat2701 opened 2 weeks ago

sydat2701 commented 2 weeks ago

Hi, my network requires 2 inputs A and B, how can I augment them in the same way? like data = {'image1': A, 'image2':B, mask: C}. Thank you

ZFTurbo commented 1 week ago

If you have 2 inputs you can concatenate them over channels axis. Apply augmentation and after split it back.

TMP = np.concatenate([A, B], axis=-1)
...
A = TMP[..., :3]
B = TMP[..., 3:]