Skip to content

Specify augmentation for different images #536

Answered by fepegar
rousseau asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, @rousseau. I believe you can use include/exclude for this.

import torchio as tio
transform = tio.Compose([
    tio.RandomAffine(),
    tio.RandomBlur(std=(2, 3), include='t1'),
])
subject = tio.datasets.Pediatric(years=(4.5, 8.5))
subject.remove_image('pd')
subject.remove_image('mask')
subject.plot(show=False)
transformed = transform(subject)
transformed.plot()


Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rousseau
Comment options

@fepegar
Comment options

Answer selected by fepegar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants