Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Augmentation for multiple inputs #33

Open
sydat2701 opened this issue Sep 1, 2024 · 1 comment
Open

Augmentation for multiple inputs #33

sydat2701 opened this issue Sep 1, 2024 · 1 comment

Comments

@sydat2701
Copy link

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
Copy link
Owner

ZFTurbo commented Sep 6, 2024

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:]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants